Skip to content

fix: added the missing delete collection on the collections details page#1790

Merged
emlimlf merged 7 commits intomainfrom
fix/missing-delete-collection
Apr 1, 2026
Merged

fix: added the missing delete collection on the collections details page#1790
emlimlf merged 7 commits intomainfrom
fix/missing-delete-collection

Conversation

@emlimlf
Copy link
Copy Markdown
Collaborator

@emlimlf emlimlf commented Mar 31, 2026

In this PR

  • Added the delete button on the header section of the collections details page
  • Added a confirmation modal that appears when the user clicks on delete collection

Ticket

IN-1061

Signed-off-by: Efren Lim <elim@linuxfoundation.org>
@emlimlf emlimlf requested review from Copilot and gaspergrom and removed request for Copilot March 31, 2026 07:46
Copilot AI review requested due to automatic review settings April 1, 2026 05:11
Copy link
Copy Markdown
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

Adds a “Delete collection” action to the collection details header and introduces a reusable, app-wide confirmation modal system to support the delete confirmation flow.

Changes:

  • Added a global confirm modal (Pinia store + modal + global mount in default layout).
  • Added a delete action (with confirmation + deleting overlay) to the “My collections” details header.
  • Tweaked delete icon styling to ensure negative color styling wins in dropdown contexts.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
frontend/app/layouts/default.vue Mounts the global confirm modal component so confirmations can be triggered from anywhere.
frontend/app/components/shared/modules/confirm/store/confirm.store.ts Adds a Pinia store API for opening/confirming/canceling a global confirmation modal.
frontend/app/components/shared/modules/confirm/components/confirm-modal.vue Implements the reusable confirmation modal UI.
frontend/app/components/shared/modules/confirm/components/confirm-global.vue Wires the confirm store state/actions to the confirm modal component.
frontend/app/components/shared/components/collection-card.vue Ensures delete icon styling uses !text-negative-500 for consistent appearance.
frontend/app/components/modules/collection/components/details/header.vue Adds delete dropdown action, confirmation prompt, and full-page deleting overlay for collection deletion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


const invalidateMyCollections = () => {
queryClient.invalidateQueries({
queryKey: [TanstackKey.MY_COLLECTIONS, 'starred_desc', undefined, 99, undefined, user.value?.sub],
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

invalidateMyCollections() uses a fully-specified/hardcoded queryKey ('starred_desc', 99, etc.), which is unlikely to match the actual fetchMyCollections query keys in all cases. Prefer invalidating by prefix (e.g., [TanstackKey.MY_COLLECTIONS]) or derive the key from the same params source used to build the query key.

Suggested change
queryKey: [TanstackKey.MY_COLLECTIONS, 'starred_desc', undefined, 99, undefined, user.value?.sub],
queryKey: [TanstackKey.MY_COLLECTIONS],

Copilot uses AI. Check for mistakes.
emlimlf added 3 commits April 1, 2026 13:23
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
@emlimlf emlimlf requested a review from gaspergrom April 1, 2026 05:32
@emlimlf emlimlf merged commit bfed876 into main Apr 1, 2026
10 checks passed
@emlimlf emlimlf deleted the fix/missing-delete-collection branch April 1, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants