-
Notifications
You must be signed in to change notification settings - Fork 11
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
Time format check answers #4394
Conversation
Looks good from a content POV @sarahcrack |
@sarahcrack I've just discussed with @Sarah-DfE and if possible, we'd suggest the following changes:
Happy to discuss if this is not possible! |
app/helpers/answer_helper.rb
Outdated
@@ -6,9 +6,18 @@ def format_answer(answer) | |||
when Date | |||
answer = answer.to_formatted_s(:govuk_date) | |||
when Time | |||
answer = answer.in_time_zone.to_formatted_s(:govuk_time) | |||
end | |||
formatted_time = answer.in_time_zone.to_formatted_s(:govuk_time_with_period) |
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.
do the case test before casting the time to a format
…allback_time and retrieve the label/time slot to display on the check answers page
…or the time being
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
@sarahcrack I've retested this and I don't think it is quite working re Midday is being displayed based on London time, rather than using the time zone where the user is eg
Same happens for other time zones:
Which means that Let's discuss whether it is worth looking at this further or not before you do anything! |
Review app deployed to https://get-into-teaching-app-review-4394.test.teacherservices.cloud |
Quality Gate passedIssues Measures |
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.
Rested successfully - midday and midnight are now displayed for local time, not just for UTC
I have found a separate bug re the date displayed when midnight is chosen in a local time zone, but as this is already in production, I'll put a ticket in the backlog about this
Happy for this one to be merged after a tech review
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
Trello card
https://trello.com/c/vSQni4QV/6962-change-time-formats-on-check-answers-page-in-adviser-funnel-on-git
Context
Whilst reviewing the adviser funnel as part of the move to GIT, a few minor improvements were noticed. One of these concerns the time format used on the check answers page (/teacher-training-adviser/sign_up/review_answers) for callback bookings. The time format should be e.g. 5:30pm.
Changes proposed in this pull request
AnswerHelper
to format times with:govuk_time_with_period
.AnswerHelper
converts to midday and midnight as per GDS guidance.AnswerHelper
test.Guidance to review