Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to unsubscribe after clicking following button of a tag. #2010

Closed
5 tasks
rishabhptr opened this issue Jan 15, 2018 · 4 comments
Closed
5 tasks

Not able to unsubscribe after clicking following button of a tag. #2010

rishabhptr opened this issue Jan 15, 2018 · 4 comments
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed first-timers-only They need to be well-formatted using the First-timers_Issue_Template. help wanted requires help by anyone willing to contribute HTML

Comments

@rishabhptr
Copy link
Contributor

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

A user is not able to click the following button again to unfollow the specific tag but is just redirected to that tag page.
screenshot from 2018-01-15 21-52-02

screenshot from 2018-01-15 22-01-25

What's supposed to happen:
If user is already following the topic this clicking this button again should unsubscribe the user from that topic.

What actually does happen:
User is just redirected to the specific topic page.

Solution

Where to find the relevant lines of code:
https://github.com/publiclab/plots2/blob/master/app/views/home/subscriptions.html.erb#L9
https://github.com/publiclab/plots2/blob/master/app/views/tag/show.html.erb#L47

What to change them to:

We need to add data-method="delete" to the above mentioned two lines.

<a rel="tooltip" title="<%= t('home.subscriptions.click_unfollow') %>" class="btn btn-default active" href="/unsubscribe/tag/everything"><i class="fa fa-eye"></i> <%= t('home.subscriptions.following') %> <b><%= t('home.subscriptions.research_notes') %></b></a>
to
<a rel="tooltip" title="<%= t('home.subscriptions.click_unfollow') %>" class="btn btn-default active" href="/unsubscribe/tag/everything" data-method="delete"><i class="fa fa-eye"></i> <%= t('home.subscriptions.following') %> <b><%= t('home.subscriptions.research_notes') %></b></a>

and

<a rel="tooltip" title="<%= t('home.subscriptions.click_unfollow') %>" class="btn btn-default active" href="/unsubscribe/tag/everything"><i class="fa fa-eye"></i> <%= t('home.subscriptions.following') %> <b><%= t('home.subscriptions.research_notes') %></b></a>
to
<a rel="tooltip" title="<%= t('home.subscriptions.click_unfollow') %>" class="btn btn-default active" href="/unsubscribe/tag/everything" data-method="delete"><i class="fa fa-eye"></i> <%= t('home.subscriptions.following') %> <b><%= t('home.subscriptions.research_notes') %></b></a>

Steps to Fix

  • 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/wiki/developers) or go to the chatroom if you have questions, and take a look at our first-timers landing page for more information!

@ViditChitkara ViditChitkara added help wanted requires help by anyone willing to contribute first-timers-only They need to be well-formatted using the First-timers_Issue_Template. Ruby HTML bug the issue is regarding one of our programs which faces problems when a certain task is executed and removed Ruby labels Jan 16, 2018
@namangupta01
Copy link
Member

i want to work on this issue

@jywarren
Copy link
Member

@namangupta01 - you're welcome to tackle this one, but if I recall you've done a first-timers-only issue once before; once you're done with this, perhaps you'd like to tackle one of the slightly less fully-documented issues over at https://publiclab.github.io/community-toolbox/#r=all so that a complete newcomer could take the first-timers-only issues? Don't under-estimate your expertise! :-)

Thanks!!!

@jywarren
Copy link
Member

And @rishabhptr -- great first time first timer only issue! 👍 💯

@namangupta01
Copy link
Member

@jywarren Sure, I will!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed first-timers-only They need to be well-formatted using the First-timers_Issue_Template. help wanted requires help by anyone willing to contribute HTML
Projects
None yet
Development

No branches or pull requests

4 participants