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
Feature: Add “Continue” button and badge for selected path #4513
base: main
Are you sure you want to change the base?
Conversation
04f0e19
to
bc05571
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a cool change. I always found these buttons a bit confusing.
Just have a couple of small nits.
716c2d9
to
fd892c9
Compare
Awesome. I'll just wait for Kevin to look things over and maybe create a review deploy for us to preview things. Thank you for contributing 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great @davidha99 💪 thanks for doing this!
Just one small suggestion from me.
app/views/paths/index.html.erb
Outdated
<div class="absolute top-3.5 right-3.5"> | ||
<% if current_user.present? && current_user.on_path?(path) %> | ||
<%= render Ui::BadgeComponent.new(color: 'green') do %> | ||
<%= @badge_text %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We can hardcode "Selected" in the badges. I think if we needed the text to be dynamic based on some state, using an instance var would be the way to go. But the content should remain static for now.
<%= @badge_text %> | |
Selected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @KevinMulhern thanks for the suggestion. I've updated the code 👍
Co-authored-by: Josh Smith <jmsmith1018@gmail.com>
fd892c9
to
8d3e41d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! thanks @davidha99 🚀
Thanks! Glad to help 🙌 |
Because
A user might get confused about the current behavior of the "Resume" button in All Paths (#3230, #4495).
This PR
Helps to differentiate a selected path from the rest by:
Note: User needs to be logged in.
Before (Foundations path selected)
After (Foundations path selected)
Before (Ruby on Rails path selected)
After (Ruby on Rails path selected)
Before (Javascript path selected)
After (Javascript path selected)
Issue
Closes #4495
Pull Request Requirements
keyword: brief description of change
format, using one of the following keywords:Feature
- adds new or amends existing user-facing behaviorChore
- changes that have no user-facing value, refactors, dependency bumps, etcFix
- bug fixesBecause
section summarizes the reason for this PRThis PR
section has a bullet point list describing the changes in this PRIssue
section