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

there's a copy button but no paste button #143

Open
wayfu opened this issue Aug 21, 2024 · 6 comments
Open

there's a copy button but no paste button #143

wayfu opened this issue Aug 21, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@wayfu
Copy link

wayfu commented Aug 21, 2024

for instruments and units both

@vsariola
Copy link
Owner

CTRL-C / CTRL-V should work, I think the UI is getting cluttered if I add paste buttons everywhere. I'm actually inclined to delete the copy button altogether to save some space, or perhaps move these less used buttons under a popup menu.

@vsariola vsariola added the enhancement New feature or request label Aug 22, 2024
@wayfu
Copy link
Author

wayfu commented Aug 22, 2024

the shortcuts do work, but the wrinkle i hit was that when you click into a unit name, it becomes editable and pasting into it will paste the unit yml into the unit name instead of pasting the unit into the slot...

@vsariola
Copy link
Owner

That's an unfortunate downside of how sointu serializes the data as text to clipboard & the default gioui text widgets accepting text paste events. I am aware of that wrinkle but did not figure out good way to avoid it.

What the text serialization enables is pasting the yml to a text file and copying it later back, so one can e.g. do some manual tweaking of the data or keeping a couple of different versions of an instrument quite easily in a scratch space. So, I'm not very eager to e.g. serialize the data to clipboard as binary data, which probably would not be accepted by the text widget.

Meanwhile, the gioui text widgets afaik are not flexible enough to disable the paste mechanism, even though in this case it I'm pretty sure it would not be needed. One can write clone the widget package & write own widgets, that part is relatively doable still. But the more annoying part is that then one has to rewrite the material UI skin on top of the widget (how it looks like), and that is more of a hassle.

I could ask gioui authors if there is a way to disable paste in the text widgets.

@wayfu
Copy link
Author

wayfu commented Aug 22, 2024

do the unit names have to be editable at all? i mean, it would be useful to give them custom names, but currently that just deletes the unit.... as long as that's not possible anyway, maybe they could be labels instead of text fields (like the names of parameters in the unit, those don't become editable when clicked)

@vsariola
Copy link
Owner

They are not editable, that is actually a "search box", so that you can quickly type "o" or "osc" and hit enter, and get the oscillator unit... you can see the narrowed results on the right as you type there the unit name

@wayfu
Copy link
Author

wayfu commented Aug 22, 2024

okay! one more thing though: when you type something that's not a valid unit name, the current unit is deleted? might be better to keep the current unit in case of invalid input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants