Skip to content

Conversation

@charliepark
Copy link
Contributor

@charliepark charliepark commented Dec 9, 2023

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
Copy link

vercel bot commented Dec 9, 2023

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