Skip to content

Add copy button to code dialog#5336

Merged
OEvgeny merged 6 commits intomicrosoft:mainfrom
compulim:feat-code-dialog-copy-button
Oct 28, 2024
Merged

Add copy button to code dialog#5336
OEvgeny merged 6 commits intomicrosoft:mainfrom
compulim:feat-code-dialog-copy-button

Conversation

@compulim
Copy link
Copy Markdown
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)

Comment thread __tests__/html2/activity/viewCodeButton.html
@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
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