-
Notifications
You must be signed in to change notification settings - Fork 742
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
Add Bookmark switch to Moments and Strategies #1727
Conversation
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 getting started on this! :)
app/helpers/moments_form_helper.rb
Outdated
def moment_form_inputs | ||
[ | ||
moment_name, moment_why, moment_fix, moment_category, moment_mood, | ||
moment_strategy, get_viewers_input( | ||
@viewers, 'moment', 'moments', @moment | ||
), | ||
moment_comment, moment_publishing | ||
moment_comment, moment_publishing, | ||
Rails.env.development? ? moment_bookmarked : '' |
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.
Instead of returning an empty string if the env if production, I think it should be nil.
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 @julianguyen, some tests seem to fail when I make this change. I had noticed this previously and hence replaced it with an empty string. Is there another way to solve this?
app/helpers/strategies_helper.rb
Outdated
@@ -34,6 +34,7 @@ def strategy_form_inputs(strategy, viewers) | |||
get_viewers_input(viewers, 'strategy', 'strategies', strategy), | |||
build_strategy_comment(strategy), build_strategy_publishing(strategy), | |||
build_strategy_visible(strategy), | |||
Rails.env.development? ? build_strategy_bookmarked(strategy) : '', |
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.
Similar comment as above, let's replace the empty string with nil
.
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.
Solid work! :)
Just one more thing and I think we should be good to merge!
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 work! Looking forward to seeing more PRs for this feature. Thanks for tackling it. It's been on our wishlist for a while now :)
Sure @julianguyen! I agree, this is a feature that a lot of users would like to have! |
That would be great! :) It would be helpful to continue to scope the work based on what @LMulvey had laid things out! |
Description
Added column 'bookmarked: boolean' to Moments and Strategies table.
Created a bookmark toggle on the Moments/Strategies page.
This is a subtask for issue #187
Screenshots
Corresponding Issue
#1580
Reviewing this pull request? Check out our Code Review Practices guide if you haven't already!