Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

feat(integration): adding "copy to clipboard" button to all code blocks #23

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Nelwhix
Copy link

@Nelwhix Nelwhix commented Oct 9, 2023

PR to fix Issue #19

@DominusKelvin DominusKelvin self-requested a review October 10, 2023 10:26
Copy link
Contributor

@DominusKelvin DominusKelvin left a comment

Choose a reason for hiding this comment

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

Hey @Nelwhix great job on this PR. So I noticed we'd have to use a client side component and have to wrap any code block with it. I think what would be more interesting is to find a way to add the copy button without touching the rendering of the code.

I find this article on the subject quite interesting

https://timneubauer.dev/blog/copy-code-button-in-astro/

Also I noticed with your current implementation, some of the code blocks now look like this

CleanShot 2023-10-10 at 11 27 56

@Nelwhix
Copy link
Author

Nelwhix commented Oct 10, 2023

Hey @Nelwhix great job on this PR. So I noticed we'd have to use a client side component and have to wrap any code block with it. I think what would be more interesting is to find a way to add the copy button without touching the rendering of the code.

I find this article on the subject quite interesting

https://timneubauer.dev/blog/copy-code-button-in-astro/

Also I noticed with your current implementation, some of the code blocks now look like this

CleanShot 2023-10-10 at 11 27 56

Okay I will check the article and revert

@Nelwhix
Copy link
Author

Nelwhix commented Oct 10, 2023

@DominusKelvin review again, I think it could use better icons though

@Nelwhix Nelwhix changed the title feat(integration): add copy button to Go and PHP code blocks feat(integration): adding "copy to clipboard" button to all code blocks Oct 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants