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(Token): Migrate to CSS modules behind feature flag Pt 2 #5271

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

randall-krauskopf
Copy link
Collaborator

@randall-krauskopf randall-krauskopf commented Nov 13, 2024

Related To: https://github.com/github/primer/issues/4367

This PR is part 2 of breaking apart a larger PR into grokkable parts.

Apologies for the larger PR but there was an odd interplay with the specificity across the various components that made it hard to break this PR into smaller chunks

Copy link

changeset-bot bot commented Nov 13, 2024

🦋 Changeset detected

Latest commit: 635be65

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 Nov 13, 2024
@github-actions github-actions bot temporarily deployed to storybook-preview-5271 November 13, 2024 00:22 Inactive
Copy link
Contributor

github-actions bot commented Nov 13, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 101.52 KB (+0.3% 🔺)
packages/react/dist/browser.umd.js 101.76 KB (+0.32% 🔺)

@github-actions github-actions bot temporarily deployed to storybook-preview-5271 November 13, 2024 00:40 Inactive
@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Nov 13, 2024
@randall-krauskopf
Copy link
Collaborator Author

Integration tests are failing due to the regression that should be fixed soon.

@randall-krauskopf randall-krauskopf marked this pull request as ready for review November 18, 2024 23:16
@randall-krauskopf randall-krauskopf requested a review from a team as a code owner November 18, 2024 23:16
display: block;
}

/* TODO: Remove this once the avatar component is converted to CSS modules */
Copy link
Member

Choose a reason for hiding this comment

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

Avatar is converted #5221

padding-left: var(--base-size-4) !important;
}

.AvatarContainer[data-size='small'] {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.AvatarContainer[data-size='small'] {
.AvatarContainer:where([data-size='small']) {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @jonrohan, I'll get these changes in. Quick question though, why is :where preferred over the bare attribute selector?

Copy link
Member

Choose a reason for hiding this comment

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

Where will reduce the specificity on the attribute selector and make it easier to override the styles in dotcom. We try and add it whenever the attribute lands on the same dom node where we add the passed in className

packages/react/src/Token/AvatarToken.module.css Outdated Show resolved Hide resolved
packages/react/src/Token/AvatarToken.module.css Outdated Show resolved Hide resolved
packages/react/src/Token/AvatarToken.module.css Outdated Show resolved Hide resolved
packages/react/src/Token/TokenBase.module.css Outdated Show resolved Hide resolved
packages/react/src/Token/TokenBase.module.css Outdated Show resolved Hide resolved
packages/react/src/Token/TokenBase.module.css Outdated Show resolved Hide resolved
packages/react/src/Token/TokenBase.module.css Show resolved Hide resolved
packages/react/src/Token/TokenBase.module.css Show resolved Hide resolved
@primer-integration
Copy link

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

@primer-integration
Copy link

🔴 golden-jobs completed with status failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: failing Changes in this PR cause breaking changes in gh/gh
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants