-
Notifications
You must be signed in to change notification settings - Fork 10
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
New header and primary navigation for candidate support and provider #10261
Conversation
60d47b5
to
4b3bb18
Compare
4b3bb18
to
b3b2dbb
Compare
end | ||
end | ||
|
||
def one_login_svg |
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 copied straight from the one login header component https://github.com/govuk-one-login/service-header
With minor changes to make it fit in our header, the width and height are reduced
items_right: [NavigationItems::NavigationItem.new('Sign out', sign_out_path)], | ||
)) %> | ||
<% end %> | ||
<%= render( |
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.
The changes in this file are mostly to switch to using govuk_service_navigation
instead of PrimaryNavigationComponent
And changing the HeaderComponent
params, we don't need a service name or product name
candidate_interface_application_offer_dashboard_path, | ||
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.
The logic in this file is the same, just changed the format to allow us to use govuk-service-navigation
app/helpers/navigation_items.rb
Outdated
items = [] | ||
|
||
if FeatureFlag.active?(:one_login_candidate_sign_in) && !OneLogin.bypass? | ||
items << NavigationItem.new("GOV.UK One Login #{one_login_svg}".html_safe, ENV['GOVUK_ONE_LOGIN_ACCOUNT_URL'], false) |
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 didn't find another way to pass the SVG to the govuk-service-navigation so we have to call html_safe here with a string of the svg
b3b2dbb
to
6298e93
Compare
6298e93
to
da37300
Compare
da37300
to
9b3abc4
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.
I've tested on qa and it seems fine! nice work
With the introduction of one login and the fact that we need a new header and primary navigation for the candidate path, to allow the candidate to manage their one login account. We decided to implement the header and primary navigation for our other users. providers and support as well as candidates. I have not changed these components for our api users. The content that's already there needs a bit more work before, I think. This should show the GOV.UK One Login account link for candidates if the one login feature is enabled.
9b3abc4
to
5684c9e
Compare
Context
New header design proposed
With the introduction of one login and the fact that we need a new
header and primary navigation for the candidate path, to allow the
candidate to manage their one login account.
We decided to implement the header and primary navigation for our other users.
providers and support as well as candidates.
I have not changed these components for our api users. The content
that's already there needs a bit more work before, I think.
This should show the GOV.UK One Login account link for candidates if the
one login feature is enabled.
I could have gone down the rabbit hole of refactoring the code for our headers.
I think we can really simplify how we do them but I don't think this is the PR/ticket to do it.
Changes proposed in this pull request
_header.html.erb partial
navigation helper
CSS changes to allow the govuk components to align links on the right
Specs to accommodate the new header
Guidance to review
Screencast.2025-01-15.10.36.25.mp4
Go onto QA or review and please have a look at the header and the primary navigation at the top for all our users. Candidate, Provider, Support.
Bonus points if you change your one login account password and try to login again.
Link to Trello card
https://trello.com/c/weh5myMB
Things to check