Plots2: Link for alphabetic display of wiki index

Created on 6 Dec 2016  Â·  17Comments  Â·  Source: publiclab/plots2

Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!

If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!

The problem

As of #1049, we now have a great alphabetic display of wiki pages, at:

https://publiclab.org/wiki/?order=alphabetic

Which will be live shortly. But theres no link to get there from https://publiclab.org/wiki/

There are links for sorting by popularity and others:

screen shot 2016-12-06 at 5 25 19 pm

Solution

We need to modify this template file:

https://github.com/publiclab/plots2/blob/master/app/views/wiki/index.html.erb#L18-L21

In order to show the "alphabetic" option, similarly to how the others work, we need a conditional like:

  <% elsif params[:order] == "alphabetic" %>

    <h2><%= t('wiki.index.popular_wiki_pages') %> <small><%= t('wiki.index.collaborative_documentation') %></small></h2>
    <p>&nbsp;<a style="margin-bottom:4px;" href="/wiki/new" class="btn btn-default"><i class="fa fa-plus-circle"></i> <%= t('wiki.index.create_wiki_page') %></a> <span style="margin-top:4px;" class="pull-right"><a href="/wiki/"><%= t('wiki.index.by_recency') %></a> | <span style="color:#aaa"><%= t('wiki.index.by_popularity') %></span> | <a href="/wiki/liked"><%= t('wiki.index.by_number_of_likes') %></a></span></p>

But note how hard to read this all is. Perhaps we should:

  1. break these up into multiple lines
  2. use a different structure of independent if/else statements so that each link need only appear once

For example, each one could be like:

<% if params[:order] == 'alphabetic' %>
  alphabetic
<% else %>
  <a href="/wiki/?order=alphabetic">alphabetic</a>
<% end %>

Try doing this for each of these four: recency, popularity, # of likes, alphabetic.

And please ask if you need help!

Steps to Fix

  • [x] claim this issue with a comment here, below, and ask any clarifying questions you need
  • [ ] set up a repository locally following the README instructions, and make sure that all tests pass
  • [ ] try to fix the issue following the steps above, but even before you're done, you can:
  • [ ] commit your changes and start a pull request (see contributing to Public Lab software) but mark it as "in progress" if you have questions or if you haven't finished
  • [ ] alert someone via the developers list (see below) to have your pull request merged. This may take a few extra steps depending on when you do it, but we'll help you out!

Please email the developers list (see https://publiclab.org/developers) if you have questions, and take a look at our first-timers landing page for more information!

Ruby first-timers-only help wanted

Most helpful comment

@marcmoy Can you state what errors are you getting? We can help you out. And since this is a first-timer issue we can take care of the tests. If you have setup the development environment you can move ahead with fixing this issue.

All 17 comments

I will have a crack at this.

Hi, this is a first-timers-only issue -- would you mind taking a look at
some of the issues available for folks who have made a first-timer
contribution already? You can find many at:

https://github.com/publiclab/plots2/labels/fto-candidate

And I'm happy to help you out on any of those!

Thanks!

On Tue, Dec 6, 2016 at 6:04 PM, 500swapnil notifications@github.com wrote:

I will have a crack at this.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/1072#issuecomment-265301951,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ0bXSE5VdpuCIKh8h01-vU5IwI6Oks5rFeoHgaJpZM4LF97R
.

Okay I will have a look at those

Hi @jywarren - I'm relatively new to coding and have not made an open source contribution to anything yet. Could I claim this issue and start working at it?

Yes, we'd love your help on this and are happy to offer any assistance you might need. Thanks a lot!

Just curious -- we're trying to improve our outreach to new contributors -- how did you happen to hear about us?

Awesome, thanks! Here how my discovery process went for finding your repo...

  1. Google searched "open source contribution for beginners"
  2. Navigated to the First Timers Only website
  3. And then went to the Up For Grabs website
  4. Scrolled through a bunch of links
  5. And then saw your link https://github.com/publiclab/plots2/labels/help-wanted

I think it's really cool that there are open source contributors creating these opportunities to welcome newbies into the open source community.

Well, we're very happy to have contributions from those new to open source, thank you!

Hello @jywarren,

I am a programming newbie and would love to start to contributing to the project, but I am unsure where I should start.

Hi, and welcome! 🎉

I think I wrote back to you in another thread, but a great place to start is here: https://github.com/publiclab/plots2/projects/2

Thanks!

Thank you! I am very excited!

Great.

Hi, @marcmoy -- just checking if you've gotten stuck on this at all, or if I could help in any way? Thanks!

Hi @jywarren, I can't seem to get the initial tests to pass. There seems to be something off about my ruby environment.

I think I am going to have to pass on this issue and allow someone else to tackle this.

Sorry about that

@marcmoy Can you state what errors are you getting? We can help you out. And since this is a first-timer issue we can take care of the tests. If you have setup the development environment you can move ahead with fixing this issue.

Hi @jywarren. I haven't made open source contribution yet. It's my first time and would like to claim this issue if there is no one checking.

I've heard about this project at up-for-grabs.net
Many Thanks

Hi, yes please! We're happy to offer any help you may need as well. Sorry for the slow reply on the holiday!

Hi, I've opened a pull request to merge it.
I hope I've done everything properly, please feel free to make any comments or suggestions.

Cheers.

Checking it out now!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shapironick picture shapironick  Â·  3Comments

first-timers[bot] picture first-timers[bot]  Â·  3Comments

grvsachdeva picture grvsachdeva  Â·  3Comments

first-timers[bot] picture first-timers[bot]  Â·  3Comments

keshavsethi picture keshavsethi  Â·  3Comments