Uh oh!
There was an error while loading. Please reload this page.
chore(_VisuallyHidden): Convert internal component _VisuallyHidden to CSS module styling - #6083
Conversation
🦋 Changeset detectedLatest commit: d83f48e 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.
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
_VisuallyHiddenfromstyled.spanto aBoxWithFallback+ CSS module. - Introduces
_VisuallyHidden.module.csswith 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
_VisuallyHiddencomponent; 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
_VisuallyHiddenchange—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 |
Uh oh!
There was an error while loading. Please reload this page.
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! |
👋 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! |
| interface Props { | ||
| interface Props extends React.ComponentPropsWithoutRef<'span'> { | ||
| isVisible?: boolean | ||
| as?: React.ElementType |
There was a problem hiding this comment.
This component is only used internally, and I verified the only instances pass as="h2"
👋 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! |
Pull Request is not mergeable
… CSS module styling (#6083) Co-authored-by: Josh Black <joshblack@github.com> Co-authored-by: primer[bot] <119360173+primer[bot]@users.noreply.github.com>
Changelog
New
Changed
Convert internal component
_VisuallyHiddento CSS module stylingRemoved
Rollout strategy
Testing & Reviewing
Merge checklist