Skip to content

Add collapse toggle and remaining-items counter to named wishlists#66

Merged
JoeProgrammer88 merged 2 commits intomainfrom
copilot/add-collapse-toggle-to-wishlists
Mar 26, 2026
Merged

Add collapse toggle and remaining-items counter to named wishlists#66
JoeProgrammer88 merged 2 commits intomainfrom
copilot/add-collapse-toggle-to-wishlists

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 26, 2026

Named wishlists with many items required excessive scrolling. This adds a per-list collapse toggle and a "N remaining" counter (unpurchased items) to each named wishlist header. Named wishlists are collapsed by default.

Changes

src/app.ts

  • Added expandedWishLists: Set<string> to track expanded state across re-renders within a session
  • renderWishListGroup now accepts isExpanded, renders a ▶/▼ toggle button (named lists only), and a remaining-item counter badge
  • renderWishList passes expanded state per list and wires up toggle click handlers — toggling the collapsed CSS class and updating the set without a full re-render

css/styles.css

  • .wish-list-group.collapsed .wish-list — hides items body when collapsed
  • .wish-list-group-counter — pill badge for remaining count
  • .wish-list-collapse-btn — minimal icon button with hover state
  • .wish-list-group-title — flex row grouping the toggle, name, and counter

Screenshot

Wishlist with collapse toggle and remaining counter

Original prompt

This section details on the original issue you should resolve

<issue_title>Named wishlist collapse</issue_title>
<issue_description>When the user has many named wishlists and wishlist items within each, it requires a lot of scrolling. Let's add a collapse toggle next to each named wishlist title. They wishlists should be collapsed by default.

In the title bar for each let's add a counter for how many wishlist items still need to be purchased</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI changed the title [WIP] Add collapse toggle for named wishlists and item counter Add collapse toggle and remaining-items counter to named wishlists Mar 26, 2026
Copilot AI requested a review from JoeProgrammer88 March 26, 2026 03:15
@JoeProgrammer88 JoeProgrammer88 marked this pull request as ready for review March 26, 2026 03:44
@JoeProgrammer88 JoeProgrammer88 merged commit 20a5a41 into main Mar 26, 2026
1 check passed
@JoeProgrammer88 JoeProgrammer88 deleted the copilot/add-collapse-toggle-to-wishlists branch March 26, 2026 03:45
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.

Named wishlist collapse

2 participants