Commit Graph
112 Commits
Author SHA1 Message Date
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
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
dotCooCoo ce87f5484d Merge next into fix/dock-group-band-keeps-tab 2026-11-25 10:22:44 -08:00
skylartaylor f62036b16a docs: regenerate contract-api.md 2026-11-25 15:58:07 +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
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
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
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
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
aiongg 750a9bdd57 Merge pull request #2896 from aiongg/rework-d3
Focus: a removal's new focus is not revealed; the canvas text editor returns the focus to the canvas
2026-11-21 21:17:56 -05:00
dotCooCoo 5b6295b5c9 Fit: short form docs name the late order, and the API listing lists the new items
FitItem::short now says that an item marked short_late takes its short
form only after no free item is left to leave. The first line of each new
builder's doc is a complete sentence, since docs/contract-api.md copies
only that line, and the module doc wraps like its neighbors.

docs/contract-api.md is regenerated with
cargo run -p craft-ui-gallery --bin contract-api; only FitItem's lines
change.
2026-11-21 17:47:52 -08:00
David MannandClaude Opus 5.5 9597f188d5 Docking: grips are the reference's upright ticks; a tool rail gets a grip under its column bar (photocraft#16332, photocraft#16333)
The grip above each icon group of a collapsed column was a dotted hairline in a lighter ink than the panel
(7bf0a9b6d, e5e007233). The reference application draws its dock grips as ten upright ticks, one point wide,
four tall and one apart, a little darker than the panel in every interface colour, the same under the pointer.
`GripMarks` paints that row, through the new `Rule::ticks` (the dotted rule is now its square case) and
`Draw::grip_ticks` (exactly `count` marks at every scale).

A tool rail the host shows itself (a panel with a `DockGrid`, taken by `group_view`) now gets a grip strip of
`DockSizes::grip` on top, under its column bar: a `GroupGrip` with the ticks, whose drag moves the rail's group.
The host's view gets the room under it, and the group measures the strip on top of the view's height.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:32:50 +01:00
aiongg e826abef73 focus: a leaf can open a focus scope; the canvas text editor returns the focus to the canvas
Component::FOCUS_SCOPE gives a leaf the scope ContainerProps::focus gives a container, through the leaf
shape's focus hook. TextEditor opens a scope that restores (FocusPolicy::TAB_LAYER), so a session that
ends hands the focus back to the stop it came from, the canvas, instead of the stop before the editor
(the rulers' corner, whose arrows moved the zero point after a commit; photocraft#15555). Regenerates
docs/contract-api.md.
2026-11-21 18:49:26 +00:00
aiongg 13353a0fd3 Merge pull request #2778 from aiongg/wc-regressions
Go To lands on the page, reveals stay in their scroll owner, the ribbon measures in its first frame
2026-11-21 13:48:35 -05:00
aiongg 71e51851ae Merge remote-tracking branch 'upstream/next' into wc-regressions
# Conflicts:
#	crates/ui-contract/src/layout/mod.rs
#	docs/contract-api.md
2026-11-21 17:53:07 +00:00
aiongg bd5ad6d7ce Merge remote-tracking branch 'upstream/next' into frame-cost-15493
# Conflicts:
#	docs/contract-api.md
2026-11-21 17:48:56 +00:00
aiongg fefaff4b05 Merge pull request #2804 from aiongg/rework-d2
Menus, panels, options bar, Preferences: title bar, panel groups, context menus, Info, prefs labels
2026-11-21 12:43:24 -05:00
aiongg ed9823347c contract-api.md regenerated after the next merge 2026-11-21 14:23:08 +00:00
aiongg 4c9df420e5 Regenerate docs/contract-api.md 2026-11-21 13:26:52 +00:00
aiongg 4b5b1b8893 Regenerate docs/contract-api.md 2026-11-21 08:58:37 +00:00
aiongg 39ab010b9b Regenerate docs/contract-api.md 2026-11-21 08:40:32 +00:00
aiongg ef10de8220 Regenerate docs/contract-api.md 2026-11-21 08:16:09 +00:00
aiongg 7a6827f5bf Overlay placement: a menu hung at a point also covers its anchor (photocraft#15552)
Most context menus hang from Anchor::Point (table header, rulers, ribbon,
places, versions, dock group menu). layer_covers_anchor decides every case in
one place: the pointer, the rect a context request named, and a point for a
layer whose key class is OwnerClass::Menu. Point-anchored layers that are not
menus (the iconic flyout, a popover at a point) keep their rule.

docs/contract-api.md regenerated.
2026-11-21 07:57:24 +00:00
aiongg 4614338402 Merge remote-tracking branch 'upstream/next' into wc-regressions
# Conflicts:
#	crates/ui-contract/src/layout/body.rs
#	crates/ui-contract/src/layout/mod.rs
#	crates/ui-widgets/src/layout_components/mod.rs
2026-11-21 07:32:55 +00:00
aiongg 786c71f812 craft-ui: remove Divider::length; regenerate contract-api.md
Divider::length has no caller since the ribbon groups fill their line; its story and trial go with it (the filling
divider trial stays). docs/contract-api.md is regenerated with the contract-api bin and lists ContainerProps::least_height
and Row::least_height.
2026-11-21 07:07:21 +00:00
aiongg 463c634dd6 craft-ui: a reveal goes to the scroll owner around the component, never to a region beside it
A component with no scroll owner in its scope sent its reveal to the smallest scroll region of the last pass whose
rect met its own; egui's intersects counts a shared edge, so WordCraft's page canvas, taking the focus in its first
pass, scrolled the status bar under it to its end. A reveal and an untaken page or end move now go only to the scroll
owner the scope names, and with none nothing scrolls. A collection that scrolls its rows names itself their scroll
owner, so a reveal in a row still reaches it; the geometric lookup is removed.
2026-11-21 05:21:37 +00:00
aiongg 3eebedfcff Component sets: the productivity set 2026-11-21 01:19:14 +00:00
aiongg 268aa7893e Merge remote-tracking branch 'upstream/next' into component-constants
# Conflicts:
#	docs/contract-api.md
2026-11-20 23:35:49 +00:00
aiongg e0965cf0b0 Merge pull request #2678 from aiongg/text-memo-fix
Text layout memo: one measurement path, eviction by use, a total budget
2026-11-20 18:34:57 -05:00