A menu that opened in the pass of a recorded outside press read that press
as its own dismissal and closed at once: a right-click on a second opener
whose press and release share a frame closed the first menu and lost the
menu it opened. The dismissal now skips the record for a layer that
appears in the pass, which was not open when the press was made.
Adds a trial: right-clicking a second opener while a menu is open closes it
and opens the second one, with the press and its release in their own
frames and in one.
A catalog-wide set of ids whose chords the board passes over is a second
key dispatcher beside the board, and it ignores the ids a linked set
defines. Review asks for it out of this PR; its replacement comes in a PR
of its own.
Removes the builder and the shown_only field, the board's leaves_key skip
path with the runs_now and hold/press filters that read it,
docs/contract-api.md's line for it, and its trial in
crates/ui-shell/tests/it/commands/app_catalog.rs.
A dock panel's OS window gets its keys alone, so an Escape pressed there with
nothing focused became that window's Cancel, which no app code reads: a command
started from a floated palette could not be cancelled. The end hook hands a Cancel
left in such a window (`WindowSpec::hands_on_cancel`) to the window it was opened
from, which reads it as its own in its next pass. A popup or a modal open in the
floated window keeps the Escape, and a modal that opened meanwhile drops it.
An unclaimed press surrendered the focus of a canvas declared with
host_canvas at the press (apply_press), and egui's click-away rule took
a focus the app itself had given the canvas at the release. The press
rule now keeps a declared canvas focused, and the begin hook takes the
focus on it off egui's rule, whoever gave it. A canvas the app no longer
declares follows egui's rule again.
One conflict, in docs/ui-docking.md: next added bullets for tab presses keeping
key focus and for floating windows stacking with app windows next to our
split-handle bullet. Kept our split-handle sentence (a pointer press or drag on
a handle leaves key focus) and next's two new bullets after it.
The Rust files merged cleanly. next still has dividers that take focus on a
press, the flyout room limited to the space below its top, and no RailTool
icon, so none of this branch's changes is covered by next.
One conflict, in docs/contract-api.md at the runtime::focus listing: next
removed focus::host_stop and reworded host_canvas (c933a9062); this branch
lists focus::is_focused. Took next's host_canvas line and dropped host_stop,
kept is_focused, which is public in next's source too. The other files
merged cleanly.
The runtime keeps its surrender rule on the focus it gave an app's own widget
until no pointer button is down, so the release of the press that gave the
focus does not take it back. The record of the given focus ends once egui's
focus is elsewhere. Whether a widget is drawn is read from egui's widgets of
the running pass, for the given focus and for `host_canvas` findings alike.
Focus given to a canvas before `host_canvas` registers it follows the canvas's
keys.
A canvas drawn in a disabled `Ui` is a `canvas-without-widget` finding too;
the finding's text is made only when it is kept, and a fault is logged once.
A widget drawn with the bare Sense::DRAG or Sense::CLICK is not focusable, and
egui takes the focus from it when it is drawn, so Tab is lost there too. The
end hook reads the sense of the canvas's widget and names it in the finding.
Focus that Tab, F6 or a framework request gave an app's own egui widget
kept the runtime's surrender rule (Never) while the runtime's press rule
left that widget to egui, so a press elsewhere released it nowhere. The
end hook of the pass that drew the widget leaves the focus to egui's rule,
the app's `surrender_focus_on`; until then the press or click of the pass
that gave the focus does not take it back. The stop of an app's own widget
sets no Escape filter, so Escape releases it as egui does; the declared
canvas keeps its filter.
egui drops the focus of an id no interactive widget of the pass has, so Tab
lost the focus at such a canvas and started over at the first stop. The end
hook looks each declared canvas up among the pass's widgets and reports
`canvas-without-widget` when it is not there; debug builds log it once.
- ui-panels iconic trial: the two literal 0.5 tolerances are relations (`first` above the
gripped first icon; the rule `near` the middle of the room).
- ui-shell Column start page: the bottom page margin is `add_space` of the token, not
`allocate_space`.
- ui-widgets Tile: `PAPER` (a blank page, data) and `Tile::page`'s width and height (a
proportion in any one unit) are marked and listed as exceptions.
- docs/components-index.md regenerated (Link's `LinkLook::Plain`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts:
- value_drag/slider.rs: next added the TrackPress::OnPress follow-on-down path
and kept press_at reading current(); kept next's shape and our mixed-aware
press_at, so a press on a mixed slider still jumps to the pointer.
- tests/it/text/text_field.rs: both sides appended trials at the end; kept
ours (wheel over focused fields) and next's (keeps_on_escape) side by side.
Next covers none of this branch's changes.
The focus service takes egui's focus candidates of the pass (Memory::focus_candidates) at every
order-dependent registration and at the end hook: each widget no component made becomes a stop of
the app's own, where it was drawn among the framework's stops, a text stop for a TextEdit. Recorded
views and lazy children replay them with their transcripts.
A bare Tab is the framework's move unless an egui popup is open or the app's focused widget keeps
Tab by its egui key filter. Removed: focus::host_stop and the separate egui-Tab path for windows
without framework stops. The scrim absorber no longer takes key focus.
A bound control that sensed no wheel bit still got a gated vertical wheel
taker. A focused check box, switch or other value control that never reads
the wheel therefore took the wheel while the pointer was over it and dropped
it, so the form around it did not scroll.
Controls now take the wheel only through their sense. The new
Sense::WHEEL_Y_FOCUSED bit takes the vertical share only while focused or
armed, in any wheel scope. RangeSlider and ThumbRow, the two value controls
that read the wheel without sensing it, declare it, and the fallback taker
is gone.
TabStripOutput reports the overflow button's rect and access node id while
some tabs do not fit. The dock group passes it on (DockGroupOutput::overflow,
through the memoized tab row so a replay moves it with the row), and the dock
area reports it beside the group's tabs as SourceKind::Overflow, named by the
group's first panel, so a host can give the button an automation id.
focus::host_stop registers an app's own egui widget as a focus stop
(Stop::host, as host_canvas does, without marking a document canvas), so a
window that has framework stops and the app's own widgets keeps one framework
Tab order holding both, in registration order.
A canvas keeps Tab only while it has the focus. With nothing focused a bare Tab
moves focus into the window or toggles the panels, even for a canvas that
keeps Tab, as the unfocused canvas's claims already never take Tab: the canvas
cannot trap keyboard navigation. The last assertion of
a_host_canvas_marks_the_window_and_tab_toggles_its_panels changes to this
rule: with nothing focused, the Tab toggles the panels instead of reaching the
canvas in egui. The unused Strip::canvas field goes with the old rule.
While an app's own egui widget or popup has the focus, a plain Enter stays in
egui's input for it and no window Submit comes of it, as with Tab and Escape.
The window's Submit was offered beside the press, so an app editor read one
Enter and an app that returns the window's Submit to egui read two; an app
TextEdit in a framework dialog also fired the dialog's default button. With
nothing focused the plain Enter stays the window's Submit and in egui's input.
A host body keeps its presses and its egui focus, so the group takes
no focus and DockAreaOutput::focused never names the panel clicked
into. BodyCx::pressed_within reports a primary press in the body's
rect on its layer whatever took it, sharing the press geometry with
surface_pressed, and the dock area reports the group's shown panel as
pressed.
Layout memory requests its discard pass from egui in its end hook, after the
app's UI, so Context::will_discard() read by host code during a pass that a
changed size runs again is still false. frame::will_rerun is true when egui
will discard the pass or when this pass asked layout memory for the frame's
discard pass and will get it. Hosts gate frame counts and settle counts on it.
The discard request stays in the end hook, so lazy runs and memoized replays
keep their records of the asking pass.
A file drop on a floating OS window reports the shown panel of the group under
the drop, from the drop session's pointer; the first group's on the title row or
when no pointer is known. ui-docking.md covers documents, swatches, raise and
WindowFiles.