Two-letter coloured tiles (#158) #159

Merged
miko merged 2 commits from feature/158-two-letter-tiles into development 2026-11-10 10:35:47 +01:00
Owner

Summary

Coloured tiles show two letters instead of one (#158).

 <Tile> (src/components/Tile.tsx)
-  {title.charAt(0).toUpperCase()}
+  {tileInitials(title)}   (src/components/tileInitials.ts)
tileInitials(title)
  words = whitespace-separated tokens, keeping only letters and digits; tokens without any are dropped
  two or more words → first letter of the first two words
  one word          → its first two letters
  uppercase

Evidence

  • Before: "Bohren in Holz" → B, "Lasercutter" → L
    After: tileInitials.test.ts:

    • "Bohren in Holz" → BI, "Lasercutter" → LA
    • "Schweißen – Grundlagen" → SG, "(Alt) Bohren" → AB, "🔧 Werkzeug" → WE
    • "3D-Druck" → 3D

    npm test: 633 passed; typecheck and lint clean.

Merge Danger

Door: two-way

Blast Radius: cosmetic. Only the text on coloured tiles in category and guide grids changes; it is aria-hidden, so link names and e2e locators are unaffected.

🤖 Generated with Claude Code

## Summary Coloured tiles show two letters instead of one (#158). ```diff <Tile> (src/components/Tile.tsx) - {title.charAt(0).toUpperCase()} + {tileInitials(title)} (src/components/tileInitials.ts) ``` ```text tileInitials(title) words = whitespace-separated tokens, keeping only letters and digits; tokens without any are dropped two or more words → first letter of the first two words one word → its first two letters uppercase ``` ## Evidence - **Before:** "Bohren in Holz" → `B`, "Lasercutter" → `L` **After:** `tileInitials.test.ts`: - "Bohren in Holz" → `BI`, "Lasercutter" → `LA` - "Schweißen – Grundlagen" → `SG`, "(Alt) Bohren" → `AB`, "🔧 Werkzeug" → `WE` - "3D-Druck" → `3D` `npm test`: 633 passed; typecheck and lint clean. ## Merge Danger **Door:** two-way **Blast Radius:** cosmetic. Only the text on coloured tiles in category and guide grids changes; it is `aria-hidden`, so link names and e2e locators are unaffected. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Tiles without an image show the initials of the title's first two words,
or a single word's first two letters, in uppercase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dashes, punctuation and emoji no longer show up on a coloured tile, and
emoji are no longer split into broken halves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
miko merged commit 8e5d4e3624 into development 2026-11-10 10:35:47 +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!159
No description provided.