-
Notifications
You must be signed in to change notification settings - Fork 25
feat: show empty trash bin icon at quick action if trash is empty #1647
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
Conversation
3329e29 to
6691661
Compare
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 implements dynamic icon selection for the empty trash bin action, showing an empty trash bin icon when the trash is empty and a filled trash bin icon when it contains items. The implementation extends the Action interface to support icons as functions that can dynamically determine the appropriate icon based on context.
Key Changes:
- Extended the
Actioninterface to allowiconto be either a string or a function that returns a string - Implemented dynamic icon selection in the empty trash bin action based on the
hasTrashedItemsproperty - Updated all components that render action icons to handle both static and function-based icons
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/web-pkg/src/composables/actions/types.ts | Extended Action interface to support function-based icons |
| packages/web-pkg/src/composables/actions/files/useFileActionsEmptyTrashBin.ts | Implemented dynamic icon selection for empty trash bin action |
| packages/web-pkg/src/components/ContextActions/ActionMenuItem.vue | Added computed property to resolve action icons |
| packages/web-app-files/src/views/spaces/GenericTrash.vue | Added icon resolution for trash bin action button |
| packages/web-app-files/src/components/Trash/TrashQuickActions.vue | Added helper function to resolve action icons |
| packages/web-app-files/src/components/FilesList/QuickActions.vue | Added helper function to resolve action icons |
| packages/web-app-files/src/components/AppBar/CreateAndUpload.vue | Added helper function to resolve action icons |
| packages/web-app-admin-settings/src/views/Users.vue | Added computed property to resolve create user action icon |
| packages/web-app-admin-settings/src/views/Groups.vue | Added computed property to resolve create group action icon |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/web-app-files/src/components/FilesList/QuickActions.vue
Outdated
Show resolved
Hide resolved
packages/web-app-files/src/components/AppBar/CreateAndUpload.vue
Outdated
Show resolved
Hide resolved
packages/web-app-files/src/components/AppBar/CreateAndUpload.vue
Outdated
Show resolved
Hide resolved
packages/web-app-files/src/components/FilesList/QuickActions.vue
Outdated
Show resolved
Hide resolved
Co-authored-by: Jannik Stehle <50302941+JammingBen@users.noreply.github.com>
Co-authored-by: Jannik Stehle <50302941+JammingBen@users.noreply.github.com>
kulmann
left a comment
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.
Nice, works like a charm and really achieves better visual guidance. 💪
Description
Related Issue
How Has This Been Tested?
Types of changes