Add Piece Creation UI (dialog with gallery + freehand drawing)#7
Merged
Conversation
Implements a popup dialog for creating new pieces (#5): - Backend: PieceCreateSerializer now accepts an optional `notes` field (max 300 chars) and stores it on the initial designed PieceState - Frontend: NewPieceDialog component with name (required), notes (optional, 300-char limit), and a thumbnail picker that offers a pre-curated gallery of SVG pottery illustrations or a freehand SVG drawing canvas (react-sketch-canvas); hand-drawn SVGs are stored as raw <svg> strings in the thumbnail field - Discard-confirmation dialog appears when closing with unsaved changes - Save is disabled until a non-blank name is provided - On success the PieceList on the homepage updates immediately - 20 new frontend tests; 3 new backend tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Closed
In this case, I had to make these fixes interactively to see the UI bugs. - Generally, the canvas widget doesn't work with the modal dialog. - The dark theme wasn't set up properly. - The modal dialog did not close on successful creation.
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
+ New Piecebutton on the homepage that opens an MUI Dialogfrontend/public/thumbnails/react-sketch-canvas; the exported<svg>string is stored directly as the thumbnailPieceListupdates immediately without a page reloadPieceCreateSerializernow accepts optionalnotes(max 300 chars) and stores it on the initialdesignedPieceStateTest plan
pytest)npm test)Closes #5
🤖 Generated with Claude Code