Skip to content

feat(VisuallyHidden): Convert VisuallyHidden to CSS module behind feature flag - #5193

Merged
randall-krauskopf merged 3 commits into
mainfrom
visually-hidden-css-modules
Oct 30, 2024
Merged

feat(VisuallyHidden): Convert VisuallyHidden to CSS module behind feature flag#5193
randall-krauskopf merged 3 commits into
mainfrom
visually-hidden-css-modules

Conversation

@randall-krauskopf

@randall-krauskopfrandall-krauskopf commented Oct 29, 2024

Copy link
Copy Markdown
Contributor

Related To: https://github.com/github/primer/issues/4368
Closes: https://github.com/github/primer/issues/4368

Changelog

Changed

Convert VisuallyHidden component to css module behind feature flag

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

@changeset-bot

changeset-botBot commented Oct 29, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 04dd885

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
@primer/reactMinor

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

@github-actions

Copy link
Copy Markdown
Contributor

👋 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!

@github-actionsgithub-actionsBot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 29, 2024
@github-actions
github-actionsBottemporarily deployed to storybook-preview-5193 October 29, 2024 21:37 Inactive
@github-actions

github-actionsBot commented Oct 29, 2024

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js97.24 KB (-0.01% 🔽)
packages/react/dist/browser.umd.js97.57 KB (+0.07% 🔺)

@github-actions
github-actionsBottemporarily deployed to storybook-preview-5193 October 30, 2024 13:24 Inactive
@randall-krauskopfrandall-krauskopf changed the title Migrate VisuallyHidden to CSS Modulesfeat(Spinner): Convert VisuallyHidden to CSS module behind feature flagOct 30, 2024
@github-actions
github-actionsBottemporarily deployed to storybook-preview-5193 October 30, 2024 13:58 Inactive
@randall-krauskopfrandall-krauskopf changed the title feat(Spinner): Convert VisuallyHidden to CSS module behind feature flagfeat(VisuallyHidden): Convert VisuallyHidden to CSS module behind feature flagOct 30, 2024
@primer-integration

Copy link
Copy Markdown

👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/349259

@primer-integration

Copy link
Copy Markdown

🟢 golden-jobs completed with status success.

@randall-krauskopf
randall-krauskopf marked this pull request as ready for review October 30, 2024 14:43
@randall-krauskopf
randall-krauskopf requested a review from a team as a code ownerOctober 30, 2024 14:43

@joshblackjoshblack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just left a comment in case it's helpful info. I think you're totally good to go though since integration checks passed 🔥

*
* @see https://www.scottohara.me/blog/2023/03/21/visually-hidden-hack.html
*/
export const VisuallyHidden = styled.span<SxProp>`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to share in case it was helpful (and feel free to ignore me if this is obvious 😂), when migrating styled components that are exported two helpful things I've found to double-check check are the as prop and ref support.

When we update these kinds of components these don't come along and they may be used downstream. It's hard to tell if these are breaking changes or not so I think we've been evaluating it by seeing if they are used this way in dotcom when updating.

Thankfully the integration tests tend to do a good job of double-checking this, also feel free to use Primer Query (e.g. this link, if you need to login then you'll have to click the link again since query params aren't persisted 😅)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the reminder. I'll definitely add this to my routine on components moving forward!

@randall-krauskopf
randall-krauskopf added this pull request to the merge queueOct 30, 2024
Merged via the queue into main with commit ed3d8c1Oct 30, 2024
@randall-krauskopf
randall-krauskopf deleted the visually-hidden-css-modules branch October 30, 2024 16:54
@primerprimerBot mentioned this pull request Oct 30, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommendedThis change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@randall-krauskopf@joshblack