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

"Copy to Clipboard" feature for code snippets on docs / guides pages #96

Open
thescientist13 opened this issue Sep 29, 2024 · 0 comments · May be fixed by #120
Open

"Copy to Clipboard" feature for code snippets on docs / guides pages #96

thescientist13 opened this issue Sep 29, 2024 · 0 comments · May be fixed by #120
Assignees
Labels
docs Greenwood specific content like docs and guides enhancement New feature or request fast follow Carryovers from the launch milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Sep 29, 2024

Summary

On many documentation / guides pages, we have code snippets inline that

Screenshot 2024-09-29 at 6 35 56 PM

<!-- src/index.html -->
<!doctype html>
<html>
  <head>
    <title>My Website</title>
    <style>
      h1 {
        color: red;
      }
    </style>
  </head>

  <body>
    <main>
      <h1>Welcome to my website!</h1>
    </main>
  </body>
</html>

Just like on the home page, we should have a copy to clipboard capability for all of these (or at least where it make sense)
Screenshot 2024-09-29 at 6 37 19 PM

Details

Here are examples from other documentation sites for reference, and notice they make a nice little "tab" style for when there is a filename to reference
Screenshot 2024-09-29 at 6 38 56 PM
Screenshot 2024-09-29 at 6 40 04 PM
Screenshot 2024-09-29 at 6 40 57 PM

I should notice that some sites do something a little different for commands / npm scripts, which is something for us to consider as well, but that is just a nice to have
Screenshot 2024-09-29 at 6 38 33 PM


We should also add a basic Storybook and test case to validate the static output at least.

@thescientist13 thescientist13 added the enhancement New feature or request label Sep 29, 2024
@thescientist13 thescientist13 added the good first issue Good for newcomers label Sep 29, 2024
@thescientist13 thescientist13 changed the title copy to clipboard functionality for code snippets on docs / guides pages "Copy to Clipboard" feature for code snippets on docs / guides pages Sep 29, 2024
@thescientist13 thescientist13 removed the good first issue Good for newcomers label Oct 7, 2024
@thescientist13 thescientist13 self-assigned this Oct 20, 2024
@thescientist13 thescientist13 moved this from 🔖 Ready to 🏗 In progress in [Greenwood] Website Redesign and Relaunch Oct 26, 2024
@thescientist13 thescientist13 added the docs Greenwood specific content like docs and guides label Oct 26, 2024
@thescientist13 thescientist13 linked a pull request Oct 26, 2024 that will close this issue
15 tasks
@thescientist13 thescientist13 added the fast follow Carryovers from the launch milestone label Oct 26, 2024
@thescientist13 thescientist13 pinned this issue Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Greenwood specific content like docs and guides enhancement New feature or request fast follow Carryovers from the launch milestone
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

1 participant