Commit Graph
26 Commits
Author SHA1 Message Date
aiongg c30c9e1749 Merge remote-tracking branch 'upstream/next' into memo-stack
# Conflicts:
#	crates/layers/tests/it/main.rs
#	crates/menu/tests/it/main.rs
#	crates/ui-contract/src/testing/mod.rs
#	crates/ui-contract/tests/it/runtime/mod.rs
#	crates/ui-widgets/tests/it/menu/mod.rs
2026-11-20 20:32:36 +00:00
FredApps 36dea842e8 Merge remote-tracking branch 'origin/next' into perf/2332-print-coverage
# Conflicts:
#	crates/design-lint/src/workspace.rs
#	crates/menu/tests/it/main.rs
#	crates/ui-contract/src/testing/mod.rs
#	crates/ui-gallery/src/chrome/card.rs
#	crates/ui-gallery/src/viewer/catalog.rs
#	crates/ui-gallery/tests/it/main.rs
#	crates/ui-widgets/tests/it/bars/mod.rs
#	crates/ui-widgets/tests/it/body/mod.rs
#	crates/ui-widgets/tests/it/text/chips.rs
2026-11-20 19:23:18 +01:00
aiongg 42739aaa2d Dock on Derived: tracked panel specs, workspace revisions, layout-owned window ids
- `Workspace` fields are private. `revision()` moves with every write (a clone is a
  new source); `generation()` moves only on `replace` and ends drags as the old
  revision did. A trial walks every `&mut self` method, read from the source.
- Panel specs and permissions leave `DockPanels` for `PanelSpecs`, a plain-data model
  the host keeps in a `Tracked`. `DockArea` binds `Arc<Workspace>` and derives specs,
  permissions and keys from the workspace revision, the specs revision and the lock:
  an idle pass reads no spec, read-only docks included.
- `DockGrid::rail(cells)` is sized by the dock from its own tokens.
- Floating window ids come from a counter the layout owns; `replace` gives incoming
  windows ids the replaced layout never gave out. The dock's global id counter and its
  `no-global-state` allowlist entry are gone.

Part of #2336.
2026-11-20 18:16:52 +00:00
aiongg 5589523161 stories: values bound together come from one story value or StoryData::pair_at, helpers bind by source
A story binds two values at once from pair_at when one of them must keep its own name, as a dialog's open does for
the gallery's opener; values bound together otherwise share one story value, and a helper takes the value's ValueAt
beside it. The PDF export story's open leaves its settings value, so the card opens the dialog again after Cancel.
Unused Bind imports in story files are gone.
2026-11-20 10:11:06 +00:00
aiongg e69f80e8a3 gallery tests: a story value edit runs its card in the frame of the edit 2026-11-20 08:04:20 +00:00
aiongg b82c10b0e9 craft-ui: replay a memoized view at a moved place
A kept run replays where its room is now: the room's position leaves the place comparison and
becomes the offset of one RecordShift, which moves egui's records, every journal entry and what
a memoized view returned. Room size, layer, layout, scale and environment stay compared.

- Place::shift_to: the move is a whole step of egui's UI rounding; a moved record holds no paint
  callback and sits on an untransformed layer; clip rects follow when the clip moved with the
  room, or when the run lay wholly inside its clip (nothing culled). Otherwise the view runs.
- Shift: journal arguments (A: Shift) and MemoView's R (R: Shift) move by the replay's shift
  inside replay::replay; rects and points move, Clip goes through the clip rule, the rest stays
  (stays!). Vec2 has no impl: a size and a move are both Vec2.
- The engaged test reads the moved rect; the scroll-view rule compares the view moved with the
  record while the clip moved with it; sizing extents compare the room's size.
- The scroll body moves its content by whole UI rounding steps, as egui places widget rects.
- Trials: a moved replay equals a run there (pass records, revealed rects, returned rect); a room
  of another size runs; a cut run moved under its clip runs and moved with its clip replays; the
  Overview's scroll runs only entering cards and the pointer's.
