-
Notifications
You must be signed in to change notification settings - Fork 25
Improve Trashbin #905
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
Improve Trashbin #905
Conversation
5a9321b to
f3568f2
Compare
packages/web-pkg/src/composables/actions/files/useFileActionsEmptyTrashBin.ts
Outdated
Show resolved
Hide resolved
c74c970 to
e07b584
Compare
|
Hey sorry outsider input here. 2 cents worth. Since you are already dedicating an icon to indicate the fill state, why not also make it useful by making it a clickable action - and it's greyed out because the trash is already empty - I think is quite intuitive too! :) |
|
@streaminganger Thank you for your advice, that's a great and handy idea! Unfortunately our status indicators are not made to call any actions, but we have quick actions for that in front of the 3-dot-menu. What do you think?
|
79a34de to
0a37fd8
Compare
I see! In any case I do like the trash action shown upfront like this for a first time user viewing this page it helps. Thanks for listening. I love the great work you do for FOSS! |
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 support for showing and hiding empty trash bins across the UI and implements the "empty trash bin" action for space-level trash views.
- Introduces a new
areEmptyTrashesShownflag (with localStorage persistence) and UI toggle in the view options. - Defines and wires up the
empty-trash-binspace action (handler, visibility, disabled state) and adds quick/context actions for trash views. - Extends
SpaceResourcewith ahasTrashedItemsproperty, adds corresponding status indicators, and updates both generic and trash-specific space views.
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/web-runtime/src/container/bootstrap.ts | Initialize areEmptyTrashesShown from localStorage |
| packages/web-pkg/src/composables/piniaStores/resources.ts | Add areEmptyTrashesShown ref and setter |
| packages/web-pkg/src/composables/actions/files/useFileActionsEmptyTrashBin.ts | Implement empty-trash-bin action for spaces |
| packages/web-pkg/src/helpers/statusIndicators.ts | Add trash‐filled/empty indicators |
| packages/web-pkg/src/composables/piniaStores/spaces.ts | Add reloadPersonalSpace method |
| packages/web-client/src/helpers/space/types.ts & functions.ts | Extend SpaceResource with hasTrashedItems default |
| packages/web-pkg/src/components/ViewOptions.vue | Add switch to toggle empty trash bins |
| packages/web-pkg/src/components/FilesList/ResourceTable.vue | Filter out trash indicators in non‐trash listings |
| packages/web-app-files/src/views/trash/Overview.vue | Integrate empty‐trash toggle, quick/context actions in overview |
| packages/web-app-files/src/views/spaces/GenericTrash.vue | Add “Empty trash bin” button to generic space trash view |
Comments suppressed due to low confidence (1)
packages/web-pkg/src/components/ViewOptions.vue:78
- [nitpick] This new switch shares the same
data-testidas the disabled‐spaces toggle. Please update it to a unique identifier (e.g.files-switch-show-empty-trash) to avoid test collisions.
data-testid="files-switch-projects-show-disabled"
| useDocumentTitle, | ||
| useFileActionsEmptyTrashBin, | ||
| useUserStore | ||
| } from '@opencloud-eu/web-pkg' |
Copilot
AI
Jul 6, 2025
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.
The ContextActions import is no longer used in this file. You can remove it to keep imports tidy.
| <div v-if="!isEmbedModeEnabled" class="oc-flex"> | ||
| <oc-button | ||
| v-for="action in filteredActions" | ||
| :key="action.label()" |
Copilot
AI
Jul 6, 2025
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.
[nitpick] Using action.label() as the list key may lead to duplicate keys if labels repeat. Consider using action.name for a stable, unique key.
| :key="action.label()" | |
| :key="action.name" |
4b53e8a to
991937b
Compare
2856e8d to
655c865
Compare
|
😮💨 ready 2 review |
JammingBen
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.
Very nice 🏅
ae38843 to
f2640a8
Compare

Description
Related Issue
How Has This Been Tested?
Types of changes