Commit Graph
132 Commits
Author SHA1 Message Date
skylartaylor 5468d9ffe5 Merge craft-libs main (9524262a, next merged into main): resolve conflicts and regenerate the catalog 2026-11-27 04:50:45 +01:00
skylartaylor 05345c06d3 Dock windows: the DragBounds summary says both policies and the default
Reviewer finding on #3446: the summary ended at a colon ("How much of a floating
layer stays inside the window when the user moves it, when it is placed at a
position, and ..."), and the catalog lists that line only — a variant's own doc
is never extracted. So the line is now a complete summary: the whole layer
(`Inside`, the default) or a strip of its title, with where the rule holds and
the overlay's own `bounds` in the paragraph under it. The variants keep their
detailed docs for rustdoc.

Regenerated with the branch's own generator; a second run leaves the file byte
for byte as it was. The run also picks up two entries the branch's merges added
without regenerating (`Action::restore`, and `floated`'s doc).
2026-11-26 23:17:50 +01:00
skylartaylor 8bc61c8621 Merge remote-tracking branch 'origin/main' into design-port/pr-docking-windows 2026-11-26 22:08:05 +01:00
aiongg 5ec98bd628 Merge remote-tracking branch 'upstream/next' into next-into-main-2
# Conflicts:
#	crates/ui-widgets/src/text/text_field.rs
2026-11-26 11:03:44 +00:00
FredApps cc59357033 Merge pull request #3475 from storytold/fix/wordcraft-7708-print-zoom-whole-percent
ui-contract: a ZoomPrecision env value lets zoom show whole percents (storytold/wordcraft#7708)
2026-11-26 11:14:23 +01:00
FredApps 7e7456955a docs: contract-api lists FieldLook, StyleCx::quiet_field and TextOptions::look
Regenerated with the contract-api bin; only the three entries this PR adds are taken, the file's other drift on next is left alone.
2026-11-26 16:30:14 +07:00
FredApps e39fd100af Merge remote-tracking branch 'origin/next' into tc14-3475 2026-11-26 16:08:37 +07:00
aiongg ecdc221f4a Merge next into main 2026-11-26 05:38:41 +00:00
BFlat 40c4cb3157 Merge pull request #2949 from dotCooCoo/feat/fit-short-order
Fit: items rank their short forms, and late ones shorten after the free items leave
2026-11-26 10:24:19 +07:00
BFlat 14cd3ae8a9 Merge pull request #3513 from dotCooCoo/fix/link-text-contrast
ui-contract: link text reads at 4.5:1 on every surface it is drawn on
2026-11-26 09:56:34 +07:00
BFlat 733e35fea8 Merge pull request #3492 from dotCooCoo/fix/dock-group-band-keeps-tab
dock: a docked group's drag band narrows before the shown tab loses its first letters
2026-11-26 09:56:07 +07:00
BFlat 91877f4160 Merge pull request #3431 from dotCooCoo/fix/job-progress-layer-role
ui-contract, ui-panels: a job progress window's layer has the progress role, and OpenFilter::Asks leaves it out
2026-11-26 09:51:10 +07:00
Martin BallandClaude Opus 5.5 e173ef092e ui-contract: zoom_percent follows ZoomPrecision with zoom_codec
One zoom_decimals helper serves both, so the read-only zoom texts (Navigator slider, full-window title, zoom bar
entries) agree with the zoom fields. with_zoom_precision is pub(crate). Regenerates docs/contract-api.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:07:27 +00:00
aiongg 97794fff62 ui-contract: DocRun::coords draws a run at variation coordinates of its face; FontSample takes them 2026-11-25 20:37:43 +00:00
dotCooCoo ce87f5484d Merge next into fix/dock-group-band-keeps-tab 2026-11-25 10:22:44 -08:00
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
skylartaylor 6ed0356493 docs: regenerate contract-api.md 2026-11-25 15:58:08 +01:00
skylartaylor f62036b16a docs: regenerate contract-api.md 2026-11-25 15:58:07 +01: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 9a7c2255a2 Merge remote-tracking branch 'origin/next' into design-port/pr-menus-popups 2026-11-25 15:19:07 +01:00
dotCooCoo 36b0dc54b8 ui-contract, ui-widgets: link text reads at 4.5:1 in accent.text; a toast's links take the card's text color
StyleCx::link_look drew links in accent.solid, which the theme holds only to
the 3:1 non-text minimum, so link text read at 2.93:1 on the light panel and
2.30:1 on the dark one. It now takes accent.text at every contrast, the
accent step the theme holds to 4.5:1 on the panel, raised and sunken
surfaces. accent.solid is unchanged, so buttons and fills keep their color.

A toast's card is the inverse surface, where accent.text reads at 2.57:1 in
the default light theme and 1.24:1 in the dark one. Link::on_inverse draws a
link in text.on_inverse, always underlined, and a toast's action links use it.
2026-11-25 05:48:47 -08:00
dotCooCoo 52948ceaaf dock: a docked group's drag band narrows before the shown tab loses its first letters
In a header too narrow for the drag band and the shown tab, the band took
its whole width first and the tab strip got what was left. In the DockArea
story's 40 pt Tools column the shown tab was 2 pt wide at compact density
and missing at comfortable density, though TabStrip keeps the shown tab
visible.

- ui-contract: HeaderParts::end_narrows lets a container's end parts give
  up width, down to a least, so the header's children keep a given room.
  The header line applies it; headers that fit are unchanged.
- ui-panels: DockGroup keeps room for the shown tab with its first three
  letters (with its icon, count, mark and close button, and the overflow
  button beside other tabs), and its band narrows to an icon's width
  before that room shrinks. Floating groups use the same header.

Test: a_narrow_groups_drag_band_narrows_before_the_shown_tab
2026-11-25 03:57:40 -08:00
skylartaylor e6fe0f2d96 docs: regenerate contract-api.md 2026-11-25 06:29:24 +01: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
dotCooCoo 557a5bf932 ui-contract, ui-panels: a job progress window's layer has the progress role, and OpenFilter::Asks leaves it out
The overlay host recorded every layer with LayerRole::Plain, since no path copied Overlay::role into
the layer's open entry, and JobProgress set no role. any_open's check for progress windows never
applied, so an app that waits while a dialog asks something counted its own progress window: it
drew the window only every second frame. The host now records the layer's role at all four places
it records a layer, Prompt takes a layer role, and JobProgress sets LayerRole::Progress. The new
OpenFilter::Asks counts modal layers except progress windows; Any, Modal and Keys still count a
progress window, as they did before. Trial a_job_window_is_a_modal_layer_that_asks_nothing.
2026-11-24 19:14:10 -08: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
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 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 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
skylartaylor ed7a4c4ee6 Focus: focus_came_with_open is a documented runtime API, as the menu rows read it 2026-11-24 17:45:28 +01:00
skylartaylor 586bc9b8ad ui-contract, ui-panels, ui-patterns: popups that stand below the floating windows; DockConfig::flyout_layer
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.
2026-11-24 16:55:35 +01:00
bflatastic 0a4d309686 Merge remote-tracking branch 'origin/next' into sync/next
# Conflicts:
#	Cargo.toml
#	crates/font-manager/src/picker/rank.rs
#	crates/font-manager/src/picker/rows.rs
#	crates/ui-panels/src/docking/group.rs
#	crates/ui-panels/src/docking/iconic/trials.rs
#	crates/ui-patterns/src/patterns/dock/area.rs
#	crates/ui-widgets/src/choice/mod.rs
#	crates/ui-widgets/src/choice/swatch.rs
#	crates/ui-widgets/src/choice/swatch/stories.rs
#	docs/contract-api.md
2026-11-23 13:53:35 +07:00
aiongg 3b629776d8 Testing runtime runs background work inline: InstallSpec::jobs and Env::jobs_of
Story trials have no host, so document-face and texture loads ran on default_jobs' threads and a fixture
could settle before a face landed (StyleList::variants on Windows: rtl 52.0 vs 52.8, motion shapes change
after the drive). InstallSpec::jobs sets where a context's background work runs while no host is installed;
Env::jobs_of (host, else installed, else default_jobs) replaces the two copies in the face registry and the
texture loader. testing::install_spec and the suite's language hosts use InlineJobs, so a load asked for in
one pass lands in the next on every machine; the two per-story InlineJobs options go.
2026-11-23 04:43:29 +00:00
bflatastic 7d61a755c9 docs: regenerate contract-api for Reader::split_unit and contract::response_of 2026-11-23 11:32:56 +07:00
bflatastic 443a05c863 docs: regenerate contract-api for SubNode::run_link's removal, EditorStep, ItemLayout::set_fit, Fired's place and FrameOutput::dimmed 2026-11-23 10:52:58 +07:00
aiongg 8c4e115ea4 docs/contract-api.md: regenerated (document_face's job and the face bytes; also ColumnSpec::at_least and data_fill_tiled, which next's copy lacked) 2026-11-23 03:27:14 +00:00
bflatastic e1c00aac13 docs: regenerate contract-api for the drag payloads, CollectionEvent::Picked and CollectionKind::Picked 2026-11-23 07:00:26 +07:00
bflatastic a7ff91cd16 docs: regenerate contract-api for PointerFrame::pick_pos 2026-11-23 06:12:13 +07:00
bflatastic 9f99a64cf7 docs: regenerate contract-api 2026-11-23 05:07:04 +07:00
bflatastic 534db793a0 Merge remote-tracking branch 'origin/next' into sync/next
# Conflicts:
#	crates/font-manager/tests/it/picker.rs
#	crates/ui-shell/tests/it/shell/app_shell.rs
2026-11-23 04:35:03 +07:00
bflatastic 6f69df0e47 docs: regenerate contract-api.md 2026-11-23 02:05:06 +07:00
aiongg fe271bf574 Dropdowns name the list that takes their opener's keys
A dropdown's opener (a picker's field or button) hands Up, Down, Page keys,
Enter and Tab to a collection in its dropdown. The framework took the first
type-ahead collection it found in the layer. The font picker's dropdown holds
the class column before the family list, so with filters shown Enter and the
arrows went to the class column: typing a name and pressing Enter picked
nothing.

Overlay::list (FocusPolicy::list) names the collection instead, and every
dropdown names its list: Select, ComboBox, TreePicker, completions, number
presets, PopupList (new PopupList::list) and the font picker, which names its
family list while it shows one. The type-ahead guess is gone.
2026-11-22 18:59:40 +00:00
bflatastic 8206a076a2 ui-contract: a focused stop that is no longer shown leaves focus nowhere; only a removed child of a collection row hands it back to the row
behavior: after_removal goes with the rule it served. The spec trials state the new rule.
2026-11-22 18:15:04 +07:00