feat: add quote collections feature#46
Merged
Merged
Conversation
Add the ability to organize quotes into custom collections: - Add QuoteCollection type and collectionIds to Quote interface - Add COLLECTIONS storage key and storage helpers - Extend quote-store with collection state and actions: - CRUD operations for collections - Quote-collection linking (add/remove) - Bulk add quotes to collection - Active collection filtering - Create UI components: - CollectionList: Display and manage collections - CollectionForm: Create/edit collection modal - CollectionPicker: Multi-select popover for quotes - Update QuoteManagementPage with Collections tab - Add collection button with count badge to QuoteCard - Add bulk "Add to Collection" action to BulkActionsToolbar
- Add AddQuotesToCollectionModal for bulk adding quotes to collections - Modal shows searchable list of all quotes with checkboxes - Tracks pending changes and applies them on save - Add ListPlus button to collection cards in CollectionList
- Add collectionId parameter to getRandomQuote utility - Update refreshQuote to respect activeCollectionId filter - Add collections section to CategoryFilter dropdown - Quotes can now be filtered by collection from main display
- Add getCollections and setCollections to storage mock - Add collections and activeCollectionId to EMPTY_STORE_STATE fixture - Update CategoryFilter mock store with collection-related state - Update test assertions for 'Filter Quotes' header
- Change activeCollectionId to activeCollectionIds array - Update toggleCollection to add/remove collections from filter - Add setActiveCollectionIds for bulk operations - Update getRandomQuote to filter by multiple collection IDs - Collections now use checkboxes like categories for consistent UX
- Click on collection now shows its quotes within the Collections tab - Added back button to return to collection list - Removed filter toggle on collection click (filtering still works via CategoryFilter) - Added "Add Quotes" button in collection detail view
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.
Summary
Add the ability to organize quotes into custom collections for themed groupings:
Changes
Data Layer
QuoteCollectiontype to@cuewise/sharedcollectionIds?: string[]toQuoteinterfaceCOLLECTIONSstorage key and helpersStore Layer
quote-storewith collection state and actionsUI Components
CollectionList: Display and manage collections in new tabCollectionForm: Modal for creating/editing collectionsCollectionPicker: Popover for adding quotes to collectionsQuoteCardwith collection button and badgeBulkActionsToolbarwith bulk add to collectionScreenshots
Collections are managed in a new tab alongside Quotes in the Quote Management page. Each quote card shows a collection count badge, and bulk selection enables adding multiple quotes at once.
Test plan