Tile colour picker: show saved values, hex follows presets (#160) #162

Merged
miko merged 1 commit from fix/160-tile-colour-picker-state into development 2026-11-10 12:38:50 +01:00
Owner

Summary

Two follow-up fixes to the tile colour (#160):

 <CategoryPage>
-  <CategoryForm category=… />
+  <CategoryForm key={updatedAt} category=… />   # rebuilt after each save
 
 <TileColourPicker>
-  <HexColourInput value={custom} />
+  <HexColourInput value={chosen preset or custom} />
  • Stale category form: Next keeps visited pages alive, so after saving and clicking "Edit category" again the form showed the values as it was left (tile colour, visibility, …) until a reload. The form is now keyed by the category's last save, like page forms already are. The guide editor was not affected.
  • Hex field: now follows a chosen preset colour; with "Automatic" it keeps showing the last custom colour.

Evidence

  • Before: choose Plum → hex field still shows #808080; save → Edit category → old colour checked.
    After: new e2e categories.spec.ts › "an admin chooses a category's tile colour, and editing it again shows what was saved" passes (hex #8e2f86, Plum and Internal checked after re-editing).
  • Typecheck and eslint clean, 644 unit tests pass, categories/duplicateGuide/settings e2e pass.

Merge Danger

Door: two-way

Blast Radius: small — category edit form and the tile colour picker only.

🤖 Generated with Claude Code

## Summary Two follow-up fixes to the tile colour (#160): ```diff <CategoryPage> - <CategoryForm category=… /> + <CategoryForm key={updatedAt} category=… /> # rebuilt after each save <TileColourPicker> - <HexColourInput value={custom} /> + <HexColourInput value={chosen preset or custom} /> ``` - **Stale category form:** Next keeps visited pages alive, so after saving and clicking "Edit category" again the form showed the values as it was left (tile colour, visibility, …) until a reload. The form is now keyed by the category's last save, like page forms already are. The guide editor was not affected. - **Hex field:** now follows a chosen preset colour; with "Automatic" it keeps showing the last custom colour. ## Evidence - **Before:** choose Plum → hex field still shows `#808080`; save → Edit category → old colour checked. **After:** new e2e `categories.spec.ts` › "an admin chooses a category's tile colour, and editing it again shows what was saved" passes (hex `#8e2f86`, Plum and Internal checked after re-editing). - Typecheck and eslint clean, 644 unit tests pass, categories/duplicateGuide/settings e2e pass. ## Merge Danger **Door:** two-way **Blast Radius:** small — category edit form and the tile colour picker only. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The category edit form is keyed by the category's last save, so coming
back to it after saving shows the saved values instead of the form as it
was left (Next keeps visited pages' state). The hex field now shows the
chosen tile colour, not only custom ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
miko merged commit 2e25aefd28 into development 2026-11-10 12:38:50 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MassiveDynamic/kataba!162
No description provided.