Skip to content

Add a shopping list feature for groceries#61

Merged
JoeProgrammer88 merged 2 commits intomainfrom
copilot/add-shopping-list-feature
Mar 26, 2026
Merged

Add a shopping list feature for groceries#61
JoeProgrammer88 merged 2 commits intomainfrom
copilot/add-shopping-list-feature

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

Adds a full shopping list feature to the app so users can manage grocery and other shopping items.

Changes Made

  • src/storage.ts: Added ShoppingItem interface (id, name, optional quantity, completed, createdDate), added shoppingList: ShoppingItem[] to AppData, updated createInitialData() and buildMigratedData() to include the new field, and added five CRUD methods: addShoppingItem, updateShoppingItem, deleteShoppingItem, getShoppingItems, and clearCompletedShoppingItems.
  • index.html: Added a 🛒 Shopping navigation tab and a full tab section with a shopping list container, empty-state message, and an Add/Edit modal with an item name (required) and quantity (optional) field.
  • src/app.ts: Imported ShoppingItem, added currentEditingShoppingItemId state, registered event listeners, wired up shopping in switchTab(), and implemented renderShoppingList, renderShoppingItem, openShoppingItemModal, closeShoppingItemModal, saveShoppingItem, deleteShoppingItem, and clearCompletedShoppingItems methods.
  • css/styles.css: Added shopping list styles consistent with the existing design system, including a responsive mobile breakpoint.
  • tests/storage.test.ts: Added 10 unit tests covering all CRUD operations for the shopping list.

Features

  • Add items with a name and an optional quantity
  • Check items off as collected (strikethrough + dimmed styling)
  • Edit or delete existing items via a modal
  • "Clear Checked" button removes all completed items at once
  • Data persisted to localStorage with full migration support for existing data

Testing

  • ✅ TypeScript compilation passes
  • ✅ All 97 unit tests pass
  • ✅ Manual UI verification confirmed

Shopping List Feature

Original prompt

This section details on the original issue you should resolve

<issue_title>Add a shopping list feature</issue_title>
<issue_description>Users would like to add a simple shopping list features for things like groceries. This can be lists with simple items that are checked off.</issue_description>

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


⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Co-authored-by: JoeProgrammer88 <7156063+JoeProgrammer88@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SpeakingInBits/TaskManagerWeb/sessions/edd3d4a1-2773-45ab-8b8c-ee3756ea0eed
@JoeProgrammer88
Copy link
Copy Markdown
Member

@copilot try again

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 26, 2026

@copilot try again

The shopping list feature is fully implemented. Here's what was added:

  • 🛒 Shopping tab in the navigation
  • Add items with an optional quantity field
  • Check off items as collected (strikethrough + dimmed styling)
  • Edit & delete existing items via a modal
  • Clear Checked button to remove all completed items at once
  • Data is persisted to localStorage via the existing StorageManager pattern, with full migration support for existing data
  • 10 new unit tests covering all CRUD operations

Shopping List

Copilot AI changed the title [WIP] Add a shopping list feature for groceries Add a shopping list feature for groceries Mar 26, 2026
@JoeProgrammer88 JoeProgrammer88 marked this pull request as ready for review March 26, 2026 01:22
@JoeProgrammer88 JoeProgrammer88 merged commit 155c9b0 into main Mar 26, 2026
2 checks passed
@JoeProgrammer88 JoeProgrammer88 deleted the copilot/add-shopping-list-feature branch March 26, 2026 01:26
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.

Add a shopping list feature

2 participants