-
Notifications
You must be signed in to change notification settings - Fork 16
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
Navigator FE #3522
base: master
Are you sure you want to change the base?
Navigator FE #3522
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.
Very nice!
Seems weird that we care about both the current slug and next slug, feel like we only need to care about one of them, the first incomplete slug (ie current slug) - though I appreciate there's a ton of code using current and next slug!
d89cf9f
to
7926db9
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 work 👏 I like these changes, and it's something that we have been thinking needs to be improved for some time.
I would like to refactor the next_slug
and previous_slug
methods to be more readable/digestible, and of course we'll need to do some testing of the journey scenarios to make sure nothing is broken.
app/forms/check_your_answers_form.rb
Outdated
@@ -1,2 +1,12 @@ | |||
class CheckYourAnswersForm < Form | |||
def save | |||
journey_session.answers.assign_attributes( | |||
skip_check_your_answers: 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.
I think this naming would be clearer:
skip_check_your_answers: true | |
confirm_check_your_answers: 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 is gone now as i realised its no longer needed
app/forms/check_your_answers_form.rb
Outdated
end | ||
|
||
def completed? | ||
journey_session.answers.skip_check_your_answers |
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.
I think this would make the intent clearer
journey_session.answers.skip_check_your_answers | |
journey_session.answers.skip_check_your_answers.present? |
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 gone now as i realised its no longer needed
Context
Notes: