Skip to content

Add advanced wishlist metadata, management UI, and product-page quick actions#30

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/add-advanced-wishlist-features
Draft

Add advanced wishlist metadata, management UI, and product-page quick actions#30
Copilot wants to merge 3 commits into
mainfrom
copilot/add-advanced-wishlist-features

Conversation

Copilot AI commented May 27, 2026

Copy link
Copy Markdown

This PR extends wishlist items from a binary saved list into a metadata-rich workflow (notes, priority, category, target price, quantity) with power-user controls for filtering, grouping, and bulk operations. It also connects product browsing to wishlist metadata capture and high-priority signaling.

  • Data model + wishlist state layer

    • Introduces an extended WishlistItem shape with backward-compatible normalization for legacy entries.
    • Adds WishlistContext methods for per-field updates (notes, priority, category, targetPrice, quantity), bulk actions, and helper APIs for filtering/sorting.
    • Persists wishlist and purchase history in localStorage and exposes analytics helpers (category usage, priority distribution, average days to purchase).
  • Wishlist management surface

    • Adds Wishlist.tsx (new route) with:
      • priority/category filters
      • sort by date/priority/price
      • category grouping with color chips
      • empty states per current view
      • keyboard shortcuts (e, p, c) for edit/priority/category
      • bulk actions: move category, set priority, delete selection
    • Adds WishlistItemCard.tsx with:
      • expandable product details
      • debounced note autosave + blur save
      • inline priority/category/target price/quantity editing
      • quick actions: Buy Now, Add to Cart, Remove
      • priority badges/icons (🔴 high, 🟡 medium, ⚪ low)
  • Products integration

    • Adds wishlist quick-add (defaults) and metadata modal flow (notes + priority).
    • Displays high-priority wishlist badge on product cards.
    • Replaces blocking alerts with inline feedback messaging for UX continuity.
  • App wiring

    • Registers WishlistProvider, /wishlist route, and navigation entry.
// Context API now supports metadata-first item management
addToWishlist(productId, { notes, priority, category, targetPrice, quantity });
updateItemNotes(productId, notes);
updateItemPriority(productId, 'high');
updateItemCategory(productId, 'Seasonal');
sortByPriority(items);
getItemsByCategory('Seasonal');
Original prompt

Add advanced features to the wishlist: notes, priorities, categories, and quick actions to enhance the user experience.

Goal: Extend the wishlist functionality with power-user features that make product management more efficient.

Requirements:

  1. Enhanced Data Model:

    interface WishlistItem {
      wishlistItemId: number;
      wishlistId: number;
      productId: number;
      addedAt: string;
      notes?: string;              // User notes about why they want this
      priority?: 'high' | 'medium' | 'low';  // Priority level
      category?: string;           // Custom category/collection
      targetPrice?: number;        // Desired price point
      quantity?: number;           // Desired quantity (default 1)
    }
  2. Frontend Components:

    • Wishlist.tsx enhancements:

      • Add filter/sort by priority, category, date added
      • Group items by category
      • Inline note editing
      • Priority badges (color-coded)
      • Quick "add to cart" button with quantity selector
      • "Move to category" dropdown
    • New Component: WishlistItemCard.tsx:

      • Expandable card showing product details
      • Note textarea (auto-save on blur)
      • Priority selector dropdown
      • Category input/select
      • Target price input
      • Last price check indicator
      • Quick actions: "Buy Now", "Add to Cart", "Remove"
  3. Products.tsx Integration:

    • When adding to wishlist, show modal to add notes/priority
    • Quick-add option (skip modal, use defaults)
    • Show wishlist icon badge if item has high priority
  4. Context Updates (WishlistContext.tsx):

    • Add methods: updateItemNotes, updateItemPriority, updateItemCategory
    • Add filtering helpers: getItemsByPriority, getItemsByCategory
    • Add sorting helpers: sortByDateAdded, sortByPriority, sortByPrice
    • Maintain localStorage/API sync
  5. Backend API Updates (if Variation 1 merged):

    • PATCH /api/wishlists/:userId/items/:productId - Update item metadata
    • GET /api/wishlists/:userId/items?priority=high - Filter by priority
    • GET /api/wishlists/:userId/categories - Get unique categories
  6. UI/UX Features:

    • Category chips with color coding
    • Priority icons (🔴 high, 🟡 medium, ⚪ low)
    • Bulk actions: "Move to category", "Set priority", "Delete selected"
    • Empty state messages per filter/category
    • Keyboard shortcuts (e, p, c for edit, priority, category)
  7. Analytics Tracking:

    • Track most used categories
    • Track average days until purchase
    • Track priority distribution

Technical Notes:

  • Maintain backwards compatibility with simple wishlist items
  • Use debouncing for auto-save note edits
  • Add input validation for target price, quantity
  • Implement optimistic UI updates
  • Add loading states for async operations

Copilot AI and others added 2 commits May 27, 2026 18:13
Co-authored-by: thomasiverson <12767513+thomasiverson@users.noreply.github.com>
Co-authored-by: thomasiverson <12767513+thomasiverson@users.noreply.github.com>
Copilot AI changed the title [WIP] Add advanced features to wishlist for enhanced user experience Add advanced wishlist metadata, management UI, and product-page quick actions May 27, 2026
Copilot AI requested a review from thomasiverson May 27, 2026 18:19
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.

2 participants