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

CircleBadge no longer accepts styled system props #1555

Merged
merged 1 commit into from
Nov 16, 2021

Conversation

jfuchs
Copy link
Contributor

@jfuchs jfuchs commented Nov 2, 2021

This PR updates CircleBadge to no longer accept system props.

See https://github.com/github/primer/issues/296

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@jfuchs jfuchs requested review from colebemis and a team November 2, 2021 22:14
@changeset-bot
Copy link

changeset-bot bot commented Nov 2, 2021

🦋 Changeset detected

Latest commit: 3eac023

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

This PR includes changesets to release 1 package
Name Type
@primer/components 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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2021

size-limit report 📦

Path Size
dist/browser.esm.js 54.2 KB (+0.01% 🔺)
dist/browser.umd.js 54.6 KB (0%)

'@primer/components': major
---

CircleBadge no longer accepts styled-system props. Please use the `sx` prop to extend Primer component styling instead. See also https://primer.style/react/system-props.
Copy link
Contributor

@colebemis colebemis Nov 2, 2021

Choose a reason for hiding this comment

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

Should we link to the sx prop documentation instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's reasonable. Maybe I'll include the system props link also if folks are curious about the migration?

import CircleBadge from '../CircleBadge'

export function passes() {
;<CircleBadge />
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
;<CircleBadge />
return <CircleBadge />


export function shouldNotAcceptSystemProps() {
// @ts-expect-error
;<CircleBadge backgroundColor="thistle" />
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
;<CircleBadge backgroundColor="thistle" />
return <CircleBadge backgroundColor="thistle" />

Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

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

👍 when CI passes

@jfuchs jfuchs changed the base branch from main to next_major November 15, 2021 19:24
@jfuchs jfuchs merged commit d723129 into next_major Nov 16, 2021
@jfuchs jfuchs deleted the jfuchs/circlebadge-props branch November 16, 2021 20:05
jfuchs added a commit that referenced this pull request Nov 22, 2021
* Set up a next_major branch

* Breadcrumbs no longer accepts styled system props (#1469)

* CircleBadge no longer accepts styled system props (#1555)

* FilteredSearch no longer accepts styled system props (#1559)

* FilterList no longer accepts styled system props (#1560)

* FormGroup no longer accepts styled system props (#1562)

* LabelGroup no longer accepts styled system props (#1565)

* Pagination no longer accepts styled system props (#1569)

* Popover no longer accepts styled system props (#1570)

* SideNav no longer accepts styled system props (#1572)

* TabNav no longer accepts styled system props (#1575)

* Timeline no longer accepts styled system props (#1576)

* Truncate no longer accepts styled system props (#1578)

* StateLabel no longer accepts styled system props (#1573)

* Buttons no longer accept styled system props (#1475)

* CounterLabel no longer accepts styled system props (#1557)

* Dropdown no longer accepts styled system props (#1558)

* Flash no longer accepts styled system props (#1561)

* Header no longer accepts styled system props (#1563)

* Label no longer accepts styled system props (#1564)

* Link no longer accepts styled system props (#1566)

* Overlay no longer accepts styled system props (#1567)

* Pagehead no longer accepts styled system props (#1568)

* SelectMenu no longer accepts styled system props (#1571)

* SubNav no longer accepts styled system props (#1574)

* Tooltip no longer accepts styled system props (#1577)

* UnderlineNav no longer accepts styled system props (#1579)

* Fixes some TypeScript errors in the next_major branch (#1621)

* Dialog no longer accepts styled system props (#1615)

* StyledOcticon no longer accepts styled system props (#1616)

* Dialog2 no longer accepts styled system props (#1614)

* Dialog2 no longer accepts styled system props

* Update docs/content/Dialog2.mdx

Co-authored-by: Mike Perrotti <mperrotti@github.com>

Co-authored-by: Mike Perrotti <mperrotti@github.com>

* Version Packages (next) (#1612)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Revert "Version Packages (next) (#1612)" (#1637)

This reverts commit 53f37a4.

* Remove pre.json

Co-authored-by: Mike Perrotti <mperrotti@github.com>
Co-authored-by: GitHub Design Systems Bot <30705008+primer-css@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants