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

Fix hyperlinks not working on profile page #5021

Closed
madeofhuman opened this Issue Mar 11, 2019 · 17 comments

Comments

Projects
None yet
7 participants
@madeofhuman
Copy link
Contributor

madeofhuman commented Mar 11, 2019

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!

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

<% if !@related_tags.nil? %>
    <p> <%= render partial: 'tag/subscribe_button', locals:{tags: @related_tags } %></p>
  <% end %>

to ensure that an iteration does not occur on a nil value (that is, tags.each should only run when tags has a non-nil value).
Current Behavior
Clicking on the hyperlinks to a user's questions and activities on their profile page breaks the app and opens an error page.
Screenshot 2019-03-11 at 10 38 15 PM
Screenshot 2019-03-11 at 9 58 50 PM

Expected Behavior
Clicking on the hyperlinks on a user's profile page ("questions", for example) should take you to a page that shows the questions or activities the user has made.
Screenshot 2019-03-11 at 10 38 15 PM
Screenshot 2019-03-11 at 10 38 33 PM

  • 💾 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!

@madeofhuman

This comment has been minimized.

Copy link
Contributor Author

madeofhuman commented Mar 12, 2019

@gauravano here's the issue.

@helenatxu

This comment has been minimized.

Copy link

helenatxu commented Mar 12, 2019

Hi I am an Outreachy applicant, could I be assigned to this issue to work on? Or maybe you have another issue you could assign me to start working :) Thanks @gauravano

@cesswairimu

This comment has been minimized.

Copy link
Collaborator

cesswairimu commented Mar 12, 2019

@madeofhuman good catch, but to make it a first-timer-only you have to give the the actual code to be written and links to where specifically it should be. Please do that on the description or I can help with that, juts let me know. @helenatxu awesome you can take up this issue once its ready

@cesswairimu

This comment has been minimized.

Copy link
Collaborator

cesswairimu commented Mar 12, 2019

Actually this could be split into three ftos now that we are in need for more..one for each hyperlink thanks again @madeofhuman

@madeofhuman

This comment has been minimized.

Copy link
Contributor Author

madeofhuman commented Mar 12, 2019

@cesswairimu It's actually only one line of code that needs to be modified to fix everything. If you look at the screenshot of the error page that I added to the description, it's line 4 of _tags_popover.html.erb

@cesswairimu

This comment has been minimized.

Copy link
Collaborator

cesswairimu commented Mar 12, 2019

Aha gotcha, thanks @madeofhuman. @helenatxu this is ready you can get started on it...comment below if you get stuck.

@helenatxu

This comment has been minimized.

Copy link

helenatxu commented Mar 12, 2019

Thank you @cesswairimu!

@madeofhuman

This comment has been minimized.

Copy link
Contributor Author

madeofhuman commented Mar 13, 2019

@helenatxu how are you doing with this? If you're running into any problem, please don't hesitate to reach out. 😄

@madeofhuman

This comment has been minimized.

Copy link
Contributor Author

madeofhuman commented Mar 20, 2019

Hi, @helenatxu. Hope you're all right? How are you getting on with this issue? Don't forget to reach out if you have any problem.

@helenatxu

This comment has been minimized.

Copy link

helenatxu commented Mar 20, 2019

Hello @madeofhuman! Sorry I didn't answer as I didn't see any notification. I think I will /unclaim this issue because I didn't have time yet to start it after a few days. I will come back if I have enough time again. Thank you!

@jywarren

This comment has been minimized.

Copy link
Contributor

jywarren commented Mar 20, 2019

That's ok @helenatxu, maybe @shubhi2000 would like to take this one over for now and we can make one for you when you're ready? You can always ask and we will make one.

#4963

@shubhi2000

This comment has been minimized.

Copy link
Contributor

shubhi2000 commented Mar 20, 2019

@jywarren sure, I will take this issue and work on it.

@jywarren

This comment has been minimized.

Copy link
Contributor

jywarren commented Mar 20, 2019

@shubhi2000

This comment has been minimized.

Copy link
Contributor

shubhi2000 commented Mar 20, 2019

I added a conditional statement to run tags.each only when tags has a non-null value, and then I created a PR. Out of 3 checks on my PR, 2 checks were successful and 1 check failed. Since, it is my first PR, I didn't know that I need to tick the checkboxes before proposing the PR. So, the check failure is because of not checking the boxes or something else needs to be done with the code? Please help me regarding this.

@IshaGupta18

This comment has been minimized.

Copy link
Collaborator

IshaGupta18 commented Mar 20, 2019

Okay so I am not sure why this file is being used here in the profile page. This file was just written for multiple tag subscription, and I don't know why it is linked to links in the profile page. Besides, if tags are empty, that is already being checked here:

<% if @node && !@node.node_tags.empty? && ((current_user && @node.liked_by(current_user.uid)) || !current_user) %>

Let's try and find out what's happening here

@IshaGupta18

This comment has been minimized.

Copy link
Collaborator

IshaGupta18 commented Mar 20, 2019

Finally found the bug! The file that needs to be changes here is not _tags_popover.html.erb, its tag/show.html.erb. The subscribe_button partial is being called there and the nil condition is not being checked there. I am EDITING this issue here only since @madeofhuman reported this issue in the first place! @shubhi2000 you can close your previous PR and create a new PR according to the new changes. Thanks a ton everyone!

@shubhi2000

This comment has been minimized.

Copy link
Contributor

shubhi2000 commented Mar 20, 2019

@IshaGupta18 okay, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.