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

Toggle resource recommendations #1738

Merged

Conversation

S-Warmenhoven
Copy link
Contributor

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!

S-Warmenhoven and others added 25 commits May 6, 2020 12:27
…rrect props for resource recommendations toggle
julianguyen
julianguyen previously approved these changes May 8, 2020
Copy link
Member

@julianguyen julianguyen left a 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!

</ul>
</div>
<% if @moment.resource_recommendations? %>
<% if @resources.any? %>
Copy link
Member

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 &&.

Copy link
Contributor Author

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.

julianguyen
julianguyen previously approved these changes May 8, 2020
Copy link
Member

@julianguyen julianguyen left a 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

@julianguyen
Copy link
Member

Looks like this is ready to merge! Let's just resolve the merge conflicts :)

@julianguyen julianguyen merged commit c7ddc23 into ifmeorg:master May 11, 2020
bmwachajr pushed a commit that referenced this pull request May 20, 2020
* [#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]>
bianca93 pushed a commit to bianca93/ifme that referenced this pull request Jun 24, 2020
* [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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants