Skip to content

Conversation

@ThiagoBussola
Copy link

@ThiagoBussola ThiagoBussola commented Sep 1, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Docs
  • Other... Please describe:

What is the current behavior?

Currently in the documentation there is no button to copy code snippets to the clipboard.

Issue Number: #2332

What is the new behavior?

Added a new button to copy code snippets to the clipboard

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Co-authored-by: Guilherme Siquinelli [email protected]

add a copy button in code block

Co-authored-by: Guilherme Siquinelli <[email protected]>
changing clipboard button and changing copied text to icon
const filename = text.slice(startIndex + 1, endIndex);
return (
`
<app-copy-button>
Copy link
Member

Choose a reason for hiding this comment

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

Should we show the copy button for code snippets that don't have the filename specified?

Example:

image

I would think so

Copy link
Author

Choose a reason for hiding this comment

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

I agree, copy button for code snippets without filenames would improve usability. Let’s go ahead with this change!

@kamilmysliwiec kamilmysliwiec merged commit 4ba57cf into nestjs:master Oct 17, 2024
5 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.

3 participants