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

Add copy button to code dialog #5336

Merged
merged 6 commits into from
Oct 28, 2024

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Oct 28, 2024

Changelog Entry

Added

Description

Added "Copy code" button to the view code dialog.

Also fixed the dialog width issues.

In short future, we should have Markdown codeblocks rendered in Shiki and the "Copy code" button should go natively in that Shiki-powered component.

Design

Specific Changes

  • Updated view code button to show a dialog with "Copy code" button
  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@compulim compulim changed the title [WIP] Add copy button to code dialog Add copy button to code dialog Oct 28, 2024
@compulim compulim marked this pull request as ready for review October 28, 2024 20:50
@OEvgeny OEvgeny merged commit 4a18bde into microsoft:main Oct 28, 2024
25 checks passed
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