Plots2: Link comments under question to login modal

Created on 14 Dec 2018  ยท  10Comments  ยท  Source: publiclab/plots2

Hi, this is a first-timers-only issue made from #4132. 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!

We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you ๐Ÿ’

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

๐Ÿค” What you will need to know.

Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.

๐Ÿ“‹ Step by Step

  • [ ] ๐Ÿ™‹ Claim this issue: Comment below. If someone else has claimed it, ask if they've opened a pull request already and if they're stuck -- maybe you can help them solve a problem or move it along!

  • [ ] ๐Ÿ“ Update the file show.html.erb in the plots2 repository (press the little pen Icon) and edit the line as shown below.

See this page for some help in taking your first steps!

Issue

Linking of the Login link to the login modal under the comments
image

Solution

Change the

https://github.com/publiclab/plots2/blob/master/app/views/questions/show.html.erb#L62

to

<p><a data-toggle="modal" data-target="#loginModal">Log in</a> to comment</p> 

and please attach a GIF showing the opening of modal on clicking the Login link.

  • [ ] ๐Ÿ’พ Commit your changes

  • [ ] ๐Ÿ”€ Start a Pull Request. There are two ways how you can start a pull request:

  1. If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.

  2. You can also edit files directly in your browser and open a pull request from there.

  • [ ] ๐Ÿ Done Ask in comments for a review :)

๐Ÿค”โ“ Questions?

Leave a comment below!

Is someone else already working on this?

We encourage you to link to this issue by mentioning the issue # in your pull request, so we can see if someone's already started on it. If someone seem stuck, offer them some help! Otherwise, take a look at some other issues you can help with. Thanks!

HTML first-timers-only

Most helpful comment

Hi, I checked your changes at my localhost. We use same partial but here also we need to link it to the modal. This button was redirecting to the /login hence @gauravano and I made an issue collaboratively.

All 10 comments

Hi @SidharthBansal I converted it to FTO, I hope this issue isn't a priority. Thanks!

Hi, I am new to open source and I'd like to try this out! Is it available?

Hi @eli6, Welcome to Open Source and Public Lab :smiley:. Yes, it's available to claim. Thanks!

@gauravano Thanks! One question: is the " and a GIF showing the opening of modalon clicking the Login link" really part of the line to be added?

No, that's not a part of the code. Actually, for minor frontend modifications, we ask contributors to attach a GIF of the modified part with their PR so that PR reviewing can be done fastly.

Clear now?

Ok thanks ๐Ÿ‘ Yes it's clear now! I just wanted to double check since it was code-formatted

Oops, that's me. Edited!

Hi, I think I had added login modal for comments on /notes and I believe the /questions page uses the same comments file.. You can check at #4215..
Apologies if I'm wrong

Hi, I checked your changes at my localhost. We use same partial but here also we need to link it to the modal. This button was redirecting to the /login hence @gauravano and I made an issue collaboratively.

That is strange.. I had made a PR #4213 for linking login modal to comments and answers but broke it into two PRs for modularity - #4215 and #4216 .. I've made the exact same changes... but I was able to use the login modal on comments at /questions in #4213 ... I had even attached a GIF

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grvsachdeva picture grvsachdeva  ยท  3Comments

first-timers[bot] picture first-timers[bot]  ยท  3Comments

RuthNjeri picture RuthNjeri  ยท  3Comments

grvsachdeva picture grvsachdeva  ยท  3Comments

keshavsethi picture keshavsethi  ยท  3Comments