Skip to content

Improve API listing ID handling and add buyer note feature - #21

Merged
TanKhoa1709 merged 4 commits into
mainfrom
fix/chore
Aug 18, 2026
Merged

Improve API listing ID handling and add buyer note feature#21
TanKhoa1709 merged 4 commits into
mainfrom
fix/chore

Conversation

@TanKhoa1709

Copy link
Copy Markdown
Collaborator

No description provided.

…tion

This commit updates the API generation script to correctly handle listing ID parameters and clarifies slug resolution logic in the generated documentation.

Key changes:
- **API Generation**:
    - Updated `gen_api.sh` to map `ModelListingsIdGetIdParameter` and `ListingsIdGetIdParameter` to `String` to fix issues with `dart-dio` generator output.
    - Added post-processing steps to remove redundant generated model files and replace their references with `String`.
    - Implemented a cleanup task to remove invalid `String.fromJson` deserialization logic from `deserialize.dart`.
- **Documentation**:
    - Updated `catalog_api.dart` comments to reflect that slugs now include IDs at the end, allowing for direct resolution without extra lookups.
    - Clarified that listing renames do not break existing links because the embedded ID remains the primary identifier.
This commit introduces a "Note for seller" feature during the checkout flow, allowing users to provide specific instructions or requests alongside their order.

Key changes:
- **State Management**: Added a `note` field to `CheckoutState` and implemented a `setNote` method in `CheckoutNotifier` to manage the input state.
- **Data Layer**: Updated the checkout submission logic in `checkout_provider.dart` to include the trimmed note when creating the final checkout object.
- **UI Components**:
    - **Buyer Note Card**: Created a new `_buildBuyerNoteCard` widget featuring a stylized multi-line `TextField` with a 200-character limit and dark mode support.
    - **Input Handling**: Integrated `TextEditingController` within `CheckoutScreen` to synchronize UI input with the state provider and ensure proper cleanup during the widget lifecycle.
- **Visual Improvements**: Standardized the styling of the new note section to match existing checkout cards, including consistent shadows, borders, and typography.
…test

This commit deletes specific test files covering buyer note visibility and cancelled unpaid order lines, along with a temporary dummy test used for CI.

Key changes:
- **Order UI Tests**: Removed `buyer_note_visible_test.dart`, which verified that buyer notes were correctly displayed in order details and seller views.
- **Order Status Tests**: Removed `cancelled_unpaid_line_test.dart`, which ensured cancelled unpaid items appeared correctly in the "Cancelled" tab and were excluded from pending lists.
- **CI Cleanup**: Deleted `dummy_test.dart`, a placeholder test previously used to ensure CI pipeline passage.
@TanKhoa1709
TanKhoa1709 requested a review from beanbocchi August 18, 2026 16:20
@TanKhoa1709
TanKhoa1709 merged commit 01b2369 into main Aug 18, 2026
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.

1 participant