-
-
Notifications
You must be signed in to change notification settings - Fork 118
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 paste key #945
Add paste key #945
Conversation
I still need a little time to decide whether I'm ok with the changed defaults. Otherwise it looks good. |
Happy to revert any of those, already unpinned paste from the default now that we have clipboard suggestions. On that matter, I've also changed that suggestion icon from 'clipboard' to 'paste'. I'd really like to see that association of "paste icon = paste action centric, clipboard icon = clipboard history centric," but let me know if you want me to revert that. |
I'll go ahead and explain what I've tried to do with the default toolbars. Goals: be as similar to the previous default as possible, add in 'paste' since it's of about equal importance to 'copy', and improve a little on organization. For specifics, Clipboard toolbar:
Main toolbar:
In the future, it might be a good idea to prevent sister keys like left/right and undo/redo from getting swapped by RTL. |
and use android string for cut (not sure why it wasn't the case already)
RTL handling is something that could be improved in general. Currently iirc things depend on the main keyboard language, so arrows and swiping may use the wrong direction depending on whether there is actual RTL text or not (e.g. only numbers). When you mix LTR and RTL things can get even worse, but I'm not sure how much complexity I want to add on this. |
This patch adds a toolbar paste key, which can be used in regular layouts. Long-clicking the toolbar key opens the clipboard history if enabled, otherwise just pastes normally. Having it as a separate key helps make what the clipboard key does more clear, and allows for easy one-tap pasting without disabling clipboard history
I've put it in all the default toolbar layouts, replacing "select all" in the main toolbar and "one handed mode" in the clipboard one. I've also reorganized them, aiming for a more coherent design pattern, but I can revert any of those things if you wish.
Many lines in ToolbarUtils.kt have been reorganized to help me navigate it moving forward.
Progress on #357