-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Adds Clear Clipboard button & logic #20757
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
Adds Clear Clipboard button & logic #20757
Conversation
* Adds uui-box from outer components consuimg this into this component * Adds a header to uui-box * Adds a conditional uui-button when we have items in clipboard * Adds confirm dialog/prompt to ask if user wants to clear all items
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a "Clear Clipboard" button to the clipboard entry picker component, allowing users to delete all clipboard items at once. The changes improve the user experience by providing a convenient way to clear the entire clipboard with a single action.
Key changes:
- Added a "Clear Clipboard" button with confirmation modal in the clipboard entry picker
- Moved the
uui-boxwrapper from parent components into the picker element itself for consistent UI - Added localization keys for the clear clipboard feature
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| clipboard-entry-picker.element.ts | Added clear clipboard functionality with confirmation modal, imported necessary dependencies, and integrated uui-box wrapper with header actions |
| clipboard-entry-picker-modal.element.ts | Removed redundant uui-box wrapper since it's now handled within the picker element |
| block-catalogue-modal.element.ts | Removed redundant uui-box wrapper since it's now handled within the picker element |
| en.ts | Added localization keys for "Clipboard" and "confirmClearDescription" |
...eb.UI.Client/src/packages/clipboard/clipboard-entry/picker/clipboard-entry-picker.element.ts
Outdated
Show resolved
Hide resolved
...eb.UI.Client/src/packages/clipboard/clipboard-entry/picker/clipboard-entry-picker.element.ts
Show resolved
Hide resolved
...eb.UI.Client/src/packages/clipboard/clipboard-entry/picker/clipboard-entry-picker.element.ts
Show resolved
Hide resolved
...eb.UI.Client/src/packages/clipboard/clipboard-entry/picker/clipboard-entry-picker.element.ts
Outdated
Show resolved
Hide resolved
...eb.UI.Client/src/packages/clipboard/clipboard-entry/picker/clipboard-entry-picker.element.ts
Outdated
Show resolved
Hide resolved
|
Will fix up some of these suggestions from Copilot - but will leave some of the comments behind so we can discuss to ensure solved with the right approach. |
Make sure the promise for the modal is caught and we return out early if user explictiy cancels modal or presses ESC
|
|
|
Any chance this could make it for a 17.0.0 release @iOvergaard or is this potentially too late? |
|
@warrenbuckley unfortunately too late for 17.0 as that is already a Release Candidate. As for your TODO, I think it's fine to re-request the items. Would you clean up the PR a bit, then we can get it in, please? |
…rrenbuckley/Umbraco-CMS into fix/clear-all-clipboard-items
Prerequisites
If there's an existing issue for this PR then this fixes #20597
Description
This adds back a clear all clipboard items that we had previously in Umbraco 13
For steps on how to test:
Video demo
Pr-Adding-Clear-Clipboard_ENCODED.mp4
Notes
I have left some comments/notes in the code as I was not 100% certain on the approach.
Happy to get feedback and improve as needed.
Cheers,
Warren 😄