-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Clipboard pane #681
Clipboard pane #681
Conversation
Work in progress: It's not yet possible to paste from the pane. The pane can be switched to and from and displays the strings recently added to the clipboard. ClipboardHistoryService listens for change to the system clipboard and keep the history in memory. This data is not persisted to the storage. The maximum size limits the amount of user data stored in memory but also gives a sense to the user that the history is not persisted and can be forgotten as soon as the app stops.
Allow recent clips to be pinned. Pinned clips are put a different place and are persistent. The pane is split in two columns, the clipboard history and the pinned clips. Pinned clips are stored in a new preference file. Improved pinning layout clipboard: Remove history entry after pinning
Slightly improves privacy. Entries older than that are not useful in the intended use case.
Put the recently copied text at the top and the pinned text at the bottom. This should remain intuitive as the recent history should stay small.
The feature is off by default for privacy reasons. The checkbox state is persisted in the configuration. The history is immediately cleared when it's disabled. The content of the system clipboard is visible when the history is enabled.
The paste button send the content of the pinned clip to the editor the same way as a string key.
Prevent accidentally deleting a saved clipboard.
To make it less ambiguous with the clipboard key icon.
hi, this looks good and I think it works as described, although I did not test it extensively. some thoughts, hopefully impovements ;-)
|
Thanks for your review :) That really helped me make the feature better. The reason for putting the recent entries at the top is that the list of pinned entries is unbounded. Also, it's nice to quickly see whether the keyboard is collecting the history as some people might want to leave the checkbox disabled most of the time. I've made the pane a little taller but I like the idea of a handle at the top. This is definitely out of scope of this PR as it's a large task. The keyboard switching keys have indeed no use and if it was fixed to work, it wouldn't be very intuitive, so I removed it. I like the idea of an insert button but I'm a bit afraid to add a textbox dialog within the keyboard. Perhaps that would be solved by switching to a full activity but that seems a bit disrupting. Perhaps a new page in the settings. I'll leave that for later as well. What do you think of it now ? |
great, I think this looks really better now!
I'm afraid this was a misunderstanding, because I wrote "insert" instead of "paste"!? with my second point, I just wanted to suggest adding the paste button to the recently added clipboard entries (the document icon with the arrow, which pastes the pinned entries). this button could be added to the recent entries, which are not yet pinned. You should be able to paste these entries as well, don't you think? |
if you want to keep it as simple as possible, you might even remove the delete button for the recent entries. they disappear anyway after 5 minutes, or you can uncheck the checkbox to remove them completely. |
That makes total sense! The remove button had a hidden feature, which is to clear the system clipboard if the current system clipboard is removed from the history. That was not very intuitive and I think would be better as a dedicated button. Thanks again for your help ! I'll merge this now and do incremental improvements over time. |
This adds the clipboard pane, which allows to save an arbitrary number of clipboards and to paste them later. The key can be disabled in settings.
Checking the "Recently copied text" checkbox will cause the keyboard to keep a temporary history of copied text. This history can only contain 3 elements which expire after 5 minutes. If this is unchecked, only the current system clipboard can be seen.
Ready for testing.