You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
↑ Browser tests cover copy outcomes, stale overlapping writes, unmount, accessible description, keyboard use, and variant foreground colors (16/16). ↑ Primary and danger color tests fail without the CSS fix. ↑ Build, type-check, ESLint, Stylelint, Prettier, and 3/3 clipboard accessibility e2e tests passed locally. ↑ Latest Copilot review reports no open issues. ↑ All 40 CI checks passed on this revision. ↓ No visual regression baselines were added; new experimental APIs have no downstream usage yet.
Add reusable clipboard copying APIs with accessible success and failure feedback.
Changelog
New
Experimental CopyToClipboardButton, useCopyToClipboard, and copyText.
Confirm successful writes, report failures, and preserve the button's accessible name.
Changed
Removed
Rollout strategy
Opt-in experimental exports; no existing APIs change.
Testing & Reviewing
Copy with each variant: default and invisible show success or failure colors, while primary and danger keep their contrasting foreground.
👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The outcome colors override the primary button’s contrasting foreground, leaving the success checkmark at only 1.12:1 contrast against its green background and making confirmation difficult to see.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Preserve contrasting foreground for primary outcome buttons
The outcome colors also override the foreground for variant="primary", while ButtonBase keeps its green primary background. For example, the success checkmark becomes #1a7f37 on #1f883d in the light theme—only 1.12:1 contrast—making the confirmation difficult to see. Preserve the primary variant's contrasting foreground instead of applying these semantic foreground colors to it.
Limit success and failure colors to the default and invisible variants so
primary and danger buttons keep their contrasting foregrounds.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
e1693661b965583c3147eb44a2335361a0a7909d↑ Primary and danger color tests fail without the CSS fix.
↑ Build, type-check, ESLint, Stylelint, Prettier, and 3/3 clipboard accessibility e2e tests passed locally.
↑ Latest Copilot review reports no open issues.
↑ All 40 CI checks passed on this revision.
↓ No visual regression baselines were added; new experimental APIs have no downstream usage yet.
Add reusable clipboard copying APIs with accessible success and failure feedback.
Changelog
New
CopyToClipboardButton,useCopyToClipboard, andcopyText.Changed
Removed
Rollout strategy
Opt-in experimental exports; no existing APIs change.
Testing & Reviewing
Copy with each
variant: default and invisible show success or failure colors, while primary and danger keep their contrasting foreground.