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 blocks #1460

Merged
merged 3 commits into from
Apr 21, 2022
Merged

Add copy button to code blocks #1460

merged 3 commits into from
Apr 21, 2022

Conversation

weiglszonja
Copy link
Collaborator

Motivation

Add copy button to code blocks in the documentation.
The button is customised to be always visible but faded (see below), it becomes fully visible when mouse is hovered over.

button_demo

resolves #1458

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Have you checked our Contributing document?
  • Have you ensured the PR clearly describes the problem and the solution?
  • Is your contribution compliant with our coding style? This can be checked running flake8 from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.

@codecov
Copy link

codecov bot commented Apr 21, 2022

Codecov Report

Merging #1460 (df770ba) into dev (d3f9f15) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev    #1460   +/-   ##
=======================================
  Coverage   77.46%   77.46%           
=======================================
  Files          37       37           
  Lines        2733     2733           
  Branches      455      455           
=======================================
  Hits         2117     2117           
  Misses        535      535           
  Partials       81       81           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3f9f15...df770ba. Read the comment docs.

Copy link
Contributor

@oruebel oruebel left a comment

Choose a reason for hiding this comment

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

Looks good to me. That's a really useful feature!

@weiglszonja
Copy link
Collaborator Author

Thanks @oruebel :)

@weiglszonja weiglszonja self-assigned this Apr 21, 2022
@oruebel oruebel merged commit a11cc3f into dev Apr 21, 2022
@oruebel oruebel deleted the enh/add_copy_button branch April 21, 2022 17:23
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.

[Documentation]: add copy button to code blocks
2 participants