-
Notifications
You must be signed in to change notification settings - Fork 753
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
Toggle resource recommendations #1738
Toggle resource recommendations #1738
Conversation
…TeamBits-2020/ifme into toggle_resource_recommendations
…rrect props for resource recommendations toggle
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.
Thanks for working on this! Great work 🎉
I just have one piece of feedback!
app/views/moments/show.html.erb
Outdated
</ul> | ||
</div> | ||
<% if @moment.resource_recommendations? %> | ||
<% if @resources.any? %> |
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.
We should combine these conditions with &&
.
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.
Thank you for the speedy feedback, @julianguyen! I'll fix that right away.
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.
LGTM, solid work! I think we should hold back on merging since we're doing a feature freeze today.
cc: @bmwachajr
Looks like this is ready to merge! Let's just resolve the merge conflicts :) |
* [#1737] Display new toggle button on Moment edit page * Add resource_recommendation column on moments table * [#1737] Toggle works for moment new and edit * [#1737] Refactored and rubocop * [#1737] Translation for Hindi * [#1737] Translate Norwegian * [#1737] Translate Dutch * [#1737] Translate Swedish * [#1737] Translate Vietnamese * [#1737] Add resource_recommendation column on moments table * [#1737] Toggle works for moment new and edit * [#1737] Refactored and rubocop * [#1737] Transalte resource_recommendations into Brazilian Portuguese * [#1737] Transalte resource_recommendations into Spanish * [#1737] Translate German * [#1737] Transalte resource_recommendations into French * [#1737] Transalte resource_recommendations into Italian * [#1737] Transalte resource_recommendations into Chinese * [#1737] Fix French translation * [#1737] Test if MomentsFormHelper #edit and #create returns correct props for resource recommendations toggle * [#1737] Test if toggle updates moment.resource_recommendations in db * [#1737] Test if correct links are displayed on moment show * [#1737] Test if resource links are not displayed when user chooses so * [#1737] Updated schema and seed file * [#1737] Refactored code to be dry Co-authored-by: Aline Ribeiro <[email protected]>
* [ifmeorg#1737] Display new toggle button on Moment edit page * Add resource_recommendation column on moments table * [ifmeorg#1737] Toggle works for moment new and edit * [ifmeorg#1737] Refactored and rubocop * [ifmeorg#1737] Translation for Hindi * [ifmeorg#1737] Translate Norwegian * [ifmeorg#1737] Translate Dutch * [ifmeorg#1737] Translate Swedish * [ifmeorg#1737] Translate Vietnamese * [ifmeorg#1737] Add resource_recommendation column on moments table * [ifmeorg#1737] Toggle works for moment new and edit * [ifmeorg#1737] Refactored and rubocop * [ifmeorg#1737] Transalte resource_recommendations into Brazilian Portuguese * [ifmeorg#1737] Transalte resource_recommendations into Spanish * [ifmeorg#1737] Translate German * [ifmeorg#1737] Transalte resource_recommendations into French * [ifmeorg#1737] Transalte resource_recommendations into Italian * [ifmeorg#1737] Transalte resource_recommendations into Chinese * [ifmeorg#1737] Fix French translation * [ifmeorg#1737] Test if MomentsFormHelper #edit and #create returns correct props for resource recommendations toggle * [ifmeorg#1737] Test if toggle updates moment.resource_recommendations in db * [ifmeorg#1737] Test if correct links are displayed on moment show * [ifmeorg#1737] Test if resource links are not displayed when user chooses so * [ifmeorg#1737] Updated schema and seed file * [ifmeorg#1737] Refactored code to be dry Co-authored-by: Aline Ribeiro <[email protected]>
Description
Created a toggle for a user to choose to display/not display Resource Recommendations on their Moment Post show page.
More Details
Important! A resource_recommendations boolean column has been added to the Moments table. The necessary steps as per Schema Documentation Best Practices have been taken. Additionally, the seeds.rb file has been updated for the user moments.
Corresponding Issue
Issue #1737
Reviewing this pull request? Check out our Code Review Practices guide if you haven't already!