resting_placement returned a stored placement that already held a size before applying Overlay::drag_bounds, and the
mount showed the layer's body at that rect, so a layer the user resized could end with its title row outside the
window under DragBounds::TitleVisible. The keep now applies to a floating layer's stored size and place, before the
default-size path, as it already did to a move and to a place the caller gives.
Trial: a_resized_layer_keeps_its_title_strip_inside_a_drag_past_the_window_edges in
crates/ui-contract/tests/it/body/placement.rs.
Panel tabs keep the framework's clip and overflow: they shrink to their first letters with the label clipped at
the tab's edge, the shown tab whole, and the tabs that do not fit go to the strip's overflow menu.
PanelTabShrink::Ellipsis goes with the option that chose it: DockConfig::tab_shrink, the group's tab_shrink,
TabStrip::panel_shrink, Tab::panel_shrink, FitMode::ShrinkToLeast, TabKind::fit_mode_for and clips_label_in,
and craft_behavior::fit::fit_to_least with its docs.
Trials: the two ellipsis trials and the helpers they alone used are removed with the option.
A collapsed column's flyout joins the floating windows' own egui area order, for every app, so the last of
them opened or pressed is on top, and the app's own windows stack with it. The per-app choice goes:
PopupLayer, Tier::BelowWindows, Overlay::popup_layer, DockConfig::flyout_layer, IconicColumn::flyout_layer
and Flyout::popup_layer, with their docs. A layer stands in the windows' tier through
Overlay::among_windows, which a flyout always sets.
Trial: a_flyout_stands_among_the_floating_windows_in_their_order replaces the flyout_layer trial in
crates/ui-patterns/tests/it/docking/columns.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.
Conflicts, all resolved by keeping both sides:
- docking/config.rs: next's ColumnCards import and flush_docks setter beside our PopupLayer, PanelTabShrink and tab_shrink setter.
- docking/flyout.rs: next's docked field and Flyout::docked beside our popup_layer prop.
- docking/iconic.rs: next's ActiveLook import with our FlyoutHeight and PopupLayer; the flyout takes both popup_layer(layer) and docked(self.framed).
- dock/area.rs: the iconic column takes our flyout_layer and next's tab_look and framed.
- tests/it/docking/columns.rs: next's craft_theme import with our Button and PopupLayer imports.
- tabs/mod.rs, tabs/tab.rs: next's TabCloseLook beside our PanelTabShrink.
- docs/contract-api.md: next's host_canvas wording, keeping the generated runtime::focus::is_focused entry.
Next does not cover any of this branch's changes.
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.
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, resolved in next's shape keeping this branch's behaviour:
- body/window.rs: next binds the press start (for start.handed); kept the
shown rect the keep rule may have moved, and took origin from start.
- docking/group.rs: next's always-panel strip and shown_tab(); kept
panel_shrink(row.shrink).
- docking/mod.rs: export both FlyoutHeight and next's PanelDocument.
- iconic/trials.rs: imports of both (DockColumn, FlyoutHeight,
IconGroupSeparator, CELL).
- tabs/tab.rs: next counts the close button in parts and holds it beside the
first letters; kept the ellipsis least, which now takes the close button
from parts instead of adding it separately.
- docs/ui-docking.md: PanelSpec row lists FlyoutHeight and next's fields.
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.
Under PanelTabShrink::Ellipsis the shown panel tab kept its whole title, as
it does under FirstLetters, and the other tabs shrank only to the widest
tab's least, so a group sent a sibling to the overflow menu where every tab
would fit at its readable least: DesignCraft's Stroke, Color and Swatches
group hid Color while Swatches was shown, and Separations Preview hid
Attributes and Preflight.
Add FitMode::ShrinkToLeast and craft_behavior::fit::fit_to_least: every tab
shrinks, the shown one too, the widest first, each no further than its own
least, and only the tabs that do not fit at their least overflow, the last
ones first. A panel strip under PanelTabShrink::Ellipsis fits this way
(TabKind::fit_mode_for); FirstLetters and the other kinds are unchanged.
Trial: panel_tabs_shrinking_to_an_ellipsis_all_reach_their_least_before_any_overflows.
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.