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

Disable selection of glyph for copying and pasting? #4

Open
andrewheiss opened this issue Jun 15, 2023 · 4 comments
Open

Disable selection of glyph for copying and pasting? #4

andrewheiss opened this issue Jun 15, 2023 · 4 comments
Assignees
Labels
Difficulty: [2] Intermediate Priority: [1] Low Type: Enhancement 💡 Issues related to enhancements, improvements, new features, or new analyses

Comments

@andrewheiss
Copy link

This is a neat extension!

In a recent blog post, I did something similar with little swatches (though not for hex codes specifically):

image

I added user-select: none to the CSS for the glyph so that when users select/copy the text, the glyph doesn't get picked up too:

image

Would it be worth adding that to the inline CSS at https://github.com/mcanouil/quarto-preview-colour/blob/b2f38e4d35037e8b4f1334b5e51871f8d812856f/_extensions/preview-colour/preview-colour.lua#LL51C70-L51C70 or would that go beyond the scope of the extension?

@mcanouil
Copy link
Owner

I intend to turn the circle into a copy button and make it not selectable, although I did not go that far.

Thank you for the suggestion.

To note, leaving the glyph in the text does not aligned with my accessibility goal, i.e., screen reader will catch the glyphs.

@andrewheiss
Copy link
Author

Ah, I see. My goal was to have screen readers ignore it—it was just extra flair, but not structurally important. I like the copy button idea a lot!

@mcanouil
Copy link
Owner

mcanouil commented Jun 15, 2023

If you want to contribute, don't hesitate 😉

A simple (not complete) roadmap:

@mcanouil
Copy link
Owner

mcanouil commented Jun 15, 2023

FYI, the whole thing originated from quarto-dev/quarto-cli#5908.

@mcanouil mcanouil added this to Quarto Jun 23, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Quarto Jun 23, 2023
@mcanouil mcanouil moved this from 🆕 New to 📋 Backlog in Quarto Jun 23, 2023
@mcanouil mcanouil self-assigned this Jun 23, 2023
@mcanouil mcanouil added Difficulty: [2] Intermediate Priority: [1] Low Type: Enhancement 💡 Issues related to enhancements, improvements, new features, or new analyses and removed enhancement labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: [2] Intermediate Priority: [1] Low Type: Enhancement 💡 Issues related to enhancements, improvements, new features, or new analyses
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants