Commit Graph
516 Commits
Author SHA1 Message Date
skylartaylor 86f19be818 docs: regenerate contract-api.md 2026-11-25 19:16:31 +01:00
skylartaylor d30327bfef docs: the fit module line back to next's, now that the fit helper is gone 2026-11-25 18:07:02 +01:00
skylartaylor bb5c23315e A stored placement keeps the part DragBounds keeps inside
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.
2026-11-25 18:03:07 +01:00
skylartaylor cac8725f59 Panel tabs clip and overflow: drop the ellipsis shrink
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.
2026-11-25 17:56:05 +01:00
skylartaylor 2e7fcfacc8 Dock flyouts stand in the floating windows' order; drop the flyout layer 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.
2026-11-25 17:52:05 +01:00
skylartaylor 74d352ed03 Merge remote-tracking branch 'origin/next' into design-port/pr-docking-windows
# Conflicts:
#	crates/ui-panels/src/docking/iconic.rs
#	crates/ui-panels/src/docking/iconic/trials.rs
#	docs/ui-docking.md
2026-11-25 17:41:39 +01:00
aiongg d0254a0996 Merge pull request #3533 from aiongg/ports-combined
Ports: a click keeps the canvas focused, Escape from floats, rail drags dock
2026-11-25 11:15:43 -05:00
aiongg c3ff1715cb Merge pull request #3216 from storytold/design-port/pr-docking-rails
Docking and rails options
2026-11-25 11:05:51 -05:00
aiongg 1277d4b157 Merge pull request #3213 from storytold/design-port/pr-menus-popups
Menus and popups: keyboard opening and safer activation
2026-11-25 10:54:28 -05:00
aiongg 41519eaae5 Merge commit 'f15b0e87d2' into ports-combined 2026-11-25 15:34:57 +00:00
aiongg e9543a634d Merge commit 'd6aed656f2' into ports-combined 2026-11-25 15:34:56 +00:00
aiongg f3f0e69fde Merge pull request #3505 from aiongg/app-stop-focus
The app's own widgets: focus follows egui's rule, and a canvas that can't take focus is a finding
2026-11-25 10:16:44 -05:00
skylartaylor 6ed0356493 docs: regenerate contract-api.md 2026-11-25 15:58:08 +01:00
skylartaylor 84febd9938 docs: regenerate contract-api.md 2026-11-25 15:58:07 +01:00
skylartaylor f62036b16a docs: regenerate contract-api.md 2026-11-25 15:58:07 +01:00
aiongg f15b0e87d2 An Escape nothing in a floated dock window takes is the dock window's Cancel
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.
2026-11-25 14:57:40 +00:00
aiongg d6aed656f2 A press nothing takes leaves the app's document canvas focused
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.
2026-11-25 14:37:41 +00:00
skylartaylor bab45a549e Merge origin/next into design-port/pr-docking-windows
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.
2026-11-25 15:21:31 +01:00
skylartaylor b003bd172a Merge origin/next into design-port/pr-docking-rails
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.
2026-11-25 15:21:14 +01:00
skylartaylor 9a7c2255a2 Merge remote-tracking branch 'origin/next' into design-port/pr-menus-popups 2026-11-25 15:19:07 +01:00
aiongg fda1a0c15d Merge storytold next into app-stop-focus 2026-11-25 13:32:10 +00:00
aiongg c136195d93 Merge remote-tracking branch 'upstream/next' into next-sync-1125 2026-11-25 13:28:36 +00:00
aiongg 0f8d8365e2 Focus given to the app's own widgets: held presses, stale records, canvases
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.
2026-11-25 13:24:55 +00:00
aiongg 051c45335c Merge host-canvas-finding into app-stop-focus 2026-11-25 13:19:30 +00:00
aiongg 4bdb8b850a host_canvas: a canvas widget that takes no focus is the same finding
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.
2026-11-25 13:10:39 +00:00
aiongg d6f213e0b1 Focus the runtime gives an app's own widget follows egui's rule
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.
2026-11-25 13:10:24 +00:00
aiongg 036526d425 Merge remote-tracking branch 'upstream/main' into next-sync-1125
# Conflicts:
#	.config/cargo-ci.toml
#	.config/cargo-dev.toml
#	.github/workflows/crw.yml
#	.github/workflows/workspace.yml
#	crates/font-catalog/README.md
#	crates/font-catalog/src/catalog.rs
#	crates/font-catalog/src/lib.rs
#	crates/font-manager/README.md
#	crates/font-manager/src/panel/app.rs
#	crates/font-manager/src/panel/browse.rs
#	crates/font-manager/src/panel/details.rs
#	crates/font-manager/src/panel/jobs.rs
#	crates/font-manager/src/panel/widgets.rs
#	crates/font-manager/src/store.rs
#	crates/font-manager/tests/flows.rs
#	crates/font-store/README.md
#	crates/font-store/src/lib.rs
#	crates/font-store/src/store.rs
#	crates/font-store/src/tests.rs
#	scripts/ci-workspace-tests.sh
#	scripts/test-workspace-tests.py
2026-11-25 13:05:50 +00:00
aiongg f1bf62a705 host_canvas: a declared canvas no widget draws is a finding
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.
2026-11-25 13:00:57 +00:00
Martin BallandClaude Opus 5.5 011ee7857a next: design-lint findings and the components index
- 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>
2026-11-25 12:00:05 +00:00
bflatastic 5442cfb97f ui-contract, ui-panels dialog, ui-widgets buttons: a dialog frame is padded space.pad.dialog (Pad::Dialog; a roomy dialog keeps space.pad.roomy), and a dialog's footer button (LeastWidth::DialogButton or DialogSideButton) stands size.dialog.button_height high (StyleCx::dialog_button_height; a small one stays a small control high). Every size set gives them a panel's padding and a push button's height, so no app's dialogs change. Trial 2026-11-25 15:21:00 +07:00
bflatastic 03fea7ac47 ui-contract, ui-widgets menu: a menu row stands size.row.menu high (StyleCx::menu_row_height, grown as a control's height is; a small row stays a small control high); a compact row keeps its text line's height. Every size set gives size.row.menu the control's height, so no app's menus change. Trial 2026-11-25 15:21:00 +07:00
skylartaylor e6fe0f2d96 docs: regenerate contract-api.md 2026-11-25 06:29:24 +01:00
bflatastic a7b48fb036 theme, dock: size.bar.column, the height of a dock column's bar (size.control.sm in both built-in sets, so the bar keeps its height unless an app sets it); a column's bar, expanded or collapsed to icons, lies on the surface its dock's tab strips do: surface.canvas beside PanelTabLook::Block tabs, the window's background otherwise 2026-11-25 11:34:02 +07:00
aiongg 9b818faae7 Merge pull request #3413 from aiongg/dock-gaps-2
Tab order, IME fence and start-up crash fixes from EffectCraft's minimal port
2026-11-24 23:12:20 -05:00
skylartaylor e98efe8c8c Merge origin/next into design-port/pr-docking-windows
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.
2026-11-25 04:49:36 +01:00
skylartaylor 837bc646e0 docs: regenerate contract-api.md 2026-11-25 04:35:36 +01:00
bflatastic 27d1e9c469 theme, ui-widgets buttons: size.button, a standard push button's height, read by the text-faced buttons (Button, SplitButton, ToggleButton) through StyleCx::button_height; a small button stays a small control high. Both size sets give it control.md's value, and an app that overrides size.control.md and not size.button has it follow, so no other app's buttons change (the token dumps gain only the size.button line, equal to control.md). Trial; dumps updated 2026-11-25 10:24:16 +07:00
skylartaylor e010b91cb1 Merge branch 'design-port/fw-dock-flyout-height' into design-port/pr-docking-windows
# Conflicts:
#	crates/ui-panels/src/docking/iconic.rs
#	crates/ui-panels/src/docking/mod.rs
#	docs/ui-docking.md
2026-11-25 03:10:11 +01:00
skylartaylor b3c48ace45 Merge branch 'design-port/fw-dock-floats-above-flyouts' into design-port/pr-docking-windows
# Conflicts:
#	crates/ui-contract/src/runtime/overlay.rs
#	crates/ui-panels/src/docking/config.rs
2026-11-25 03:09:51 +01:00
skylartaylor 247045cc8e Merge branch 'design-port/fw-dock-tab-ellipsis' into design-port/pr-docking-windows
# Conflicts:
#	crates/ui-panels/src/docking/group.rs
#	crates/ui-widgets/src/tabs/tab.rs
2026-11-25 03:08:21 +01:00
aiongg e46f5180a0 Focus: a Tab with no stop to move to and nothing focused stays in egui's input for the app's own binding 2026-11-25 01:15:31 +00:00
aiongg c933a90624 Every focusable egui widget the app draws is a stop of the window's one Tab order
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.
2026-11-25 00:36:38 +00:00
skylartaylor f52799a8bf tabs: ellipsis panel tabs all shrink to their least before any overflows
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.
2026-11-25 01:04:10 +01:00
aiongg 3408eb09a5 Dock: a group's tab overflow button is a gesture source (SourceKind::Overflow)
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.
2026-11-24 21:47:55 +00:00
aiongg b2cd661510 Focus: host_stop puts an app's own widgets into the one Tab order
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.
2026-11-24 21:39:59 +00:00
aiongg 3709418d5f Keys: an app's own focused widget keeps the plain Enter
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.
2026-11-24 21:35:30 +00:00
aiongg 271e9bf727 Dock: DockAreaOutput::pressed names the panel whose body a press went down in
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.
2026-11-24 20:41:30 +00:00
aiongg b2aab0b8bb Merge next-host-input into dock-gaps 2026-11-24 20:23:54 +00:00
aiongg 146a95ed43 Merge storytold next into next-host-input 2026-11-24 20:18:12 +00:00
aiongg 9fd8b0cdaa Add frame::will_rerun for host work once per shown frame
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.
2026-11-24 18:57:43 +00:00