Skip to content

Add wish list feature with drag-and-drop sorting#27

Merged
JoeProgrammer88 merged 2 commits intomainfrom
copilot/implement-new-wish-list
Mar 2, 2026
Merged

Add wish list feature with drag-and-drop sorting#27
JoeProgrammer88 merged 2 commits intomainfrom
copilot/implement-new-wish-list

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 2, 2026

Adds a persistent wish list where users can track desired items with a title, optional URL, and optional approximate price — sortable via drag-and-drop.

Storage (src/storage.ts)

  • New WishItem interface: id, title, url?, price?, order, createdDate
  • wishList: WishItem[] added to AppData; initialized to [] in createInitialData()
  • New StorageManager methods: addWishItem, updateWishItem, deleteWishItem, getWishItems, reorderWishItems

UI (index.html)

  • New 🎁 Wish List nav tab (between Shop and Finances)
  • Tab section with item list, add button, and modal form (title required; URL and price optional)

App Logic (src/app.ts)

  • renderWishList() renders items with native HTML5 drag-and-drop; drop reorders via reorderWishItems()
  • Full modal CRUD: openWishItemModal, saveWishItem, deleteWishItem
  • dragSrcWishId cleared on dragend to prevent stale drag state

Styles (css/styles.css)

  • Wish list item layout with drag handle, .dragging opacity, and .drag-over highlight border

Tests (tests/storage.test.ts)

  • 7 new unit tests covering add, get (sorted), update, delete (with re-index), and reorder
Original prompt

This section details on the original issue you should resolve

<issue_title>Implement a new wish list</issue_title>
<issue_description>The app needs a wish list feature implemented that will have a title, optional url to a listing, and optional approximate price. The user should be able to sort their list by dragging and dropping their items</issue_description>

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: JoeProgrammer88 <7156063+JoeProgrammer88@users.noreply.github.com>
Copilot AI changed the title [WIP] Add new wish list feature with sorting capability Add wish list feature with drag-and-drop sorting Mar 2, 2026
@JoeProgrammer88 JoeProgrammer88 marked this pull request as ready for review March 2, 2026 04:11
@JoeProgrammer88 JoeProgrammer88 merged commit 480276a into main Mar 2, 2026
1 check passed
@JoeProgrammer88 JoeProgrammer88 deleted the copilot/implement-new-wish-list branch March 2, 2026 04:13
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.

Implement a new wish list

2 participants