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

Badges aren't visible on top nav navigation buttons on small screens #3098

Closed
GCHQ-Developer-847 opened this issue Jan 27, 2025 · 1 comment
Assignees
Labels
component: ic-top-navigation The generic component, includes both the web component and the React component
Milestone

Comments

@GCHQ-Developer-847
Copy link
Contributor

Summary of the bug

On a top nav on a small screen, any badges that have been added to navigation buttons are not visible.

🪜 How to reproduce

  1. View a top nav component which has badges on its navigation buttons (e.g. StackBlitz)
  2. Make the screen smaller so that the navigation items and buttons collapse into a menu
  3. With the menu expanded, see that the badge is not visible at all

📸 Screenshots or code

Badge is visible on a larger screen e.g.:

But then you can't see it anywhere where you make the screen smaller (see the "Notifications" button):

🧐 Expected behaviour

The badge should move to the inline position when on a small screen (e.g. like the badge in this tabs Storybook example).

📝 Acceptance Criteria

Given there is a top navigation on a page with a navigation button that has a badge on it
When I make the screen smaller and expand the navigation menu
Then the badge should be visible and displayed in the "inline" position

Additional info

Similar to #3079.

I think the position prop on ic-badge should be overridden to always be "inline" when on a small screen (because allowing the "near" and "far" positions would mean the badge is cut off at the side of the screen).

@MI6-255
Copy link
Contributor

MI6-255 commented Jan 29, 2025

Will need to be fixed in v2 and v3

@MI6-255 MI6-255 moved this from In Refinement to Ready for dev in Intelligence Community Design System Jan 30, 2025
@gd2910 gd2910 self-assigned this Feb 6, 2025
@gd2910 gd2910 moved this from Ready for dev to Dev In Progress in Intelligence Community Design System Feb 6, 2025
@gd2910 gd2910 moved this from Dev In Progress to In Review in Intelligence Community Design System Feb 11, 2025
@gd2910 gd2910 moved this from In Review to Done in Intelligence Community Design System Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ic-top-navigation The generic component, includes both the web component and the React component
Projects
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants