Skip to content

Conversation

@JamesDoingStuff
Copy link
Collaborator

@JamesDoingStuff JamesDoingStuff commented Nov 17, 2025

For #52
Couple of things worth mentioning:

  • I added the user-event package to make testing keyboard inputs simpler (fireEvent was too restrictive)
  • To get the NavMenuLink to work with focus I had to use ref forwarding, and to support router links without duplicating code, it now uses the NavLink, but this meant adding ref forwarding to NavLink as well, lest the console fill up with React warnings.

@akademy
Copy link
Member

akademy commented Nov 20, 2025

This looks good.

Just a couple of extra things:

  • You'll have to make it work with react-routes types of links - check out how linkComponent prop is used in NavLink.
  • Probably fits better in the "src/components/navigation" folder.

I'll review it formally after you get the tests created.

@JamesDoingStuff JamesDoingStuff force-pushed the jg/multilevel-menu branch 4 times, most recently from 88ca5c4 to 9f75851 Compare November 28, 2025 09:10
@JamesDoingStuff JamesDoingStuff linked an issue Nov 28, 2025 that may be closed by this pull request
@JamesDoingStuff JamesDoingStuff removed a link to an issue Nov 28, 2025
@JamesDoingStuff JamesDoingStuff marked this pull request as ready for review November 28, 2025 09:27
@JamesDoingStuff JamesDoingStuff self-assigned this Nov 28, 2025
Copy link
Collaborator

@VictoriaBeilsten-Edmands VictoriaBeilsten-Edmands left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and you've handles accessibility well. Just a couple of minor points.

changelog.md Outdated
### Added
- New Progress component based on Diamond Light added.
- New ProgressDelayed component so that the progress isn't shown at all when it's a small wait.
- NavMenu component added for creating dropdown menus in the NavBar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's called Navbar instead of NavBar, but maybe we should change that to be more consistent with the other component names

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good idea. Maybe it makes sense to use NavBar. And there's also AppTitleBar... They both do inherit from Bar... But... It probably shouldn't be FooterBar... BreadcrumbBar?!

Don't know. Happy for someone else to decide...!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it needs to be a requirement for Bar-based components to have 'Bar' in the name and as nice as uniform capitalisation would be, it does seem to be the consensus online that 'navbar' is one word whereas 'app bar', 'title bar' etc. are two. I won't make any changes to it here...


return (
<>
<Button
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can improve accessibility a bit here with aria-haspopup, aria-expanded and aria-controls then link to the menu with id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants