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 "clear input" and "copy to clipboard" buttons to the custom lesson field #209

Open
evgenyfadeev opened this issue Jan 7, 2025 · 3 comments

Comments

@evgenyfadeev
Copy link
Contributor

evgenyfadeev commented Jan 7, 2025

I'd be willing to make a PR for this, btw.

The reason I propose this is because I often find myself using the "custom lesson" functionality,
so for that "clear" button would be handy to clear the previous lesson before I paste the new one.

Also - since my lessons are kind of random - they are a set of sentences taken randomly from a pre-made list - at times I would like to copy the previous lesson before clearing the field.

Is that something that might be accepted?

@didoesdigital
Copy link
Owner

Thanks for the suggestion @evgenyfadeev. Sounds fine.

I'm a little reluctant to make that page busier because it's already challenging for some people to figure out how to use it and to find all the features on the page. Adding more features that will be used far less frequently than the primary action "Start custom lesson" risks adding more cognitive load.

That said, on the balance I think it's worth adding as an experiment and adjusting if needed.

Here's a mockup for the design/layout you can use:

mockup of custom lesson setup UI where the textarea to Enter your material here shows new buttons to clear or copy, in addition to start custom lesson

Here's a new "copy" icon we could add (similar to the metronome start/stop button icons):

<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="3" y="4" width="13" height="19" rx="1" fill="currentColor"></rect>
<rect x="5" y="6" width="9" height="15" fill="white"></rect>
<rect x="7" width="13" height="19" rx="1" fill="currentColor"></rect>
<rect x="9" y="2" width="9" height="15" fill="white"></rect>
</svg>

We could use the existing ClosingCross icon for the "Clear" button.

I would expect clicking the "Copy" button to select the text in the textarea and copy it to the clipboard, perhaps with a little "Copied!" animation like on the "Copy progress" button on the Progress page.

What do you think @evgenyfadeev ?

@evgenyfadeev
Copy link
Contributor Author

evgenyfadeev commented Jan 15, 2025

Sounds good, thank you! As for the clutter - maybe if the design of those extra buttons is muted enough it would not be an issue.

Also, I'm thinking that for the symmetry other input boxes might use the same functionality... What do you think about that @didoesdigital ?

@didoesdigital
Copy link
Owner

@evgenyfadeev The other input boxes already have copy buttons for the resulting material as the primary action so I think additional copy buttons for the input risks adding more confusion for a less proven use case.

A new issue has been opened that proposes solutions with buttons in the same area as this issue. It's for different behaviour but that may also solve a similar problem to part of your workflow? It might be worth holding off on this feature until we try the other one or discuss it further first, what do you think?

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

2 participants