Skip to content

Activity redesign part 2: render writing-system codes as monospace chips - #2475

Closed
myieye wants to merge 4 commits into
developfrom
claude/activity-2-ws-code-chips
Closed

Activity redesign part 2: render writing-system codes as monospace chips#2475
myieye wants to merge 4 commits into
developfrom
claude/activity-2-ws-code-chips

Conversation

@myieye

@myieye myieye commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

[Claude, autonomous]

Render writing-system codes as monospace chips via a new WsCode component: a bordered chip for the editor's multi-writing-system field labels (multi-ws-input, rich-multi-ws-input) and a chrome-less plain variant in the dictionary preview. Part 2/8 of the activity redesign; follows #2435.

Groundwork for rendering writing-system codes in the activity-item summaries later in the series. The monospace treatment came from a UX reviewer's suggestion that the codes should read more like codes.

Chip text uses text-foreground/60 (not text-muted-foreground) to clear WCAG AA on the muted fill at 12px.

Screenshots

All-writing-systems demo entry (!nyumba); click to enlarge.

Context Before After · light After · dark
Editor field labels
Dictionary preview

Extracts a WsCode component and uses it in the editor's multi-writing-system field
labels and the dictionary preview (which opts out of the chip chrome via plain).
Chip text uses foreground/60 to clear WCAG AA on the muted fill. This gives live
editor fields visual parity with the read-only diff views that later parts of the
activity redesign introduce (part 2/6, assembled result reviewed in #2434).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vm9mEUzcfgX4oUPAbhcfsj
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a reusable WsCode component for rendering writing-system abbreviations and replaces existing abbreviation and label markup in dictionary and multi-writing-system input components.

Changes

Writing-system code rendering

Layer / File(s) Summary
WsCode component contract and rendering
frontend/viewer/src/lib/components/writing-system/WsCode.svelte
Adds typed props, conditional span/label rendering, attribute forwarding, plain-mode styling, and abbreviation output.
Writing-system code integrations
frontend/viewer/src/lib/components/dictionary/DictionaryEntry.svelte, frontend/viewer/src/lib/components/field-editors/*.svelte
Uses WsCode for dictionary abbreviations and writing-system input labels while preserving input associations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit hops through labels bright,
With code chips trimmed and neat,
WsCode bounds each language sign,
In fields and entries sweet.
Ears perk—shared markup wins the night!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly matches the main change: adding monospace chip rendering for writing-system codes.
Description check ✅ Passed The description accurately describes the new WsCode component and its use in the editor and dictionary preview.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/activity-2-ws-code-chips

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Jul 23, 2026
@argos-ci

argos-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 4 changed Jul 23, 2026, 1:21 PM
e2e (Inspect) ⚠️ Changes detected (Review) 4 changed Jul 23, 2026, 1:29 PM

@myieye myieye changed the title [claude] Activity redesign 2/8: render writing-system codes as monospace chips Activity redesign step 2: render writing-system codes as monospace chips Jul 23, 2026
@myieye myieye changed the title Activity redesign step 2: render writing-system codes as monospace chips Activity redesign part 2: render writing-system codes as monospace chips Jul 23, 2026
@myieye
myieye marked this pull request as ready for review July 23, 2026 10:17
The editor chip is a field's writing-system label, where a misread means data
entered under the wrong writing system. foreground/60 (kept for the read-only
dictionary/activity preview, where the code is a passive annotation) was too
faint for that; the chip now runs full contrast in both themes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@myieye
myieye requested a review from hahn-kev July 23, 2026 10:52
myieye and others added 2 commits July 23, 2026 14:59
foreground/60 was the lightest grey that merely cleared AA (~5:1); the reader
still parses these codes to tell which writing system each gloss is, so /75
(~9:1) reads comfortably while staying clearly subordinate to the value text.
Editor chip is unaffected (full contrast).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Monospace renders ~one size step smaller than the app's sans, so font-mono
text-xs sat ~23% below the text-xs-sans label floor the chip replaced. text-sm
mono matches that floor (and the old <Label>'s size). The plain form stays
text-xs to recede inline beside the gloss.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@myieye

myieye commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

@hahn-kev This could be a self review, but changing the ws-code labels feels significant, so please see if you like them.

@hahn-kev

Copy link
Copy Markdown
Collaborator

Yeah, I almost want to get input from Sara on this one actually.

@myieye myieye closed this Jul 27, 2026
@myieye

myieye commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

I think I'm just going to forget about this actually. I'm just gonna focus on making the activity view look the way we want it.
It's not obvious to me that this adds value. I convinced myself, because Alex M. said our codes should maybe look more like codes, but...these aren't actually even the WS codes - their abbreviations 🙃. So, I'm not sure what to think of this and don't want it to slow me down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants