Skip to content
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

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

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

randall-krauskopf
Copy link
Collaborator

@randall-krauskopf randall-krauskopf commented Oct 29, 2024

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

Copy link

changeset-bot bot commented Oct 29, 2024

🦋 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
Name Type
@primer/react Minor

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

Copy link
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-actions github-actions bot 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-actions bot temporarily deployed to storybook-preview-5193 October 29, 2024 21:37 Inactive
Copy link
Contributor

github-actions bot commented Oct 29, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 97.24 KB (-0.01% 🔽)
packages/react/dist/browser.umd.js 97.57 KB (+0.07% 🔺)

@github-actions github-actions bot temporarily deployed to storybook-preview-5193 October 30, 2024 13:24 Inactive
@randall-krauskopf randall-krauskopf changed the title Migrate VisuallyHidden to CSS Modules feat(Spinner): Convert VisuallyHidden to CSS module behind feature flag Oct 30, 2024
@randall-krauskopf randall-krauskopf changed the title feat(Spinner): Convert VisuallyHidden to CSS module behind feature flag feat(VisuallyHidden): Convert VisuallyHidden to CSS module behind feature flag Oct 30, 2024
@primer-integration
Copy link

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

@primer-integration
Copy link

🟢 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 owner October 30, 2024 14:43
Copy link
Member

@joshblack joshblack left a comment

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 🔥

@@ -12,17 +19,34 @@ import sx from '../sx'
*
* @see https://www.scottohara.me/blog/2023/03/21/visually-hidden-hack.html
*/
export const VisuallyHidden = styled.span<SxProp>`
Copy link
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
Collaborator Author

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 queue Oct 30, 2024
Merged via the queue into main with commit ed3d8c1 Oct 30, 2024
45 checks passed
@randall-krauskopf randall-krauskopf deleted the visually-hidden-css-modules branch October 30, 2024 16:54
@primer primer bot mentioned this pull request Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This 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