2026-11-19 16:16:19 +00:00
aiongg c7f5e7654c craft-ui-gallery: trials for the memoized viewer panels
An idle viewer runs no panel body; a filter edit runs the tree and the
Overview; a selection change runs the panels that read it; a Properties
edit runs Properties, the Overview and one card. A saved layout round-trips
its component tabs by name and drops the ones the catalog lacks. The idle
Overview and shell-region trials account for the Overview's own view.
2026-11-19 15:53:27 +00:00
aiongg 2028470e8f craft-ui-gallery: the viewer's panels are memoized views over tracked browser state; tab names are owned and resolved through the catalog
The tree, stories, properties, inspector, Overview, component tabs and the
Variants view each read only their props. The browser's panel state is
Tracked and written only on a change; tab opens and Variants requests leave
through outboxes. The shell places the Variants view from the dock layout.
PanelId::Component holds an owned TabName; a saved layout drops the tabs the
catalog does not list, which replaces the interned static names.
2026-11-19 15:45:22 +00:00
aiongg 765c2ca9f7 craft-ui-gallery: story cards and their stories as memoized views
Each card is a memoized view over its spec and the states of its stories; each story's surface is a memoized view
keyed by its data's revision, which the end of its run, the Properties editors and the dialog opener move through
StoryData::settle. The story's surface is inside its view, so a story that fills takes its content's height there.
The card Lazy no longer settles; inspection records and value texts are journaled, so a replay keeps them. The
browse places and relink stories ask for their next run with the framework's repaint, which reruns the view.
Trials: an idle Overview runs no card or story, a story data edit runs one card, a scroll runs only cards in view,
a story with its dialog open runs every frame, and the inspected card replays with its run's record.
2026-11-19 15:20:13 +00:00
FredApps d9a3c6d7ce Fix gallery registry test lint 2026-11-19 15:05:49 +01:00
FredApps b04d18a735 Select UI suite items through explicit registries 2026-11-19 12:20:08 +01:00
aiongg c3d7655b9e Shell and mock: AppShell::tools and Slot::columns removed; the gallery mock's toolbar is a stepped dock column drawn through group_view, with a collapsed Navigator column and flyout binding 2026-11-17 04:03:17 +00:00
aiongg a6dc55e4ed Gallery overview tests: classify the OS appearance source for the measuring-run guard, list the Layers panel's own stories before its filter stories, open a hosted dialog story in the dialog trial 2026-11-14 16:22:31 +00:00
aiongg eb01f1f302 Lints: slice iteration in gallery test, private token doc link 2026-11-14 02:08:38 +00:00
aiongg 476602d4a3 A filling story's card is as tall as its content, and content taller than the room shares it
Along a height its parent sizes from its content, a container that fills takes its content height, at most the
room it is offered. When the content is taller, the measuring run is taken back and the container is laid out as
given the room, so its list and the bar under it share it; a record of the content height lets later runs and kept
transcripts lay it out the same. room_height only offers a finite room inside a scroll: a gallery card is as tall as
its story's content, at most the view, as the old gallery's tiles were.

layout_memory::draft runs a measuring run whose hand-forwards can be taken back once its result is seen: records,
kept transcripts, the open transcript's items, leaves and inputs, and each contribution (Contribution::undo for
column widths, label control minimums and reads). steps::id::draft takes the Auto id ordinals back with it. The
shrinking row's least probe is a draft taken back that reads nothing from outside.

A scrolling collection that fills keeps to its measured height in the real run under a body sized from its content,
so a footer under it stays below its rows. The PlacesTree story keeps the old 380 pt box.
2026-11-12 14:32:40 +00:00
aiongg b3bd1897a4 Overview: a settled card repaints its last run
Each card sits in a settling Lazy inside its row: a settled frame of the
Overview runs no card. Lazy::settles notes that a settled reader needs a
binding that stays in place between frames.
2026-11-12 14:32:40 +00:00
aiongg af4791df71 Overview: a row out of view does not run
Each row of the Overview's grid is a Lazy child of the scroll body, keyed by
its cards and the column count, so only the rows in view run their Grid and
cards. The per-card Lazy goes. A card's Panel takes its id from the card's
key, so a change of the column count keeps each card's state.

