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

[SPIKE] Service Header component #4950

Closed
wants to merge 34 commits into from
Closed

Conversation

querkmachine
Copy link
Member

@querkmachine querkmachine commented Apr 22, 2024

Note

This PR has been superseded by #5206 for the purposes of active development. It is kept open here as reference and for comparison against the new PR.

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.

@querkmachine querkmachine self-assigned this Apr 22, 2024

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! 🤞

@querkmachine querkmachine force-pushed the service-header-component branch from 7f2352d to 5e17d9c Compare April 25, 2024 14:58
@querkmachine querkmachine force-pushed the service-header-component branch from 5e17d9c to 996e8d0 Compare April 25, 2024 15:15
@querkmachine querkmachine force-pushed the service-header-component branch from 996e8d0 to 3089be8 Compare April 26, 2024 09:22
@querkmachine querkmachine force-pushed the service-header-component branch from c2bbbce to d749c56 Compare April 29, 2024 13:37
@querkmachine querkmachine force-pushed the service-header-component branch from d749c56 to a27aa51 Compare April 29, 2024 14:11
@querkmachine querkmachine force-pushed the service-header-component branch from a27aa51 to c124457 Compare April 29, 2024 14:24
@domoscargin domoscargin force-pushed the service-header-component branch from 70f4aa6 to 8e67b18 Compare June 19, 2024 19:47
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 querkmachine force-pushed the service-header-component branch from 65a41cf to 23bd8d9 Compare July 2, 2024 15:51
@querkmachine

This comment was marked as outdated.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4950 July 4, 2024 11:53 Inactive
@querkmachine querkmachine changed the title [WIP] Service Header component [SPIKE] Service Header component Aug 8, 2024
@querkmachine querkmachine mentioned this pull request Aug 8, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done 🏁
Development

Successfully merging this pull request may close these issues.

Get something working in Frontend
7 participants