Skip to content
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

[WIP] Service Header component #4950

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from
Draft

Conversation

querkmachine
Copy link
Member

@querkmachine querkmachine commented Apr 22, 2024

Takes the 'Service Header' concept from #4915 and implements it as a standalone component, with the toolbox/dropdown concept removed (at least for now).

For alphagov/govuk-design-system#3748.

Links

Todo

Creating a Service Header component

  • There are a few minor design issues outstanding:
    • The height of the Service Header (on desktop) is different depending on whether there are navigation links present or just a service name.
    • The focus style is positioned differently depending on whether it's a service name link or a navigational link.
    • The mobile layout generally feels a little bit unevenly spaced and could use some tweaking.
  • The injection of <strong> for active links is done a bit haphazardly and needs more consideration as to when it's used and how it's styled.
  • Comprehensive review app examples and associated tests written.
    • Template tests.
    • JS functionality tests.
    • Review app examples added/updated.
  • Readme content written (this can probably be mostly lifted from another component).

Changes to other components

  • Move the <header> tag out of the Header component and into the template. Change no longer being pursued.
  • Adapt the Phase banner to be usable between the Header and Service Header components. Change no longer being pursued.
  • Add 'slots' to the Header and Service Header components.
  • Deprecate the navigation and service name/URL options on the Header component.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@Ciandelle
Copy link

Overall I'm not seeing any glaring issues that concern me. I do wonder if the blue text is something to change based on the working group feedback. Additionally, personally I don't like the layout of the service header with large navigation, it feels too unorganised and I would struggle to find what I'm looking for. I am aware that this may be a complete personal thing, so please don't get caught up on it

@querkmachine
Copy link
Member Author

personally I don't like the layout of the service header with large navigation, it feels too unorganised and I would struggle to find what I'm looking for.

That's entirely fair. This is one of those review app examples which is intended to test the extremes of the component. No one should actually be using that many navigation items in practice, I hope! 🤞

Partially reverts the changes from 2c67ecc

These changes unfortunately broke some other use cases for the Service Header.

After some discussion, we’ve decided that the phase banner will remain in its existing position, rather than trying to include it within the new section, to avoid the complications it introduces.

The separation of the width container and service header container has been retained along with the moved start and end slots.
This reverts commit 8e67b18.
This fixes a few issues identified during testing, all caused by the
`inline-block` approach to inlining these items.

- Removes the extra whitespace from between each list item that
  screwed with the spacing between links and screen readers would
  pointlessly announce.
- Fixes an NVDA issue in Firefox and Chrome <= 124 where it would read
  all of the links as a run-on sentence.
Adds some margin-right to the service name on tablet breakpoint so that the service name and navigation links no longer touch in certain circumstances.

This could happen if the navigation and service name were collectively wide enough to fill the entire horizontal space at the present viewport size.
IE11 is tripping over the use of flex-wrap and is instead presenting all links as a single, horizontally scrolling row.

This commit reverts the use of flexbox on IE11 (and IE10) specifically, falling back to the previous inline-block behaviour. This means that the previous accessibility issues are now present in IE11 again, but having the navigation wrap seems like a higher priority usability issue to address.
@querkmachine

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress 📝
Development

Successfully merging this pull request may close these issues.

Get something working in Frontend
7 participants