Trial: a settled pass of a short view runs as many Grids for the whole
Controls level as for a filter that lists the same cards in view.
2026-11-12 14:32:40 +00:00
aiongg 0e9ca32073 Story readouts: a line under the story in the old stories' words
StoryOutput::readout is a line a story words about what it shows or what last happened in it;
the gallery card shows it, muted, under the story in every layout. StoryData::note keeps what a
readout needs (last event, click count) outside the story's values, so drives and Reset compare
values only. The old readout lines come back for ColorWheel, ColorPicker, SwatchPalette and
SwatchTable, GradientPalette, TipEllipse, the symmetry canvas stories, LutPicker, ColorChoice,
Swatch, LayersPanel, MediaBin, ChannelsPanel, ToolRail, StrokeEditor and StrokeButton.
2026-11-12 14:32:40 +00:00
aiongg eb850635e7 Gallery card: the start Reset compares with is noted after the story's first real run
A pass that took a kept measurement, ran only the measuring run or held the story back
noted an empty start, so every value the story made counted as a change and Reset showed
at rest on most cards of a level (ToggleButton, TipEllipse, CompareTile, CurvesPanel, ...).
2026-11-12 14:32:40 +00:00
aiongg 543ab4236e Overview: selecting a component glides its card to the top
Lazy::reveal asks its scroll body to glide until the child starts at the
view's start, run or not; the body follows the child's place on the motion
service's follow curve and a move of its own ends the glide. It replaces
Lazy::keep. The gallery's Overview passes the selected card's reveal in the
pass its cards follow the selection, in place of egui's scroll_to_rect,
which no scroll body reads.
2026-11-12 14:32:39 +00:00
aiongg 6c748d2a28 Pin the gallery's Overview tab
The Overview stays where the layout puts it: it neither moves, floats nor
closes. It still takes tabs, so component tabs open beside it.
2026-11-12 14:32:39 +00:00
aiongg c6b9f48bc5 A story runs in its view's shell, in one body
The card runs each story in one Stack inside the view's embedded shell,
without a shell of its own per story. The shell counts the dialogs shown
in a pass (ShellCx::dialogs_shown), and the card reads the count around
its story, so a story's dialog opens over the view. AppShellOutput loses
its dialog flag, which only the card read. story-render shows a story in
an embedded shell of its own.

testing::last_pass_runs counts a pass's runs by component type; the
Overview trial asserts that the shell regions don't grow with the
stories in view.
2026-11-12 14:32:39 +00:00
aiongg 16b43d84a5 A kept measurement serves the value text its run found
A record of layout memory holds a measure or a text. emit_text hands a
text forward through the same transcript as emit_record: a body that
takes its kept measurement gives the text its measuring run found, where
the content that found it does not run, and a real run's text other than
the kept one shows the transcript changed. The gallery card emits each
story's value text in its shell and the form rows read it beside the
story, so a settled Slider card runs one pass per frame.
2026-11-12 14:32:38 +00:00
aiongg 9305448598 Gallery cards run each story once: an embedded shell as tall as its content
AppShell::content_height sizes an embedded shell from its body's measure,
which its body keeps while its inputs hold. The body pane is a pane at its
rect as tall as its content, taking its height in the scope's flow. The
gallery card drops its two measure_in runs and its detached shell record;
the value text and the dialog record come from the shell's real run, and a
story whose shell showed a dialog gets the card's whole room.
2026-11-12 14:32:38 +00:00
aiongg e872978edc Overview first show runs only the cards in view
A Lazy child no pass showed yet takes the estimate its app gives
(`Lazy::new(key, estimate)`): that long along the axes its scroll area
scrolls, nothing across them, as a collection places rows it never built
by its item layout's estimate. The never-shown "always run" branch of
`lazy::decide` is gone. Gallery cards estimate their height from their
story rows.

A scroll position the framework holds is also named by content: the
first child at or after the view's start (`lazy::Anchor`, kept with the
offset in `ScrollState` and a collection's `Scrolled`). When extents
before it change, the offset follows the child and the pass runs again,
so the content in view does not move. Bound offsets keep no anchor.

Entries of the out-of-view store record their scroll area. A frame drops
only the entries an area that ran did not reach, so a hidden area (a tab
switched away) keeps its children's extents.

Trials: first show, shown again after a hide, content in view stays when
an estimate above it resolves, collection rows stay when a row above them
changes height; the gallery trial asserts each level first runs the cards
in view.
2026-11-12 14:32:38 +00:00
aiongg a5469d5446 Gallery and story renderer: every component's stories, old/new comparison 2026-11-12 14:32:38 +00:00