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(LabelGroup): Remove sxProp #5425

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

Conversation

JelloBagel
Copy link
Contributor

@JelloBagel JelloBagel commented Dec 12, 2024

Changelog

New

Add DeprecatedSxProp interface for future deprecated sx components

Changed

Convert Box to div

Removed

Remove SxProp from LabelGroup because there are no results on Primer Query: https://primer-query.githubapp.com/?attribute=%22sx%22&name=labelgroup

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

Merge checklist

Copy link

changeset-bot bot commented Dec 12, 2024

🦋 Changeset detected

Latest commit: 48a5d19

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 Major

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 Dec 12, 2024
@github-actions github-actions bot temporarily deployed to storybook-preview-5425 December 12, 2024 17:48 Inactive
Copy link
Contributor

github-actions bot commented Dec 12, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 103.3 KB (+0.1% 🔺)
packages/react/dist/browser.umd.js 103.65 KB (+0.04% 🔺)

@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT 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 Dec 12, 2024
@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 Dec 12, 2024
Copy link
Contributor

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

@JelloBagel JelloBagel changed the title feat(LabelGroup): Deprecate Sxprop feat(LabelGroup): Remove Sxprop Dec 12, 2024
@github-actions github-actions bot temporarily deployed to storybook-preview-5425 December 12, 2024 19:27 Inactive
@github-actions github-actions bot removed the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Dec 12, 2024
Copy link
Contributor

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

@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 Dec 12, 2024
@github-actions github-actions bot temporarily deployed to storybook-preview-5425 December 12, 2024 19:43 Inactive
@github-actions github-actions bot removed the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Dec 12, 2024
@JelloBagel JelloBagel marked this pull request as ready for review December 12, 2024 20:10
@JelloBagel JelloBagel requested a review from a team as a code owner December 12, 2024 20:10
@JelloBagel JelloBagel requested a review from mperrotti December 12, 2024 20:10
@@ -29,6 +29,11 @@ export interface SxProp {
sx?: BetterSystemStyleObject
}

export interface DeprecatedSxProp {
Copy link
Contributor Author

@JelloBagel JelloBagel Dec 12, 2024

Choose a reason for hiding this comment

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

Adding DeprecatedSxProp for other components to use in the batch: https://github.com/github/primer/issues/4261

cc: @lindseywild

@JelloBagel JelloBagel changed the title feat(LabelGroup): Remove Sxprop feat(LabelGroup): Remove sxProp Dec 13, 2024
Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

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

Maybe Stack won't work very well here, I'm not really sure. If we keep the classes could we rename them to be more specific like how we write component CSS elsewhere? I know these are generated but just thinking it could be cleaner for this case to be named 😄 this is nitpicky and not blocking

Comment on lines 135 to 136
<div className={classes.Div_0} style={{width: overlayWidth, padding: `${overlayPaddingPx}px`}}>
<div className={classes.Div_1}>{children}</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<div className={classes.Div_0} style={{width: overlayWidth, padding: `${overlayPaddingPx}px`}}>
<div className={classes.Div_1}>{children}</div>
<Stack align="start" style={{width: overlayWidth, padding: `${overlayPaddingPx}px`}}>
<StackItem><Stack wrap="wrap" gap="condensed">{children}</Stack></StackItem>

I guess condensed is 8px, though 🤷

packages/react/src/LabelGroup/LabelGroup.tsx Outdated Show resolved Hide resolved
packages/react/src/LabelGroup/LabelGroup.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

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

@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 Dec 13, 2024
@JelloBagel
Copy link
Contributor Author

JelloBagel commented Dec 13, 2024

@langermank let me know what you think of the new classnames (naming is hard 😅): a32da29. I'll test replacing the div with Stack in a separate PR.

Since removing sx is intended for the next major per slack (hubbers only), I replaced the div with Stack here: 9d1757d

@github-actions github-actions bot removed the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Dec 13, 2024
@github-actions github-actions bot temporarily deployed to storybook-preview-5425 December 13, 2024 17:21 Inactive
@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 Dec 13, 2024
Copy link
Contributor

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

@github-actions github-actions bot added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Dec 13, 2024
Copy link
Contributor

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

@primer-integration
Copy link

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

@primer-integration
Copy link

🟢 golden-jobs completed with status success.

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

Successfully merging this pull request may close these issues.

2 participants