Files
airship/packages
Nayan 7dd09591ea refactor(overlay): make every tooltip short enough to read at a glance
Tips had grown into sentences with em dashes and keyboard glyphs in the prose,
and the box they painted in was sized before the text wrapped — so a long tip
either overflowed or wrapped somewhere the background did not follow.

Tip text moves into a `.tip-text` span, which gives the three-line clamp
something to clamp, and `overflow-wrap: anywhere` stops one long token pushing
the box wide. `width: max-content` with `max-width: TIP_MAX_W` sizes to the text
up to a limit rather than guessing, and `left` resets to `0px` before measuring,
because a stale value shrank the width the measurement was allowed to use.
`.tip-key` stays on the baseline and does not wrap.

The copy pass is the other half: shorter, sentence-case tips, with em dashes
replaced by a full stop or a middle dot depending on whether what follows is a
sentence or a label.

`tooltip.copy.test.ts` is the part that lasts. It walks all of
`packages/overlay/src` asserting every tip is at most 44 characters, contains no
U+2014, and keeps keyboard glyphs out of prose — so the next long tip fails a
test instead of shipping. That is also why this lands last in the overlay
series: the copy edits riding inside `app.ts`, `frame-chrome.ts`, `paint.ts`,
`filters.ts`, `stroke.ts`, `align-row.ts`, `panel.ts` and `token-field.ts` all
had to be in first for it to pass.
2026-08-14 13:23:29 +05:30
..