Uh oh!
There was an error while loading. Please reload this page.
feat: remove sx prop from Announce, AriaAlert, AriaStatus - #6806
Conversation
🦋 Changeset detectedLatest commit: ac61422 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
There was a problem hiding this comment.
Pull Request Overview
This PR removes the sx prop from live region helper components (Announce, AriaAlert, AriaStatus) as part of transitioning away from styled components. The changes introduce a new polymorphic props helper to ease the migration from Box/styled components while maintaining type safety and component functionality.
Key changes:
- Removes
sxprop support from live region components - Introduces new
PolymorphicPropstype helper for better polymorphic component handling - Refactors component type definitions to use the new polymorphic pattern
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/react/src/live-region/Announce.tsx | Replaces Box component with polymorphic implementation, removes sx prop support |
packages/react/src/live-region/AriaAlert.tsx | Updates type definitions to use new PolymorphicProps helper, removes sx prop |
packages/react/src/live-region/AriaStatus.tsx | Updates type definitions to use new PolymorphicProps helper, removes sx prop |
packages/react/src/live-region/__tests__/Announce.test.tsx | Removes test case for sx prop functionality |
.changeset/spotty-colts-hear.md | Documents breaking change for major version release |
👋 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 📦
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/2367 |
🟢 ci completed with status |
Uh oh!
There was an error while loading. Please reload this page.
Closes#6783
Closes#6782
Closes#6781
Remove the
sxprop from our live region helper components. Also refactors our polymorphic types to (hopefully) make this transition from styled component wrappers (or Box components) easier 🤞Changelog
New
Changed
Removed
sxprop fromAnnounce,AriaAlert,AriaStatusRollout strategy
There is no
sxusage downstream so we can safely rollout this breaking change 🚀