Refactoring profile.html.erb code pt.2 #4342
Labels
first-timers-only
They need to be well-formatted using the First-timers_Issue_Template.
help wanted
requires help by anyone willing to contribute
First Time?
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.
The problem
Our code in
app/views/users/profile.html.erb
is very verbose... we could use some refactoringWe can start by refactoring out a re-occuring line from the code. For now, the 1st line of:
plots2/app/views/users/profile.html.erb
Lines 216 to 223 in 1931439
Solution
What to change it to:
Refactor the line in the code block found in the "The Problem" section to use your new helper method instead.
That line can be updated to
<% if current_profile_user %>
Thanks!!
Steps to Fix
commit your changes to your branch 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
💬 Get help
If you need any help - here are some options:
The text was updated successfully, but these errors were encountered: