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

Ability to copy multiple lines from codeblocks #128

Open
kzshantonu opened this issue Feb 18, 2022 · 7 comments
Open

Ability to copy multiple lines from codeblocks #128

kzshantonu opened this issue Feb 18, 2022 · 7 comments

Comments

@kzshantonu
Copy link

Example: https://autorestic.vercel.app/config

@loreanvictor
Copy link
Contributor

Like this?

ezgif com-video-to-gif-5

If that is the intention, then perhaps the user experience can be improved on that front?

@TysonMN
Copy link
Contributor

TysonMN commented Feb 18, 2022

Oh, interesting. I tried to do that yesterday without success. I will try again and try to understand why I failed yesterday.

@kzshantonu
Copy link
Author

@loreanvictor looks nice. Also a copy all button at the corner would be nice imho

@TysonMN
Copy link
Contributor

TysonMN commented Feb 21, 2022

In that GIF, I think the copy happened when typing Ctrl+C. At least, that is one way it could have happened. I didn't realize that was possible. Single clicking a line copies it, so I was trying to highlight multiple lines and then click one of them to copy them. I think this inconsistency is the issue with the user experience.

Also, for the record, selecting multiple lines is accomplished by holding down Shift. That is standard enough. (I believe the typical behavior is Ctrl and then Shift to select a range.)

@kzshantonu
Copy link
Author

Me neither. I can confirm ctrl+c does copy multiple lines

@loreanvictor
Copy link
Contributor

@loreanvictor looks nice. Also a copy all button at the corner would be nice imho

@kzshantonu Yeah there is a component for that actualy:

https://codedoc.cc/docs/markdown/buttons#copy-button

@loreanvictor
Copy link
Contributor

In that GIF, I think the copy happened when typing Ctrl+C. At least, that is one way it could have happened. I didn't realize that was possible. Single clicking a line copies it, so I was trying to highlight multiple lines and then click one of them to copy them. I think this inconsistency is the issue with the user experience.

@TysonMN this is an interesting design problem. On one hand, clicking on a single line, when multiple lines are selected, should deselect and select the line. On the other hand, it is, as you correctly pointed out, an inconsistent interaction with "single-line click copy" interaction. This interaction itself is non-standard (and hence the inconsistency), however it is extremely convenient IMO.

I should think further on to what the best resolution is, and would also appreciate any ideas on this front 😅

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

No branches or pull requests

3 participants