Implement basket quantity update functionality with increment/decrement controls#15
Closed
Implement basket quantity update functionality with increment/decrement controls#15
Conversation
Co-authored-by: KyleMcMaster <11415127+KyleMcMaster@users.noreply.github.com>
…nt buttons Co-authored-by: KyleMcMaster <11415127+KyleMcMaster@users.noreply.github.com>
Co-authored-by: KyleMcMaster <11415127+KyleMcMaster@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update Number of Basket Items on the Baskets page
Implement basket quantity update functionality with increment/decrement controls
Jul 9, 2025
Contributor
|
@copilot Please revert the .NET version back to .NET 9. When working on the changes first install .NET 9 before verifying the build. |
Co-authored-by: KyleMcMaster <11415127+KyleMcMaster@users.noreply.github.com>
Contributor
Author
I've reverted the .NET version back to .NET 9.0 as requested. The changes include:
The build and all 10 tests are now passing successfully with .NET 9. Commit: a0dfec0 Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
… ASPNETCORE_HTTPS_PORT for development environment
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.
This PR adds the ability for users to update basket item quantities directly from the Baskets page using intuitive increment (+) and decrement (-) buttons.
Features Added
✅ Increment/Decrement Buttons: Added "+" and "-" buttons next to each item's quantity display
✅ Real-time Updates: Quantities and total costs update immediately after each operation
✅ Automatic Item Removal: Items are automatically removed when quantity would go below 1
✅ Multi-item Support: Each basket item has independent quantity controls
✅ Live Basket Counter: Header basket counter updates to reflect total item count
✅ User Feedback: Clear success/error feedback via URL parameters
Technical Implementation
Domain Layer (
Basket.Domain.fs):updateBasketItemQuantityfunction for updating existing item quantitiesUI Layer (
Basket.Component.fs):/basket/update-quantitywith the target quantityHTTP Layer (
Basket.Page.fs):updateQuantityhandler to process quantity update requestsRouting (
Program.fs):POST /basket/update-quantityendpointTesting
Added comprehensive test suite (
UpdateBasketItemQuantity.fs) covering:All 10 new tests pass, maintaining 100% test coverage for the new functionality.
Demo
The screenshot demonstrates:
Validation & Edge Cases
Fixes #14.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.