Greyed out Open asset, tabs as index cards with icons, check sum 1109 (#176)

admin committed 2026-09-20 11:40:05 +02:00
1 parent 9fd6ce7ada
commit 685f72c5d3
3 files changed
+19 -6

No files matched your search

+9 -3
@@ -50,8 +50,11 @@
what does not fit into an overflow menu rather than letting it spill (the rule is
`tabRowLayout` in `editor/tabRow.ts`, so it is checkable without a browser; `__gm.tabRow()`
reports what is in the row, what went away and the whole order).
A button that can draw its label bold — on an accent fill: primary,
danger, a toggled tab — is measured bold, or a dialog's `Delete` comes out as `Del…`.
A button that can draw its label bold — on an accent fill: primary or danger — is measured bold,
or a dialog's `Delete` comes out as `Del…`; the style it draws and the one it measures come from
`labelToken()` and `measureToken()`, which a subclass overrides (`TabButton` draws and measures
plain). The box behind the label is `drawBackground()`, likewise overridable: `TabButton` paints
an index card there, rounded above and square below (#176).
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
@@ -105,6 +108,8 @@ src/editor/ App → Editor (layout + ticker), PlaySession (the run),
FilePicker (the shared "+ → Texture / Font / Sound" dialog; ImagePicker/FontPicker/SoundPicker only describe their row),
framing (fit/marquee/snap maths), FormDialog (the small modal forms: label column, Cancel + confirm, one open at a time), AssetTabEditor (the shared shell of the asset tabs), TabHeader (the bar across the top of a tab – asset tabs, Plugins tab, NodeBoard),
TabStrip + tabRow (the tab row and what it does when the tabs outgrow it; plugin tabs are inserted at run time),
assetTabs (which asset kind opens into which tab, and so which kind has an editor at all),
TabButton (how a tab is drawn: the card of the one showing, plain weight, no pressed fill, #176),
DocumentTab (a document's tab: kind, name, close cross), documents (#171: where a new document's tab goes, which one shows
after a close, a tab going on to another document — pure, so checkable without a browser).
One editor per kind serves every open document of that kind: `Editor` points it at the one on
@@ -117,7 +122,8 @@ src/editor/inspector/ Inspector panel, host (what a section builds into), field
one section per selection kind (asset/object/node/frame), variableRows (one row shape for
every variable), portSection, aspectAction, objectQueries/vectorRows/parentRow
src/editor/panels/ AssetPanel, assetGroups (groups by type and their order, #176), assetIcons (one SVG per
asset type in icons/, shared by the panel, the + menu, the tabs and Scene objects),
asset type in icons/, shared by the panel, the + menu, the tabs and Scene objects,
plus the List and Game tabs' own two, which stand for no asset),
assetMenu (the two groups of the + menu), HierarchyPanel, Toolbar,
TilemapPanel (tools, tiles and layers of the one selected tilemap, beside the scene view, #142;
painting itself is SceneViewport)
+9 -2
@@ -60,7 +60,8 @@ A sprite, camera, text or collider has no tab of its own, so a double-click on o
Right-clicking a row offers *Set as active scene*, *Set as start scene* / *Clear start scene*,
*Create sprite from texture*, *Create animation from texture* and *Delete…*. In
**Scene objects** it offers *Select asset*, *Open asset* (the same as double-clicking the asset
in the asset panel), *Add collider*, *Create container*, *Unpack container*, *Unparent*,
in the asset panel; greyed out for a kind that has no editor of its own, such as a sprite or a
camera), *Add collider*, *Create container*, *Unpack container*, *Unparent*,
*Expand all* / *Collapse all* and *Remove*.
The asset panel and **Scene objects** share the left column; the divider between them drags
the height from one to the other, and dragged all the way either keeps its header. The split is a
@@ -74,7 +75,9 @@ one gets its tab right of the document on screen (or last, from a fixed tab). Se
one kind can be open at once — two textures, three behaviors — each with its own tab.
- The tab shows the **icon** of its kind, then the name, so a behavior and a texture both called
`Player` stay apart; the `»` menu lists hidden documents the same way. A long name is cut with an
`Player` stay apart; the `»` menu lists hidden documents the same way. **Scene** and **Game**
carry an icon too (#176) — the scene one from the asset panel, a play sign for the Game tab.
Only **Plugins** and a plugin's own tab go without one. A long name is cut with an
ellipsis. Renaming an asset renames its tab.
- A document tab always shows its own asset. Selecting something elsewhere never changes it; there
is no picker in the tab's header any more. Selecting what lives only inside a document — a node,
@@ -86,6 +89,10 @@ one kind can be open at once — two textures, three behaviors — each with its
both are where you left them. Following a call node into another behavior stays in the same
tab, and the breadcrumb stays with that tab.
- Open tabs are not remembered: a loaded project starts on the Scene tab.
- Tabs are drawn as **index cards** (#176): the one showing is a light grey card with rounded upper
corners standing on the line the row ends with, the others only take a colour under the pointer.
Both write their name in plain weight — the fill says which document is on screen — and pressing
the card that is already showing does not change its colour.
When the column is too narrow to hold every tab — a small window, many documents, or the side
panels dragged wide — the ones that do not fit move behind a `»` button at the end of the row,
+1 -1
@@ -12,7 +12,7 @@ npm run check # typecheck + lint + format:check + tests, the gate CI runs
# code is lost (tail's is reported), so a red run reads as green
npm run build # writes dist/ and regenerates index.html
./build.sh # the same under `set -o pipefail`, for callers that pipe the output
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1103 editor checks, screenshots in /tmp/gm-e2e-*.png
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1109 editor checks, screenshots in /tmp/gm-e2e-*.png
GM_STEPS=20 node tools/e2e.mjs # or 1-12, or 6,20 — a subset while working on one step
./e2e.sh start [GM_STEPS] # the same run detached, see below
./e2e.sh status # live progress, or the last run's result