Skip to content

StateLabel: Add open and closed states for no icon cases - #5803

Merged
joshblack merged 8 commits into
mainfrom
broccolinisoup/state-label-open-closed
Mar 31, 2025
Merged

StateLabel: Add open and closed states for no icon cases#5803
joshblack merged 8 commits into
mainfrom
broccolinisoup/state-label-open-closed

Conversation

@broccolinisoup

@broccolinisoupbroccolinisoup commented Mar 21, 2025

Copy link
Copy Markdown
Member

For milestone open and closes states, we need a variant of the StateLabel without an icon. After talking (GitHub staff only link) with @mperrotti and @emilybrick, they gave me a 👍🏻 to add two new states open and closed for cases that do not need/have an icon.

Changelog

New

  • Add open state
  • Add closed state

Changed

Removed

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

@changeset-bot

changeset-botBot commented Mar 21, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 65160e3

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-actionsgithub-actionsBot added the staff Author is a staff member label Mar 21, 2025
@broccolinisoupbroccolinisoup changed the title StateLabel: Add open and closed states for no icon casesStateLabel: Add open and closed states for no icon casesMar 21, 2025
@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 Mar 21, 2025
@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-actions

github-actionsBot commented Mar 21, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js105.65 KB (+0.09% 🔺)
packages/react/dist/browser.umd.js105.92 KB (-0.01% 🔽)

Comment thread.changeset/nine-apes-change.md Outdated
@github-actions
github-actionsBot requested a deployment to storybook-preview-5803 March 21, 2025 04:40 Abandoned
export const Unavailable = () => <StateLabel status="unavailable">Unavailable</StateLabel>
export const Open = () => (
<StateLabel status="open">
{/* Because open is a generic status, a visually hidden text could be added to specify the type of the artifact */}

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

This is optional - I am happy to remove it if you think it is unnecessary or confusing.

@broccolinisoupbroccolinisoup added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Mar 21, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-5803 March 21, 2025 04:54 Inactive
@github-actionsgithub-actionsBot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Mar 21, 2025
@broccolinisoup
broccolinisoup marked this pull request as ready for review March 21, 2025 05:07
@broccolinisoup
broccolinisoup requested review from a team as code ownersMarch 21, 2025 05:07
@github-actions
github-actionsBottemporarily deployed to storybook-preview-5803 March 21, 2025 05:10 Inactive
@github-actions
github-actionsBottemporarily deployed to storybook-preview-5803 March 21, 2025 06:10 Inactive
@joshblack

Copy link
Copy Markdown
Member

@broccolinisoup

Copy link
Copy Markdown
MemberAuthor

@broccolinisoup seems like the AAT failures are coming from color contrast: https://primer-d5758f4231-13348165.drafts.github.io/aat-no-flag/#?testId=9a7338b81aa38bfd83ad-792f1d5d04241e89b7e1&q=s:failed 👀

Thanks @joshblack !! I added the "open" story to color contrast skip list.

@github-actions
github-actionsBot requested a deployment to storybook-preview-5803 March 25, 2025 10:13 Abandoned
@broccolinisoup
broccolinisoup added this pull request to the merge queueMar 25, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-5803 March 25, 2025 10:28 Inactive
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Mar 25, 2025
@joshblack

Copy link
Copy Markdown
Member

@broccolinisoup just wanted to double-check, is that story expected to fail contrast checks?

@broccolinisoup

Copy link
Copy Markdown
MemberAuthor

@broccolinisoup just wanted to double-check, is that story expected to fail contrast checks?

@joshblack I believe so—at least if the issueOpened variant is still expected to fail the contrast check. The new open status uses the same colors as issueOpened, just without an icon. Let me know if I’m missing anything.

@github-actions
github-actionsBottemporarily deployed to storybook-preview-5803 March 27, 2025 02:58 Inactive
@joshblack
joshblack added this pull request to the merge queueMar 31, 2025
Merged via the queue into main with commit 9c135c4Mar 31, 2025
@joshblack
joshblack deleted the broccolinisoup/state-label-open-closed branch March 31, 2025 17:08
@primerprimerBot mentioned this pull request Mar 31, 2025
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/tdmpakpmstaffAuthor is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@broccolinisoup@joshblack