Trim needless comments and fix the picker width
Remove comments that only restate the code, keeping the section banners and the notes that carry a reason, a measured fact or an external contract. ButtonOptions.width claimed to be a fixed width but only set minWidth, so the Graph and Texture pickers grew with the name they showed. It is now what it promises, with a separate minWidth for the buttons that have two forms. Narrow buttons shrink their padding, otherwise a 24px icon button had 8px left for its glyph and truncate dropped it entirely. __gm.labelsDropped() guards that class: the overflow guard only saw text that was too wide, never a label truncated to nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f16801aef3
commit
4d84231b9f
115 files changed
+707
-1564
No files matched your search
@@ -269,8 +269,14 @@ selected and switched back on.
|
||||
`Label.ts`, shared by `Label`, `ListRow` and `Button`). A `Button` keeps the full text and
|
||||
measures from it – only what is drawn is shortened – and a subclass that puts something else
|
||||
inside the control takes its room off `labelSlot()`, so a long value is cut rather than run
|
||||
underneath the chevron. `__gm.textOverflows()` guards the whole class of bug: it reports any
|
||||
visible text drawn wider than the widget owning it (e2e step 14).
|
||||
underneath the chevron. Given a `width`, a button is exactly that wide and truncates instead:
|
||||
the tab-bar buttons and the Graph and Texture pickers keep their size whatever they show.
|
||||
The padding is an inset rather than a claim, so a 24 px icon button spends it on the glyph
|
||||
instead of truncating it away; a button that switches between label forms (`↺` and `↺ ▾`) asks
|
||||
for `minWidth` and grows. `__gm.textOverflows()` guards the whole class of bug: it reports any
|
||||
visible text drawn wider than the widget owning it, `__gm.labelsDropped()` guards the other
|
||||
direction – a button too narrow to draw any of its label – and `__gm.graph.pickerWidth()` /
|
||||
`__gm.texture.pickerWidth()` catch a picker that resizes itself around its content (e2e step 14).
|
||||
- **Vite + TypeScript**, **Vitest** for the pure core.
|
||||
- **PHP 8** JSON API (`api/`) storing one JSON file per project in `data/projects/`, with
|
||||
atomic writes and an integer revision that rejects stale saves (HTTP 409).
|
||||
|
||||
Reference in new issue
Block a user