-
Notifications
You must be signed in to change notification settings - Fork 598
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
Add expand to NavList
#4686
base: main
Are you sure you want to change the base?
Add expand to NavList
#4686
Conversation
🦋 Changeset detectedLatest commit: c94d612 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
trailingVisual?: Icon | string | ||
leadingVisual?: Icon | string | ||
trailingAction?: ActionListTrailingActionProps | ||
'data-expand-focus-target'?: string |
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 would love to not have to express this in GroupItems
, as we don't want consumers adding this data-*
attribute themselves. The only reason I have it here is so TS doesn't yell at me for adding it in itemArr['data-expand-focus-target'] = focusTarget
.
const teamEnabled = useFeatureFlag('primer_react_css_modules_team') | ||
const staffEnabled = useFeatureFlag('primer_react_css_modules_staff') |
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.
Have to utilize this to account for both ActionList
and NavList
FFs.
@joshblack, should be ready for another review! I moved towards the data API that you suggested, and it seems to work great! Let me know if you have any suggestions or ways to improve it! 😁 |
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.
Congrats on putting this together! Just left a comment but approving since it's non-blocking 👍
Co-authored-by: Josh Black <joshblack@github.com>
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/363691 |
🟢 golden-jobs completed with status |
Adds new component
NavList.ShowMoreItem
, allows native support for "expanding" content within aNavList
.Closes https://github.com/github/primer/issues/2637
Proposed API
Basic example:
Multiple expands:
Group example (storybook)
Changelog
New
NavList.ShowMoreItem
Rollout strategy
Testing & Reviewing
Merge checklist