feat: added featured in collection dropdown and modal#1767
Open
feat: added featured in collection dropdown and modal#1767
Conversation
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds UI and data-fetching support to show which collections a project is featured in, and introduces a global “Add to collection” modal to allow adding a project to one of the user’s collections.
Changes:
- Adds a “Featured in collection(s)” popover/dropdown to the project header (gated to LF Insights team members).
- Introduces a global “Add to collection” modal + Pinia store to open/close it and carry modal context.
- Extends project API/query keys and server DB middleware route allowlist to support fetching project collections.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/server/middleware/database.ts | Allows /api/project routes to receive DB pools in event context. |
| frontend/app/layouts/default.vue | Registers the new global “add to collection” modal component at the layout level. |
| frontend/app/components/shared/types/tanstack.ts | Adds a new TanStack query key for project-collections. |
| frontend/app/components/modules/project/services/project.api.service.ts | Adds types + useQuery hook to fetch collections for a project. |
| frontend/app/components/modules/project/components/shared/header/collection-information/featured-in-collection.vue | Adds popover trigger and wires project-collections query + “add to collection” action. |
| frontend/app/components/modules/project/components/shared/header/collection-information/featured-in-collection-dropdown.vue | Implements dropdown UI listing collections and “Add to collection” CTA. |
| frontend/app/components/modules/project/components/shared/header.vue | Displays the new featured-in-collection UI in the project header (gated). |
| frontend/app/components/modules/collection/store/add-to-collection.store.ts | Adds Pinia store to control global modal state and payload. |
| frontend/app/components/modules/collection/components/add-to-collection-modal/add-to-collection-modal.vue | Implements modal UI + logic to add a project into a selected collection. |
| frontend/app/components/modules/collection/components/add-to-collection-modal/add-to-collection-global.vue | Global modal wrapper that binds store state to the modal component. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...s/modules/project/components/shared/header/collection-information/featured-in-collection.vue
Show resolved
Hide resolved
...components/modules/collection/components/add-to-collection-modal/add-to-collection-modal.vue
Outdated
Show resolved
Hide resolved
...components/modules/collection/components/add-to-collection-modal/add-to-collection-modal.vue
Outdated
Show resolved
Hide resolved
...components/modules/collection/components/add-to-collection-modal/add-to-collection-modal.vue
Show resolved
Hide resolved
frontend/app/components/modules/collection/store/add-to-collection.store.ts
Show resolved
Hide resolved
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR
Ticket
IN-1046