You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PT9, the word gloss remains on the same line. In PT10, the gloss doesn't (depending on whether morphological breaks are specified for a word). This can make it more difficult to read: the eyes have to move up and down while reading left and right. Could the word gloss consistently remain on the bottom line?
Here are screenshots that contrast a line of interlinearized text in PT9 versus PT10:
Generated by Claude:
Why it happens
Each token chip is an independent inline-flex tw:flex-col column (TokenChip.tsx#L390) stacking three things in source order: surface text, the morphology slot, then the word-gloss input. The strip that holds the chips is items-start — token-row is flex tw:flex-wrap tw:items-start (tailwind.css#L192), and phrase-token-row inside a phrase box is inline-flex tw:items-start — so chips share a top edge and each one's gloss lands wherever that chip's own height puts it. Nothing aligns the gloss row across chips.
With showMorphology on, the middle slot has two very different heights:
Token with a breakdown — MorphemeBox: a bordered, padded, 2-row grid (morpheme forms on row 1, morpheme gloss inputs on row 2).
Token without one — the muted "define breakdown" fallback button: a single text-xs row, no border, no padding.
So in any strip mixing analyzed and unanalyzed tokens the word glosses sit on two different baselines, and the reader's eye has to hunt vertically token by token — the reported effect. The morphology grid already gives this guarantee inside a token (#118: each morpheme form sits directly over its own gloss field); it just doesn't extend across tokens.
Worth noting the scope: with morphology off, every middle slot is absent and the glosses do line up. This is specific to the mixed-breakdown case.
Direction
"Consistently remain on the bottom line" means the strip, not the chip, has to own the row geometry. Two options:
Shared rows across the strip. Give the strip real rows (surface / morphology / gloss) that every chip places its parts into, so the morphology row is sized to the tallest breakdown and every gloss starts at the same y. Preserves the current visual order and mirrors how MorphemeBox already works one level down. Costs: chips stop being self-contained (PhraseBox, the continuous view, and the analysis catalog all reuse TokenChip), and one long breakdown pads its neighbors' morphology rows.
Move the word gloss above the morphology slot. Cheap and local — reorder within the chip and the gloss sits directly under the surface text on a uniform row. But it puts the morpheme glosses below the word gloss, inverting the PT9 reading order the feedback is anchored on, and the gloss is no longer the bottom line.
(1) is what the feedback asks for; (2) is the fallback if the strip-level rework proves too invasive. Worth deciding before any code.
Open questions
Per strip or per visual line? The segment/list view strip wraps (token-row is flex-wrap), so alignment has to hold per wrapped line — which rules out a naive single grid per strip and points at CSS subgrid (or measuring the tallest breakdown per row). The continuous view is a single horizontally-scrolled line (w-max + overflow-x-scroll, ContinuousView.tsx#L1199), so it needs one row's worth only.
Should the unanalyzed "define breakdown" slot reserve full breakdown height, or stay collapsed and let the shared row absorb the difference? The former keeps chip heights uniform but wastes vertical space on unanalyzed text; the latter is what the shared-row approach implies.
Interaction with the arc overlay, which measures the token row for arc geometry (tokenRowTopPadding, stripRowGap in SegmentView.tsx, phrase-arc.ts) — changing row structure will move what those measurements are anchored to.
Interaction with RTL (Implement RTL support #97) and with phrase boxes, where linked tokens already sit in their own bordered container.
PT team feedback:
Generated by Claude:
Why it happens
Each token chip is an independent
inline-flex tw:flex-colcolumn (TokenChip.tsx#L390) stacking three things in source order: surface text, the morphology slot, then the word-gloss input. The strip that holds the chips isitems-start—token-rowisflex tw:flex-wrap tw:items-start(tailwind.css#L192), andphrase-token-rowinside a phrase box isinline-flex tw:items-start— so chips share a top edge and each one's gloss lands wherever that chip's own height puts it. Nothing aligns the gloss row across chips.With
showMorphologyon, the middle slot has two very different heights:MorphemeBox: a bordered, padded, 2-row grid (morpheme forms on row 1, morpheme gloss inputs on row 2).text-xsrow, no border, no padding.So in any strip mixing analyzed and unanalyzed tokens the word glosses sit on two different baselines, and the reader's eye has to hunt vertically token by token — the reported effect. The morphology grid already gives this guarantee inside a token (#118: each morpheme form sits directly over its own gloss field); it just doesn't extend across tokens.
Worth noting the scope: with morphology off, every middle slot is absent and the glosses do line up. This is specific to the mixed-breakdown case.
Direction
"Consistently remain on the bottom line" means the strip, not the chip, has to own the row geometry. Two options:
MorphemeBoxalready works one level down. Costs: chips stop being self-contained (PhraseBox, the continuous view, and the analysis catalog all reuseTokenChip), and one long breakdown pads its neighbors' morphology rows.(1) is what the feedback asks for; (2) is the fallback if the strip-level rework proves too invasive. Worth deciding before any code.
Open questions
token-rowisflex-wrap), so alignment has to hold per wrapped line — which rules out a naive single grid per strip and points at CSSsubgrid(or measuring the tallest breakdown per row). The continuous view is a single horizontally-scrolled line (w-max+overflow-x-scroll,ContinuousView.tsx#L1199), so it needs one row's worth only.tokenRowTopPadding,stripRowGapinSegmentView.tsx,phrase-arc.ts) — changing row structure will move what those measurements are anchored to.