Repository navigation
Match Route Figma design and real Route API payloads - #1
Open
GergesFaiz wants to merge 1 commit into
Open
GergesFaiz wants to merge 1 commit into
GergesFaiz wants to merge 1 commit into
Conversation
UI (Route E-Commerce Figma):
- Tabs are a StatefulShellRoute with one blue bottom bar (active tab in a
white circle); lists, details, cart and orders open above it.
- Shared header: Route logo, rounded search field and cart icon with badge.
- Home: promo slider with dots, 2-row categories, brands, best sellers.
- Categories: tinted rail with active bar, banner and subcategory grid that
opens filtered products.
- Product card/details: price after discount with struck original, heart
bound to the wishlist, sold/rating/quantity row, total + add to cart.
- Cart, wishlist and account screens restyled per design; account shows
"Welcome, name", editable fields, password dialog and saved addresses.
- Fix stray shell quotes that rendered literally in the reviews section.
API:
- Parse `_id`-only documents, populated-or-id references (POST /cart,
POST /orders), wishlist payloads without `message`, clear-cart `{message}`
and the bare order array with numeric order numbers.
- Update/remove cart lines by product id; a missing cart (404) is empty.
- Readable validation errors; unexpected payloads become failures.
- Save the new token after changing the password; keep the profile locally.
State: cart and wishlist cubits are app-wide singletons so badges and
hearts stay in sync; add-to-cart with a quantity uses POST + PUT.
Tests: realistic API fixtures plus cart/wishlist cubit, formatter, error
and widget tests (88 passing).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaZdQvfKyrAcyAA9VbJfCT
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.
Summary
Reworks the UI to follow the Route E-Commerce Figma and fixes the data layer so it parses the real Route API responses.
UI
StatefulShellRoutewith one blue bottom bar; the active tab sits in a white circle. Product lists, details, cart and orders open full-screen above it.API
_id-only documents, populated-or-id references (POST /cart,POST /orders), wishlist payloads withoutmessage, the clear-cart{message}answer and the bare orders array with a numeric order number.State
CartCubitandWishlistCubitare app-wide singletons, so badges and hearts stay in sync. Adding with a quantity uses POST and then PUT.Deliberate differences from the design (API limits)
Testing
dart analyze --fatal-infos: no issues.flutter test: 88 tests pass. Model tests use realistic API payloads, plus new cart/wishlist cubit, formatter, error and widget tests.🤖 Generated with Claude Code
https://claude.ai/code/session_01QaZdQvfKyrAcyAA9VbJfCT
Generated by Claude Code