ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

Top navigation not responsive when groups overflow screen width

Open GCHQ-Developer-847 opened this issue 6 months ago • 2 comments

Summary of the bug

When using multiple navigation groups and their width overflows the screen width (at a width larger than when it collapses to a toggle button), the text wraps rather than staying on one line and an ic-horizontal-scroll is not displayed.

🪜 How to reproduce

  1. Go to this StackBlitz.
  2. See that the horizontal scrolling behaviour is not applied.

📸 Screenshots or code

Image

🧐 Expected behaviour

The ic-horizontal-scroll component should be displayed just like it is when using navigation items on their own (without groups), e.g.:

Image

Additional info

Should probably check that the fix also works for if someone is using a combination of navigation groups and navigation items.

GCHQ-Developer-847 avatar Jun 25 '25 18:06 GCHQ-Developer-847

Would be good to check if this occurs outside Stackblitz - we've seen issues with ResizeObserver not working in Stackblitz before. This might be a CSS issue though - do we need to turn off text-wrap on the navGroup items?

GCHQ-Developer-299 avatar Jul 02 '25 09:07 GCHQ-Developer-299

We do advise against having long labels in navigation items on the guidance site, so developers shouldn't be encountering this issue - have moved into Next PI at a lower priority to reflect this

GCHQ-Developer-299 avatar Jul 02 '25 09:07 GCHQ-Developer-299