Improve API listing ID handling and add buyer note feature - #21
Merged
Conversation
…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.
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.
No description provided.