-
Notifications
You must be signed in to change notification settings - Fork 574
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
Improve programmatic state management of UnderlinePanels #5527
Conversation
🦋 Changeset detectedLatest commit: 88d19b6 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 |
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
packages/react/src/experimental/UnderlinePanels/UnderlinePanels.tsx
Outdated
Show resolved
Hide resolved
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
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.
Looks great, thanks! Just one small comment on the UnderlinePanels.Tab story
packages/react/src/experimental/UnderlinePanels/UnderlinePanels.Tab.stories.tsx
Outdated
Show resolved
Hide resolved
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.
This is great. Thank you!
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
packages/react/src/experimental/UnderlinePanels/UnderlinePanels.dev.stories.tsx
Outdated
Show resolved
Hide resolved
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
Closes #4575
Changelog
New
onSelect()
prop to bothUnderlinePanels
andUnderlinePanels.Tab
. This allows users to define a function that gets called when a tab is selected.Changed
UnderlinePanels
to handle updates to tabs and panels within auseEffect()
hook. This ensures that the selected tab is updated when thearia-selected
attribute changes, as well as keeping prop data fresh.Removed
Rollout strategy
Testing & Reviewing
onSelect()
function is called when a tab is clicked + the selected tab can be managed programmatically via updating thearia-selected
propMerge checklist