Skip to content

Move CopyToClipboard to its own component - #1845

Merged
charliepark merged 5 commits into
mainfrom
isolate-copy-to-clipboard-component
Dec 13, 2023
Merged

charliepark merged 5 commits into
mainfrom
isolate-copy-to-clipboard-component

Conversation

@charliepark

@charliepark charliepark commented Dec 9, 2023 •

Copy link
Copy Markdown
Contributor

This is a small refactor, pulling the CopyToClipboard functionality out of Truncate and into its own component so we can re-use it independently, as needed.

There's no change to the current interaction, but here's a recording of it in situ:
https://github.com/oxidecomputer/console/assets/22547/ea7f7a9a-c0cc-44b5-9d67-1b1b29308dfb
[Eh; thought that would just embed the .mov. Sorry for the extra step.]

@vercel

vercel Bot commented Dec 9, 2023 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Dec 13, 2023 5:09pm

@charliepark

Copy link
Copy Markdown
Contributor Author

I want to look at some accessibility affordances we might add to the button / test it out with a screenreader. Will update tomorrow when ready for review.

@charliepark
charliepark marked this pull request as draft December 10, 2023 16:05
className="text-tertiary hover:text-accent-secondary"
onClick={handleCopy}
type="button"
aria-label={hasCopied ? 'Copied' : ariaLabel}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Tested this with VoiceOver on Mac, and it reads the appropriate text in the appropriate state, and live-updates when it changes.

@charliepark
charliepark marked this pull request as ready for review December 11, 2023 18:59
@charliepark
charliepark enabled auto-merge (squash) December 13, 2023 17:13
@charliepark
charliepark merged commit bfd59c0 into main Dec 13, 2023
@charliepark
charliepark deleted the isolate-copy-to-clipboard-component branch December 13, 2023 17:15

This branch was successfully deployed

1 active deployment
Preview — b752f4d6 Deployed Dec 13, 2023 by vercel[bot]
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