Skip to content

Conversation

@AlexAndBear
Copy link
Contributor

@AlexAndBear AlexAndBear commented Jul 4, 2025

Description

image

Related Issue

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

Copilot AI review requested due to automatic review settings July 4, 2025 00:22

This comment was marked as outdated.

@AlexAndBear AlexAndBear changed the title Add empty trash bin action to trash bin overview Add empty trash bin action to trash bin overview and show trash fill state Jul 4, 2025
@AlexAndBear AlexAndBear force-pushed the trash-enhancements branch 2 times, most recently from 5a9321b to f3568f2 Compare July 4, 2025 11:18
@AlexAndBear AlexAndBear requested a review from Copilot July 4, 2025 11:43

This comment was marked as outdated.

@AlexAndBear AlexAndBear force-pushed the trash-enhancements branch from c74c970 to e07b584 Compare July 4, 2025 22:23
@streaminganger
Copy link

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! :)

@AlexAndBear
Copy link
Contributor Author

@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?

image

@AlexAndBear AlexAndBear force-pushed the trash-enhancements branch from 79a34de to 0a37fd8 Compare July 6, 2025 00:48
@streaminganger
Copy link

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.

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!

@AlexAndBear AlexAndBear changed the title Add empty trash bin action to trash bin overview and show trash fill state Improve Trashbin Jul 6, 2025
@AlexAndBear AlexAndBear requested a review from Copilot July 6, 2025 11:32
Copy link
Contributor

Copilot AI left a 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 areEmptyTrashesShown flag (with localStorage persistence) and UI toggle in the view options.
  • Defines and wires up the empty-trash-bin space action (handler, visibility, disabled state) and adds quick/context actions for trash views.
  • Extends SpaceResource with a hasTrashedItems property, 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-testid as 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'
Copy link

Copilot AI Jul 6, 2025

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.

Copilot uses AI. Check for mistakes.
<div v-if="!isEmbedModeEnabled" class="oc-flex">
<oc-button
v-for="action in filteredActions"
:key="action.label()"
Copy link

Copilot AI Jul 6, 2025

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.

Suggested change
:key="action.label()"
:key="action.name"

Copilot uses AI. Check for mistakes.
@AlexAndBear AlexAndBear force-pushed the trash-enhancements branch 13 times, most recently from 4b53e8a to 991937b Compare July 6, 2025 23:29
@AlexAndBear AlexAndBear force-pushed the trash-enhancements branch 2 times, most recently from 2856e8d to 655c865 Compare July 7, 2025 15:30
@AlexAndBear AlexAndBear requested review from JammingBen and kulmann July 7, 2025 15:35
@AlexAndBear
Copy link
Contributor Author

😮‍💨 ready 2 review
have phun

Copy link
Contributor

@JammingBen JammingBen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice 🏅

@AlexAndBear AlexAndBear force-pushed the trash-enhancements branch from ae38843 to f2640a8 Compare July 8, 2025 08:30
@AlexAndBear AlexAndBear merged commit 3a59fba into main Jul 8, 2025
23 checks passed
@AlexAndBear AlexAndBear deleted the trash-enhancements branch July 8, 2025 10:54
@openclouders openclouders mentioned this pull request Jul 8, 2025
1 task
@openclouders openclouders mentioned this pull request Jul 21, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add view options filter "Show empty trash bins" to trash overview New action "empty trash" Add fillstate for deleted files in trash overview page

4 participants