-
Notifications
You must be signed in to change notification settings - Fork 377
chore(Navigation): convert examples to TypeScript #7597
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
chore(Navigation): convert examples to TypeScript #7597
Conversation
|
Preview: https://patternfly-react-pr-7597.surge.sh A11y report: https://patternfly-react-pr-7597-a11y.surge.sh |
This seems like a wise, modular idea. The more we can decouple the complex logic for flyouts (and drilldown) from the heart of these very important components, the easier that feels for maintainability. |
7c8ba90 to
0fe7625
Compare
wise-king-sullyman
left a 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.
It all looks good, but I'm a bit curious about your removal of the expandable w/ subnav titles example.
Do you think the demonstration of that prop is just wholly unnecessary?
When I originally removed it, it was mainly because the way the example was originally setup, the demonstration of the prop seemed unnecessary. Looking again, the example could be added back in I think if we more properly demonstrate the usage of the So I think ultimately it may depend on:
|
|
@thatblindgeye from testing it I think the real value of As far as needing an example for it or not I think the example does provide some value, but I wouldn't be against just adding it into the normal expandable nav demo. I do think it would be good to demonstrate it in some way though. @nicolethoen @tlabaj do you all have any thoughts on the topic / any context on it Eric and I might be lacking? |
|
@wise-king-sullyman @thatblindgeye I don't have any extra context on Nav or it's history. I don't feel attached to the example, so if we can demonstrate the value of the |
|
So I'm not sure about the history of the prop either, but I reached out to @jgiardino to see if she could provide any additional insight. Looking at the example, it seems like the hidden heading is there to provide some kind of additional context that might already be obvious to sighted users? |
That's what it seems like. I could possibly see a use-case for this prop of passing in additional info for an expandable group if it would result in the expandable title being too long, but at that point I would imagine such info shouldn't be visually hidden for only assistive tech. Otherwise I'm in the same boat as Nicole in not being able to see a use-case. |
|
Yeah, I agree. I checked in with Jenn as well, and she wasn't sure where the requirements for
So I think it's probably ok to remove that example for now unless we can come up with an example that demonstrates the prop in a useful way. |
tlabaj
left a 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.
LGTM
wise-king-sullyman
left a 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.
🚀
What: Closes #7583
Navigation preview build
I removed the "Expandable (w/subnavigation titles)" example as the only difference between it and the "Expandable" example looked to just be the
srTextprop being passed in.For the Flyout example, I passed in
nullas the children for the initialcurFlyoutdefinition, as TS throws an error about "Property 'children' is missing in type '{ depth: number; }' but required in type '{ depth: any; children: any; }'". We could also pass in another menu here to act as the last menu of the flyout chain, or do something similar to the Drilldown example and move some of theFlyoutMenucode outside of the exportedNavFlyoutcomponent and create an interface for its props.Additional issues: