-
Notifications
You must be signed in to change notification settings - Fork 609
chore(_VisuallyHidden): Convert internal component _VisuallyHidden to CSS module styling #6083
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 9e02a81 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 📦
|
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.
Pull Request Overview
This PR replaces the styled‐component implementation of the internal _VisuallyHidden
component with a CSS module and updates snapshots to use the new InternalVisuallyHidden
class.
- Migrates
_VisuallyHidden
fromstyled.span
to aBoxWithFallback
+ CSS module. - Introduces
_VisuallyHidden.module.css
with the visually‐hidden styles. - Regenerates snapshots across several components to reference the new CSS class.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/react/src/_VisuallyHidden.tsx | Replaced styled‐component implementation with CSS module and BoxWithFallback . |
packages/react/src/_VisuallyHidden.module.css | New CSS module defining the .InternalVisuallyHidden styles. |
packages/react/src/Token/tests/snapshots/Token.test.tsx.snap | Updated snapshot spans to use InternalVisuallyHidden class. |
packages/react/src/TextInput/snapshots/TextInput.test.tsx.snap | Updated snapshot spans to use InternalVisuallyHidden class. |
packages/react/src/CircleBadge/snapshots/CircleBadge.test.tsx.snap | Snapshot class names updated (unrelated styled-component change). |
.changeset/smooth-steaks-hug.md | Adds a changeset for the minor version bump. |
Comments suppressed due to low confidence (3)
packages/react/src/_VisuallyHidden.tsx:19
- [nitpick] There are no unit tests covering the new
_VisuallyHidden
component; consider adding tests for both visible and hidden states to ensure the CSS module is applied correctly.
<BoxWithFallback as={as} className={clsx(...
packages/react/src/_VisuallyHidden.tsx:11
- You reference React.ElementType and React.HTMLAttributes but never import React; please add
import React from 'react'
orimport type {React} from 'react'
to satisfy the type usage.
function VisuallyHidden({
packages/react/src/CircleBadge/snapshots/CircleBadge.test.tsx.snap:5
- [nitpick] These CircleBadge snapshot updates seem unrelated to the
_VisuallyHidden
change—you may want to verify they’re intentional or revert to avoid introducing noisy snapshot diffs.
class="sc-fUnMCh kvrJCk"
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/379060 |
🟢 golden-jobs completed with status |
Co-authored-by: Josh Black <joshblack@github.com>
👋 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! |
Co-authored-by: Josh Black <joshblack@github.com>
👋 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! |
Changelog
New
Changed
Convert internal component
_VisuallyHidden
to CSS module stylingRemoved
Rollout strategy
Testing & Reviewing
Merge checklist