Commit Graph
707 Commits
Author SHA1 Message Date
FredApps c94daa5861 Include the new accessibility controls coverage in registry discovery 2026-11-19 12:58:52 +01:00
FredApps b04d18a735 Select UI suite items through explicit registries 2026-11-19 12:20:08 +01:00
FredApps f8dddb2a55 Split UI test kit from story suite 2026-11-19 09:25:07 +01:00
aiongg d7804c73c2 access: the controls step reaches the tests through runtime::egui 2026-11-19 07:41:02 +00:00
aiongg 4ec453ed5a access: the controls tests live in the integration binary 2026-11-19 06:38:55 +00:00
aiongg c6537b6d07 access: rustfmt 2026-11-19 04:09:37 +00:00
ussoewwin 326438a6f9 access: a popup's node this update does not carry leaves no dangling controls
accesskit_consumer's Node::controls() unwraps every id in the relation, so an update whose
controls names a node it does not carry aborts the app once the host's UIA adapter applies it.
In PhotoCraft on Windows, clicking Image, Edit or Layer in the menu bar did exactly that
(photocraft#15597), and on one machine Filter too — an ordering difference per menu.

emit.rs adds every open popup's id, and a menu reports its popup open on a frame where the
popup's own node is not emitted. The runtime plugin now prunes the finished update in
output_hook, keeping a controls id only when the same update carries its node. Other relations
are untouched: they are built from nodes the pass wrote.

The tests fail without the change: the relation keeps an id with no node.
2026-11-19 04:09:28 +00:00
David Mann b5b1300783 Lazy::show_or: a view that leaves its room takes none
next has been red since #2273 on two counts, both in the dock's settling
host view (3bcc5bec4):

- design-lint: contract/lazy.rs named `egui::LayerId` for the run's
  layer. The run now holds the runtime's `Layer`, the type `Place` and
  `replay::close` already use.
- hovering_a_tab_runs_only_its_group: the dock ran its host view in a
  `scope_builder`, which takes room and item spacing in the Lazy's
  child even when the host leaves the group to the dock. A replayed
  group then sat 4 points lower in flow than a group that ran, so the
  child's extent changed whenever a hovered group ran, layout memory
  asked for a discard pass, and that pass ran every group (5 runs
  where 1 is expected).

`show_or` now runs `add` in a child `Ui` that takes room only when it
returns `Some`, so `otherwise` takes the same place whether it runs or
replays.
2026-11-19 00:55:45 +01:00
David Mann 04ba41419b Merge pull request #2242 from ljkx/fix/15540-dialog-first-field-selected
Dialogs: a dialog that opens on a text field selects its text (photocraft#15540)
2026-11-18 23:27:59 +01:00
aiongg 0392fc439d Commands: the gate answers each command once per frame
The board asked the app's gate again for every resolution: each reader
of a command, the measuring and the real run of each component, and the
re-resolution of every shown reader at the start of each pass. The gate
is a snapshot of what the app knew before the frame, so the board keeps
its answers for the frame and asks once per command. CommandRef::key_text
gives the key without allocating for a command without parameters; the
keymap's lookups and the board's answers use it.
2026-11-18 20:59:41 +00:00
aiongg 3bcc5bec46 Dock: a host view settles under its panel's content version
DockPanels::group_view ran in every pass, while the dock's own groups
settle their bodies under DockPanels::content. A host view now runs in a
settling Lazy under the shown panel's content version, the group's
panels and its shown tab, and repaints its last run while they hold.

Lazy::show_or carries the host's answer: the view runs first, and where
the host leaves the group to the dock, the dock's group shows in the
same child and that run is not kept, so the next pass asks the host
again. The run-count trial checks that a settled frame runs neither the
view nor the versioned body.
2026-11-18 20:59:41 +00:00
David Mann 650979426d Merge pull request #2067 from davidmann4/perf-menu-hover-lag
Menus: test that the highlight moves to the next row in the frame the pointer reaches it (photocraft#15477)
2026-11-18 20:45:44 +01:00
David Mann e5a16290fd Merge pull request #2121 from davidmann4/input-reply-at-pass-end
Control channel: answer injected input with the pass that ran it, not one pass later (photocraft#15493)
2026-11-18 20:04:55 +01:00
David Mann e380b20809 Merge pull request #2136 from davidmann4/fix/window-edge-drag-leaves-window
A press whose pointer left the window still drags: window edges resize when pulled out (#2132)
2026-11-18 19:54:12 +01:00
David Mann 90ca881c87 Merge pull request #2066 from davidmann4/fix-floating-panel-drag
Floating panel windows follow the pointer when dragged (photocraft#15478)
2026-11-18 19:52:53 +01:00
David Mann 3e624f9930 Merge remote-tracking branch 'origin/next' into HEAD 2026-11-18 18:35:50 +01:00
David MannandClaude Opus 5.5 b2612c91dc Menus: test that the highlight moves to the next row in the frame the pointer reaches it
A menu row's highlight comes from the LEAD flag rule, which resolves without easing, and
the popup makes the row under the pointer active before its rows run. The new test pins
both: the frame that moves the pointer onto the next row paints that row's full highlight
and none on the row it left, with no time passing. It fails if the active row follows the
pointer a frame late, or if the highlight moves onto the eased hover mix (80 ms).

Fixture::frame_shapes_with(events) returns what the frame that took the input painted.

Part of photocraft#15477.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:31:34 +01:00
David Mann c4c4355e48 Merge remote-tracking branch 'origin/next' into HEAD
# Conflicts:
#	crates/ui-contract/src/runtime/windows.rs
2026-11-18 18:27:21 +01:00
David Mann 507060a883 Merge remote-tracking branch 'origin/next' into HEAD 2026-11-18 18:27:11 +01:00
ljkx 7be4487c58 fix(ui-contract): a dialog that opens on a text field selects its text
A focus scope shown for the first time moves focus to its initial stop
(a dialog's `Initial::FirstField`), but a plain text field then put the
caret after its text, as its codec asks for any focus gain, so typing
added to the value instead of replacing it (New Layer's name read
"Layer 17" after typing "7").

The initial focus now records its own origin, `FocusOrigin::Open`. A text
part that gains focus that way selects its whole text whatever its codec's
caret. Tab and clicks keep their caret rules, and `focus_arrived_by_key`
still counts the open as an arrival by key, as before.

photocraft#15540, part of storytold/photocraft#15476.
2026-11-18 17:15:31 +01:00
aiongg 9442a099f2 Merge storytold next into themecraft-wave1 2026-11-18 16:05:01 +00:00
aiongg 016ca5425d Merge storytold next into themecraft-wave1 2026-11-18 14:01:25 +00:00
aiongg f1c8460306 Merge storytold next into picker-full 2026-11-18 14:01:22 +00:00
aiongg f9a53dd0ee Merge pull request #2129 from aiongg/settle-chrome
Dock and title chrome settle like panel bodies (photocraft#15493)
2026-11-18 08:52:26 -05:00
aiongg 999f4583c4 Merge pull request #2182 from aiongg/contract-stack
contract: a component's run keeps only what it reads after its children on the stack
2026-11-18 08:51:16 -05:00
aiongg 780c13fa81 Merge pull request #2127 from aiongg/toolbar-overlay-scroll
Toolbar: hover-only overlay scroll bar, one named drop mark per dock drag (photocraft#15524, photocraft#15526)
2026-11-18 08:50:18 -05:00
aiongg 076fa67056 Merge pull request #2080 from aiongg/histogram-native-expand
Native dock windows: the app's move is known from the window's first pass
2026-11-18 08:49:51 -05:00
aiongg 97ca29aeb9 icons: the set a theme names resolves in the style layer that holds it 2026-11-18 08:34:26 +00:00
aiongg b15eeaa81f contract: the measure run's layer goes through runtime::egui::areas 2026-11-18 08:30:30 +00:00
aiongg c60f9c9066 contract: clippy-clean after the stack split
Drops the three cognitive_complexity expects the split made unfulfilled, the borrows of cx.core that is already a reference, and moves BodyOwner's doc line back onto it.
2026-11-18 07:38:22 +00:00
aiongg b77d8760c3 contract: a component's run keeps only what it reads after its children on the stack
A component's children run inside its pipeline (the measuring run of step 5, the overlay, paint, the body and
paint_over), so every frame on that path stays on the stack for each nesting level. The level kept all of steps 1 to
17's working state there: CxCore moved by value through the dyn call into Cx, the component taken out of Typed into
with_cx, and run_steps, run_in_host and the body step each one function with every step's locals.

- Cx holds `&mut CxCore`; the run builds the core once, in run_passes, out of the frame step 5's measuring runs
  recurse from. finish keeps its signature.
- The show's caller makes the component's slot; Typed borrows it and finish takes it out after the children ran.
- run_steps, run_in_host, the body step and the measuring run are drivers over per-step functions; what crosses a
  child's run is a small state struct (Begun, HostStep, BodyPlan, MeasurePlan).
- Layouts, label columns and region contexts build their Ui, UiBuilder and BodyCx in helpers, and each body layout
  and label-column arm runs in its own function.
- Helpers that opt-level 2 merges back into a recursive frame are inline(never).

A body sixteen containers deep shows on a 512 KiB stack (body::nesting).
2026-11-18 07:27:48 +00:00
aiongg caf0f01d00 Merge remote-tracking branch 'upstream/next' into settle-chrome 2026-11-18 05:29:08 +00:00
aiongg 36749e88a3 Merge remote-tracking branch 'upstream/next' into toolbar-overlay-scroll 2026-11-18 05:29:05 +00:00
aiongg 22d4cd8e8e Merge remote-tracking branch 'upstream/next' into picker-full 2026-11-18 05:29:03 +00:00
aiongg e157a6c330 Merge remote-tracking branch 'upstream/next' into themecraft-wave1 2026-11-18 05:29:00 +00:00
aiongg 04e1f2eda9 Merge remote-tracking branch 'upstream/next' into histogram-native-expand 2026-11-18 05:28:58 +00:00
aiongg 8bb7cc1223 Merge remote-tracking branch 'upstream/next' into label-scope-nested 2026-11-18 05:28:53 +00:00
aiongg a61e91f4c7 story suite: the settle checks run on one OS
On macOS the menu bar moves to the system menu, so a MenuBar story draws nothing in the window and the leaf-allocation check failed on macOS runners. The checks (allocates, stable id and size, one pass) hold on every OS.
2026-11-18 03:55:02 +00:00
aiongg 80c7fd661c menu bar and list tests: PC keys on every runner
The in-window menu bar, its Alt, F10 and letter keys, and Ctrl moving only a list's lead are PC behaviour. The fixtures took the host's OS, so the tests failed on macOS runners.
2026-11-18 02:45:07 +00:00
aiongg 5e56f5c98b icon id scan: only crates that use icon ids
craft-cloud-ui is plain egui: its menu item's icon("..") is a text glyph, not a catalog id.
2026-11-18 02:20:23 +00:00
David Mann 13b9bf4d46 A press whose pointer left the window still drags: window edges resize when pulled out (#2132)
winit reports the pointer leaving the window while the button is held, and the
press machine marked the open press abandoned, which also stopped its drag from
starting. A window's resize grip lies inside the window and starts the OS
resize on DragStart, so pulling an edge outward left the window before slop and
the resize never started. Leaving the window now ends only the press's click.
2026-11-18 01:52:13 +01:00
aiongg fe51208f1d Settle check reads only the menu bar's id, and only with menu keys; run records stay private
runtime::replay is crate-private again; its journal is re-exported for the crates whose services keep per-pass registrations.
2026-11-18 00:23:14 +00:00
aiongg 26ba3c1196 Docs: what the dock's spec version covers and when panel_rows runs; a host keeps its Arc<Host> across frames
Trial: a settled child runs again when the host switches the language.
2026-11-18 00:23:14 +00:00
aiongg 12b9ac772f Menu bar keys reach a settled menu bar
The focus record keeps which bar registered for the menu keys, the registration is journaled so a replay makes it again, and a pass with menu keys counts them as routed to that bar, so it runs and takes F10, a lone Alt and Alt with a letter.
2026-11-18 00:08:33 +00:00
aiongg fc585f6227 Window caption parts: a settled region declares them again when it replays
A title bar that settles keeps the caption record the Windows hit test reads.
2026-11-17 23:57:45 +00:00
aiongg e55ae75b95 Dock drop spots: a settled region registers them again when it replays
DockTargets notes each registration in the open run records, so a group or column that replays its last run keeps its drop spots, room and bands.
2026-11-17 23:53:08 +00:00
aiongg 725df6bf03 Settling: a region runs again when its environment changes (theme, density, scale, language, window active)
The env key folds in the generation of the scope's built-in words, and a settling child's place holds the env key it ran under.
2026-11-17 23:52:35 +00:00
aiongg f873abce2c Trials and a short-room story for the overlay bar and the named region mark 2026-11-17 23:44:00 +00:00
aiongg 2121d228ed Dock drags: one region mark that carries the panel's name, no frame at the pointer (photocraft#15526) 2026-11-17 23:40:54 +00:00
aiongg b2c8635980 Scroll: an overlay bar in the padding that shows under the pointer; the tool rail and bars use it (photocraft#15524) 2026-11-17 23:39:22 +00:00