Reviewer finding on the forwarded-keys work: the area appended every float's
leftover events and kept only the last window's modifiers, so a host that reads
two floats in one pass could not interpret the first window's events. A
clipboard event carries no modifiers of its own.
`DockAreaOutput::window_events` now holds one `WindowEvents` per floating OS
window that left any, in the order the windows were drawn: the panel the area
names the window by, the modifiers held in that window, and its events.
`forwarded_events` and `forwarded_modifiers` are derived from those batches, so
a host with one floating window reads them as before.
Regression: two native floats, one holding Shift and one bare, forward a paste
each in one pass; the batches keep their own modifiers whichever window holds
what.
ui-test-kit windows.rs: main's per-viewport child events (send, the addressed CHILD_EVENTS and input_pending) with this branch's child modifiers, inserted as each child pass's first event, and the frame's command input. native.rs: both sides' imports.
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.
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.
Conflicts, resolved in next's shape with this branch's behaviour and trials kept:
- keys/route.rs: begin clears both the pass's fired presses and next's intents_read;
note_fired, leftover_events and leave_clip stay ahead of queue_edit, whose doc is next's.
- dock/area.rs: window_files takes next's WindowFiles<P> (with its group-under-the-drop
push) beside forwarded_events and forwarded_modifiers; Passed destructures next's pressed too.
- tests/it/docking/native.rs: this branch's forwarded-key trials and next's dropped-file
trial both stay.
- ui-test-kit windows.rs: child_modifiers beside next's app_modal; a frame's input sets
app_modal, window_input and commands; egui imports take Modifiers and next's texture types.
- docs/ui-docking.md: next's DockAreaOutput list with forwarded_events and
forwarded_modifiers added, then this branch's paragraph on them.
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.
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.
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.
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.
A dock column's flyout is a popover, which egui draws in its foreground order, so it always covered a floating
window over it. PopupLayer::BelowWindows (Overlay::popup_layer) shows a popup opened outside every layer in the
windows' tier, listed under every window: a window over it is drawn above it and takes the presses there. Its
family keeps its place in the layer stack, so keys, Escape and dismissal treat it as a popup still, and the layers
opened from it stand above the windows. DockConfig::flyout_layer sets it for docked columns' flyouts through
IconicColumn::flyout_layer and Flyout::popup_layer; a floating window's own flyouts stay above it. The default,
AboveWindows, keeps today's order. Trial in ui-patterns docking columns.
Panel tabs shrink to their title's first three letters and clip the label at
the tab's edge, so a narrow dock column reads "Colo", "Swa", "Gra". Add
PanelTabShrink, a strip's choice (TabStrip::panel_shrink) that a dock makes
for its groups (DockConfig::tab_shrink). Under PanelTabShrink::Ellipsis a
panel tab shrinks no further than its label's readable least
(TextRun::READABLE_CHARACTERS and an ellipsis), a cut label ends in an
ellipsis, and the tabs that do not fit at that width go to the strip's
overflow menu. The default, FirstLetters, keeps today's behaviour.
Trial: panel_tabs_shrinking_to_an_ellipsis_keep_a_readable_prefix_and_overflow_the_rest.
An iconic column's flyout took at least the DockHeights default of each of its group's panels, so a panel given a
tall docked height also opened a tall flyout over a short body. FlyoutHeight::Docked, the default, keeps that;
FlyoutHeight::Content opens the flyout as tall as its body measures, while the panel's DockHeights still size its
group docked in a column. Trial a_content_tall_flyout_ignores_the_docked_height_that_its_docked_group_keeps.
Conflicts resolved so that next's changes and this branch's fixes both hold:
- keys: next's unfocused-canvas state claims join the key stage's framework claims; the canvas's
declared claims stay the host's (egui keeps their presses).
- overlay: the app's own modal (`FrameInput::app_modal`) joins next's modal stack at the frame it
first showed in.
- docking: the tab-pick trial moves key focus into the group with Tab, since a click on a dock tab
leaves key focus where it is.
The dock's floating windows live in ui-panels, so the call stays public, now a documented part of runtime::keys beside held and focus_holds rather than a hidden export. It reads the pass and changes nothing, so any host that shows content in its own OS windows can call it. contract-api.md lists it. Trial: leftover_events_holds_the_keys_no_command_took.
next gained DockConfig::panel_menu_always (with its trial a_dock_that_shows_the_panel_menu_always_gives_every_group_the_button), the same choice this branch added as menu_button. The duplicate option, its GroupMenuButton type, its trial and its docs row go; the dock reads only panel_menu_always.
The key stage now keeps fired_down: it drops a key at any release of it, whatever has focus, at a press of it that is no repeat (the earlier release went to another window) and when the window loses focus. unclaimed only reads the hold as it stood before the pass's events, so a release that lands in a focused field or in another window no longer swallows the next unrelated release of that key. Trial: a_key_a_command_fired_for_in_a_native_float_and_released_elsewhere_forwards_its_next_press_and_release.
The panel menu button choice was a per-app boolean; the variant rule asks for named options. GroupMenuButton defaults to HostRows, today's behaviour (the button only on groups whose shown panel has host rows). The panel menu trial covers both options and the default, and the DockConfig table in docs/ui-docking.md lists the field.
A dock panel's egui code (PanelSpec::host_body) ran in the framework's
measuring runs too, so egui saw its widgets twice per pass at two rects
and painted ID-clash warnings. HostStyle::show runs it in the real run
only; a measuring run takes the size its last real run took.
FrameInput::app_modal names the window where the app's own egui code
shows a modal; the app's other windows (native floats among them) are
blocked through the same path as under a framework app-modal layer.
The native float trial runs with RootEnv::shortcuts_repeat off and on: the press, its repeats and its release stay the
command's, and the command runs again at each repeat only with repeats on. The docking doc says how repeats, hold waits
and declined presses are forwarded.
Next reshaped the shortcut dispatcher (hold waits, RootEnv::shortcuts_repeat, KeyUse::command_keys, clips with their
place). The keys a command takes are noted on next's shape: a press that fires, a press that starts a hold wait, and a
repeat that runs its command again. A repeat that fires is the command's alone; a declined repeat goes the way of its
press, as a declined press is left over. The test kit's Windows keeps next's root_env beside the command input.
Conflicts:
- docking flyout.rs, iconic.rs: next closes a flyout on a press outside only with Auto-Collapse. The outside_closes option stays on that rule and now defaults off, matching next; the flyout's height inside the bounds keeps our rule.
- rails drawer.rs: a drawer row takes next's run and the tool's own icon.
- rails flyout.rs: the flyout rows take next's inline menu, tips and marked row, with the tool's own icon on each row.
- A pointer press on a dock's panel tab (a click, a drag's press, the tab menu's secondary press)
leaves key focus where it was (`TabStrip::keeps_focus`), so an app's own shortcuts keep working
after a tab drag or the tab menu; Tab still reaches the tabs. A press on a `host_body` panel's
body is the app's and no longer focuses the group's tabs.
- Floating windows leave the overlay's `set_layer_order` list and stack in egui's own area order,
which raises a layer when it first shows and when it is pressed: an app's own egui dialog opened
over a floating panel shows above it.
- A `host_body` panel's body is filled with the host style's panel fill (`HostStyle::paint_panel`)
and gets no body padding, as it showed outside the dock.
- Trials: tab presses keep focus, float order against an app window, the host body's fill and room,
and an unbound F6 reaching a hosted canvas (alone, and in a dock of host_body panels).
- The key target's declared claims count for Alt-code entry and the key stage: with nothing
focused the window's document canvas (`host_canvas`) stands for the focused component, so an
app's Alt+digit shortcut it claims reaches it on Windows and Linux. A host stop's claimed press
stays in egui's input, where the app reads it, focused or as the unfocused key target.
- `RootEnv::ctrl_wheel_pinch` (default on) makes the fold of a fractional Ctrl+wheel into
`Event::Zoom` a host choice: off, the wheel event stays as sent, for an app whose Ctrl+wheel
does something else or zooms at its own rate.
- `PanelSpec::host_body` marks a panel whose body is the app's own egui code: the dock hands its
body, footer, header, rail footer and group view the style of the `Ui` the dock was shown in
(`HostStyle`), while framework bodies keep the group's spacing.
The dispatcher fires no command for an auto-repeat, so a repeat in a later pass than the press it fired for went to DockAreaOutput::forwarded, and a host would run its own shortcut for the key on top of the command. A repeat of a key still down since a fired press is now the command's, until the release; keys no command took are forwarded with their repeats as before. The test kit's Windows takes a command input for the trial.
egui hands each OS window only its own input, so an app that runs shortcuts from its main window's input lost them while a floating window had the focus. The area now reports the key, text and clipboard events of its OS windows that the key stage, the window's widgets and the shortcut dispatcher left, with the modifiers held there, and none while a component of that window has keyboard focus.
A docked stepped column (a tool rail) was clamped to its content's height, so under a docked
toolbar the window background showed instead of the toolbar's surface. The reference
application keeps the docked toolbar's column surface down to the dock's foot, with the tools
at the top. Docked, a stepped column now takes the dock's height like any column; a floating
stepped window stays as tall as its content.
The dividers between docked columns and between a dock and the document area were the inline
gap (6 px comfortable, 4 compact); the reference application's are 3 px at 100%. They are now
the tight gap (3 px comfortable, 2 compact).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The window's column takes one held-height state shared with the collapsed
column: WindowColumn::held is the content height, and collapsed the strip's
own width. A column whose every group is minimized shows at its rect's place
and width with the title row and strips' height (DockSizes::minimized_height);
its sides resize the width, and WindowColumn::kept keeps the rect's height, so
an OS window's recorded placement and an in-app window's rect keep the
expanded size and a restore gives it back. Stepped columns keep fitting their
content, which already measures minimized groups as strips.
Fixesstorytold/photocraft#15862.
A collapsed dock window's sides resize its width, and only its width, within the bounds of a docked collapsed column
(DockSizes::iconic_bounds, the one rule both use), on macOS by AppKit and elsewhere by the window's own grips.
FloatingGroupOutput::collapsed_width reports the width, which the area keeps as the column's iconic width through the
docked column's own path (Action::ResizeIconic); names show from IconicSizes::labels as in a docked column. The height
stays the icons', the expanded rect keeps its size and the window keeps its edge. The column in a window has no
inner-edge divider: the window's sides size it, as for an expanded column.