-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(Nav): added role presentation to NavItemSeparator #11730
base: main
Are you sure you want to change the base?
fix(Nav): added role presentation to NavItemSeparator #11730
Conversation
Preview: https://patternfly-react-pr-11730.surge.sh A11y report: https://patternfly-react-pr-11730-a11y.surge.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just a comment about the TODO.
@@ -188,6 +188,8 @@ export const ToolbarItem: React.FunctionComponent<ToolbarItemProps> = ({ | |||
...props | |||
}: ToolbarItemProps) => { | |||
if (variant === ToolbarItemVariant.separator) { | |||
// TODO: consider removing spread props here so we can update Divider role prop to union of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have an issue for this? Otherwise should we remove this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated some logic to have the union type on the new prop so removed this comment
I'd be in favor of moving to Divider long term |
What: Closes #11717
Opted to not create an interface to expose for NavItemSeparator, as I'm wondering if we should consider deprecating it and just using the Divider component. Right now NavItemSeparator is just a wordier wrapper for Divider, and we're not doing anything special within it. One purpose of keeping this would be to have documentation explicitly about when to set the props to what (assuming we intend for this component to be used as either a separator between NavItems or just anywhere within a Nav; if the intent is only for between NavItems, then we should consider not allowing role or component to be customized).
Additional issues: