-
Notifications
You must be signed in to change notification settings - Fork 730
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
2143 - display bookmarked moments in care plan #2154
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 so much for taking this on! Hope you're well :)
Have some feedback and after that, we should be good to go!
app/javascript/packs/application.js
Outdated
@@ -0,0 +1,18 @@ | |||
/* eslint no-console:0 */ |
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.
Let's delete this file since it's not necessary!
config/webpack/development.js
Outdated
@@ -0,0 +1,5 @@ | |||
process.env.NODE_ENV = process.env.NODE_ENV || 'development' |
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.
Let's also remove this file!
config/webpack/environment.js
Outdated
@@ -0,0 +1,3 @@ | |||
const { environment } = require('@rails/webpacker') |
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.
Let's also remove this file!
config/webpack/production.js
Outdated
@@ -0,0 +1,5 @@ | |||
process.env.NODE_ENV = process.env.NODE_ENV || 'production' |
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.
Let's also remove this file!
config/webpack/test.js
Outdated
@@ -0,0 +1,5 @@ | |||
process.env.NODE_ENV = process.env.NODE_ENV || 'development' |
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.
Let's also remove this file!
spec/requests/care_plan_spec.rb
Outdated
@@ -19,6 +19,17 @@ | |||
expect(response.body).to include(strategy.name) | |||
end | |||
end | |||
|
|||
context 'when there are bookmarked moments' do | |||
let!(:strategy_bm) { create(:strategy, user: user, bookmarked: true) } |
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 test should replace the strategy variables with moment ones!
@julianguyen I have addressed your feedbacks, apologies added some generated files by mistake, removed them now. |
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 the updates! 🎉 One more fix and we should be good to merge!
app/helpers/moments_form_helper.rb
Outdated
@@ -87,7 +87,8 @@ def moment_bookmarked | |||
'bookmarked', 'switch', 'moments.form.bookmarked_question' | |||
).merge( | |||
value: true, uncheckedValue: false, | |||
checked: @moment.bookmarked, dark: true | |||
checked: @moment.bookmarked, dark: true, |
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.
checked: @moment.bookmarked
should be checked: params[:bookmarked] ? true : @moment.bookmarked
so that when you create a Moment from the Care Plan page, it will automatically be 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.
Yeah gotcha, updated now.
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.
Awesome work, thanks so much for taking this on 🎉
Description
Enable ability to bookmark Moments and display them on the Care Plan page
More Details
Corresponding Issue
#2143
Screenshots
Reviewing this pull request? Check out our Code Review Practices guide if you haven't already!