Commit Graph
36 Commits
Author SHA1 Message Date
Dylan M. Taylor b138b533fe Merge remote-tracking branch 'upstream/next' into pr-2809-merge
# Conflicts:
#	crates/automation/Cargo.toml
#	crates/automation/src/access.rs
#	crates/automation/src/synthetic.rs
#	crates/automation/tests/it/access.rs
#	crates/automation/tests/it/synthetic.rs
#	crates/behavior/src/codec.rs
#	crates/behavior/src/edit_history.rs
#	crates/behavior/src/lib.rs
#	crates/behavior/src/wheel.rs
#	crates/color-ui/src/ui/paint_chip.rs
#	crates/color-ui/src/ui/pair.rs
#	crates/color-ui/src/ui/palette.rs
#	crates/color-ui/src/ui/palette/stories.rs
#	crates/dialogs/src/service.rs
#	crates/draw/src/ui/transform/transform_box.rs
#	crates/draw/src/ui/transform/transform_box/stories.rs
#	crates/draw/tests/it/transform_box.rs
#	crates/font-manager/src/glyphs.rs
#	crates/font-manager/src/picker.rs
#	crates/font-manager/src/picker/rank.rs
#	crates/font-manager/src/picker/rows.rs
#	crates/font-manager/src/picker/stories.rs
#	crates/font-manager/tests/it/picker.rs
#	crates/host/src/lib.rs
#	crates/menu/src/context.rs
#	crates/menu/src/mac.rs
#	crates/menu/src/model.rs
#	crates/pages/src/ui/view.rs
#	crates/platform/README.md
#	crates/platform/src/browser_files.rs
#	crates/print/src/ui/dialog.rs
#	crates/print/src/ui/mod.rs
#	crates/print/src/ui/panel.rs
#	crates/print/src/ui/stories.rs
#	crates/print/tests/it/dialog.rs
#	crates/text/src/ui/character.rs
#	crates/text/src/ui/character/rows.rs
#	crates/text/src/ui/editor.rs
#	crates/text/tests/it/editor.rs
#	crates/text/tests/it/main.rs
#	crates/ui-canvas/src/canvas/mod.rs
#	crates/ui-canvas/src/canvas/split/stories.rs
#	crates/ui-canvas/src/canvas/tool_host.rs
#	crates/ui-canvas/src/canvas_controls/outline/mod.rs
#	crates/ui-canvas/src/canvas_controls/task_bar.rs
#	crates/ui-canvas/src/canvas_controls/task_bar/stories.rs
#	crates/ui-canvas/tests/it/canvas/navigate.rs
#	crates/ui-canvas/tests/it/canvas/tool_keys.rs
#	crates/ui-canvas/tests/it/canvas_controls/task_bar.rs
#	crates/ui-contract/src/contract/collection/props.rs
#	crates/ui-contract/src/contract/cx/pointer.rs
#	crates/ui-contract/src/contract/items/access.rs
#	crates/ui-contract/src/contract/items/drag.rs
#	crates/ui-contract/src/contract/items/lead.rs
#	crates/ui-contract/src/contract/label.rs
#	crates/ui-contract/src/contract/mod.rs
#	crates/ui-contract/src/contract/run.rs
#	crates/ui-contract/src/contract/steps/report.rs
#	crates/ui-contract/src/contract/steps/update.rs
#	crates/ui-contract/src/primitives/mod.rs
#	crates/ui-contract/src/primitives/sensing.rs
#	crates/ui-contract/src/primitives/text_adapter.rs
#	crates/ui-contract/src/primitives/text_input.rs
#	crates/ui-contract/src/runtime/access/emit.rs
#	crates/ui-contract/src/runtime/access/text.rs
#	crates/ui-contract/src/runtime/commands/board.rs
#	crates/ui-contract/src/runtime/commands/mod.rs
#	crates/ui-contract/src/runtime/drag.rs
#	crates/ui-contract/src/runtime/egui/access.rs
#	crates/ui-contract/src/runtime/egui/access/tree.rs
#	crates/ui-contract/src/runtime/egui/input.rs
#	crates/ui-contract/src/runtime/env.rs
#	crates/ui-contract/src/runtime/focus/nav.rs
#	crates/ui-contract/src/runtime/frame.rs
#	crates/ui-contract/src/runtime/keys.rs
#	crates/ui-contract/src/runtime/keys/claims.rs
#	crates/ui-contract/src/runtime/keys/input.rs
#	crates/ui-contract/src/runtime/keys/route.rs
#	crates/ui-contract/src/runtime/pointer.rs
#	crates/ui-contract/src/runtime/windows.rs
#	crates/ui-contract/src/testing/fixture.rs
#	crates/ui-contract/src/testing/host_key_trials.rs
#	crates/ui-contract/tests/it/collection/rows.rs
#	crates/ui-contract/tests/it/drag/mod.rs
#	crates/ui-contract/tests/it/runtime/wheel.rs
#	crates/ui-macros/src/props.rs
#	crates/ui-panels/src/dialog/mod.rs
#	crates/ui-panels/src/dialog/prompts.rs
#	crates/ui-panels/src/dialog/recovery.rs
#	crates/ui-panels/src/dialog/trials.rs
#	crates/ui-panels/src/dialog/words.rs
#	crates/ui-panels/src/rails/drawer.rs
#	crates/ui-panels/src/rails/drawer/stories.rs
#	crates/ui-panels/src/rails/tool/trials.rs
#	crates/ui-panels/src/sections/footer.rs
#	crates/ui-panels/tests/it/rails/drawer.rs
#	crates/ui-patterns/src/patterns/dock/area.rs
#	crates/ui-patterns/src/patterns/form_dialogs/about.rs
#	crates/ui-patterns/src/patterns/form_dialogs/dialog.rs
#	crates/ui-patterns/src/patterns/form_dialogs/dialog/stories.rs
#	crates/ui-patterns/src/patterns/form_dialogs/host_requests.rs
#	crates/ui-patterns/src/patterns/form_dialogs/mod.rs
#	crates/ui-patterns/src/patterns/form_dialogs/param.rs
#	crates/ui-patterns/src/patterns/form_dialogs/properties.rs
#	crates/ui-patterns/src/patterns/form_dialogs/properties/stories.rs
#	crates/ui-patterns/src/patterns/form_dialogs/rows.rs
#	crates/ui-patterns/src/patterns/form_dialogs/rows/stories.rs
#	crates/ui-patterns/src/patterns/panels/history.rs
#	crates/ui-patterns/src/patterns/preferences/document/model.rs
#	crates/ui-patterns/src/patterns/preferences/model.rs
#	crates/ui-patterns/src/patterns/preferences/page.rs
#	crates/ui-patterns/src/patterns/preferences/rows.rs
#	crates/ui-patterns/src/patterns/preferences/window.rs
#	crates/ui-patterns/src/patterns/preferences/window/stories.rs
#	crates/ui-patterns/src/patterns/presets/browser.rs
#	crates/ui-patterns/tests/it/docking/group_view.rs
#	crates/ui-patterns/tests/it/form_dialogs/dialog.rs
#	crates/ui-patterns/tests/it/form_dialogs/params.rs
#	crates/ui-patterns/tests/it/preferences/model.rs
#	crates/ui-shell/src/shell/start.rs
#	crates/ui-shell/src/shell/start/stories.rs
#	crates/ui-widgets/src/buttons/icon_button.rs
#	crates/ui-widgets/src/buttons/mod.rs
#	crates/ui-widgets/src/buttons/stories.rs
#	crates/ui-widgets/src/choice/swatch.rs
#	crates/ui-widgets/src/choice/swatch_table.rs
#	crates/ui-widgets/src/display/text.rs
#	crates/ui-widgets/src/form/slider_field.rs
#	crates/ui-widgets/src/layout_components/mod.rs
#	crates/ui-widgets/src/list/mod.rs
#	crates/ui-widgets/src/list/row/paint.rs
#	crates/ui-widgets/src/list/row/show.rs
#	crates/ui-widgets/src/list/stories.rs
#	crates/ui-widgets/src/list/view.rs
#	crates/ui-widgets/src/list/view_stories.rs
#	crates/ui-widgets/src/menu/mod.rs
#	crates/ui-widgets/src/menu/stories.rs
#	crates/ui-widgets/src/pickers/select.rs
#	crates/ui-widgets/src/tabs/document.rs
#	crates/ui-widgets/src/text/number.rs
#	crates/ui-widgets/src/text/zoom_field.rs
#	crates/ui-widgets/src/tile_grid/grid.rs
#	crates/ui-widgets/src/tile_grid/grid/stories.rs
#	crates/ui-widgets/src/tile_grid/mod.rs
#	crates/ui-widgets/tests/it/label/tooltip.rs
#	crates/ui-widgets/tests/it/popover/popup.rs
#	crates/ui-widgets/tests/it/tabs.rs
#	crates/ui-widgets/tests/it/text/mod.rs
#	crates/ui-widgets/tests/it/text/number.rs
#	crates/ui-widgets/tests/it/tile_grid/grid.rs
#	crates/window/Cargo.toml
#	docs/components-index.md
#	docs/porting.md
2026-11-23 19:01:32 -05:00
Dylan M. Taylor 7f53dfd8b7 fw sync: ui-contract compiles: one AccessKit tree store (upstream's settled tree, the port's view over it), journal calls on upstream's signature, Span strikethrough, filtered Source borrows; the settled-region rename trial on a memoized view 2026-11-22 23:19:58 -05:00
Dylan M. Taylor cb3101725c sync skeleton: origin/next 118f1d2ff9 into pdf-port/gaps ea77c1676f, markers left
257 conflicted files staged with their conflict markers (630 hunks). The one
modify/delete, crates/ui-patterns/src/patterns/preferences/body.rs (deleted
upstream, modified by the port), keeps the port's file for its area to carry
into upstream's preferences/page.rs. Plan: landing/fw-sync-plan.md.
2026-11-22 22:42:09 -05:00
bflatastic c23779278c ui-contract: a wrapping row sets each child on the middle of its line, which is as tall as its tallest child 2026-11-23 08:48:10 +07:00
Dylan M. Taylor b42062884d Scroll body: a reveal of a rect already in view queues no jump, so no repeated pass every frame 2026-11-22 11:56: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 0f8a553365 Merge pull request #2796 from aiongg/rework-d1
Dialogs and prompts: Curves fields, Levels midtone, Windows prompt order, preset cards
2026-11-21 12:42:10 -05:00
David Mann 02be56cfbb A memoized view in a row sits on the row's line
A memoized view's content starts a layout room of its own (Env::start_room), so the view sat at the top of the
unwrapped Row around it while every other one-line child sits with its centre on the row's line. Since craft-menu's
bar became a memoized view, PhotoCraft's menu titles sat about 4 pt above the icon beside them (photocraft#16113).

The view's room now moves down by the whole pixels that put the centre of its extent (this pass's measuring run, else
its last run) on the row's line. The room keeps its size, so a kept run replays moved with it; a view taller than the
line reaches stays at the row's top, as place_in_cell keeps a child of more than one line.
2026-11-21 12:04:22 +01:00
aiongg 04a5a30436 Only pictures whose height follows their width are held, at their placed width
A band picture (a plot, a strip, the vectorscope, the navigator and reading previews) keeps its height whatever its
width, so a second sweep of its column changed nothing. Pictures whose height follows from their width state it
through MeasureCx::picture_size (the Curves graph, the colour wheel and disc, an image preview at its aspect);
picture_width stays the band picture's width and holds nothing. The held picture reports its placed width, padding
included, as a held fill-width child does, so a padded picture that is the column's widest child does not sweep again.
2026-11-21 08:39:46 +00:00
aiongg 3a8c030cc4 Pictures sized from their least are held children of a content column
A picture (`MeasureCx::picture_width`) in a content-sized Stack column takes its least in the column's measuring run,
which offers no room, and shows across the width the column settles on. A square picture was then taller in the real
run than its column had measured it, and everything under it was pushed past the column's end: the Curves dialog lost
its tone bar, the Input/Output fields and the hint (photocraft#15543).

Such a picture now reports itself held in the column's first sweep, in the same held record fill-width children use,
with its kind (`HeldKind::Picture`). The column sweeps again at its settled width, where the picture is offered that
width as room, so it measures at the width it shows. This covers the colour wheel and disc too.

Trials: the hosted Curves dialog shows the graph with its tone bar, Input, Output and the hint inside the dialog; a
square picture in a content column pushes what follows below its shown size; a column sweeps again only for a
picture narrower than it.
2026-11-21 07:49:27 +00:00
aiongg cfcc72f204 ui-contract: line fill trials use Id::unique 2026-11-21 07:41:14 +00:00
aiongg 61c6e3cbcd craft-ui: a levelled unit's children take no slots on its row's line
The content of a levelled unit stood on the row's line for every purpose, so each direct child of a unit took a slot
as tall as the line and reported its line to the row: a unit of two controls was two lines high. The unit's content
takes the line only to fill it (`fill_size`, `line_height`); its children are placed in the unit's own flow and
report nothing to the row (`RowLine::places`).
2026-11-21 07:07:12 +00:00
aiongg 8da82d585b craft-ui: a fill-height container takes only its row's settled line
In the measuring run of a row that shares a line with an inline header or a non-full-height end region, the row's line
carried the shared height, and a container that fills its height on it was given that height, so taller content was
cut to the header's line. A container takes the row's line only once this pass's measuring run of the row settled it
(`RowLine::settled`); while the row measures, it measures its content. The line rule joins the capped decision: one
check, `given_room`, gives a capped container its room on a settled line or when its content outgrew the room.
2026-11-21 07:06:23 +00:00
aiongg ae4c12a4b1 craft-ui: a levelled unit runs in the width its row gave its level
In a row that scrolls along x, a unit's content ran in the scroll region's unbounded room, so a centred row in it centred in the view, and fill-width children in its content columns never widened to the column. At its level the unit runs in the width the shrink step gave that level, so its content lays out as in any room of that width.
2026-11-21 06:11:11 +00:00
aiongg 2b68a30906 craft-ui: a container that fills its height on a content-height row's line runs its body in the line
Such a container took the line's height as its rect, but its body still ran at its content height, so the children in it that fill (a spacer, a separator, a footer) never reached the line. Once the row's measuring run settled the line, the container is given its height and its body runs in it, as a fill-width row on the line of a row given its height already is. In the row's own measuring run there is no line yet and the container measures its content.
2026-11-21 06:11:11 +00:00
aiongg 7a430a8e4f craft-ui: a levelled unit stands on its row's line
A levelled unit's content ran in a room of its own with the row's line cleared, so a child of it that fills its height took its own measured height instead of the line the row settled on. The unit keeps the row's line; only the probes that measure each level run off it.
2026-11-21 06:11:11 +00:00
aiongg d84b15cca1 Text layout memo: one measurement path, eviction by use, a total budget
Removes the paired measure (Component::PAIRED_MEASURE, measure_pair and its
six adopters, MeasureCx::least_width) and the prepared-leaf path
(PreparedLeaf, PreparedStep, run_with, show_leaf_prepared,
measure_under_prepared, child_with_prepared): every leaf is measured by
measure alone, and the recursive run frames carry only what they read after
their children again.

Keeps the text layout memo and the lazy layout runs, with three fixes: a Line
run keys its width as infinity, entries unused for 60 passes go instead of
first in first out, and a 32 MiB budget bounds what the memo retains.
TextLayout's full and runs are private behind full() and runs().
2026-11-20 22:06:54 +00:00
FredApps d87dd5b9b0 Integrate trial registry with text layout work 2026-11-20 16:43:02 +01:00
FredApps 5a26de289a Merge current next with text layout caching 2026-11-20 15:09:09 +01:00
FredApps 9793d1a452 Merge branch 'next' of https://github.com/storytold/craft-libs into publish/registry-2332
# Conflicts:
#	crates/dialogs/src/lib.rs
#	crates/dialogs/src/ui/mod.rs
#	crates/draw/src/ui/gradient/mod.rs
#	crates/draw/src/ui/gradient/swatch.rs
#	crates/menu/src/shortcuts/view.rs
#	crates/menu/tests/it/main.rs
#	crates/menu/tests/it/shortcuts/mod.rs
#	crates/pages/tests/it/main.rs
#	crates/print/src/lib.rs
#	crates/review/tests/it/main.rs
#	crates/story-render/src/main.rs
#	crates/table/tests/it/main.rs
#	crates/text/tests/it/main.rs
#	crates/ui-canvas/src/canvas/navigate/mod.rs
#	crates/ui-canvas/tests/it/canvas/mod.rs
#	crates/ui-contract/tests/it/access/mod.rs
#	crates/ui-contract/tests/it/fonts/mod.rs
#	crates/ui-contract/tests/it/runtime/mod.rs
#	crates/ui-gallery/src/foundations/mod.rs
#	crates/ui-patterns/src/patterns/preferences/mod.rs
#	crates/ui-patterns/tests/it/docking/mod.rs
#	crates/ui-patterns/tests/it/form_dialogs/mod.rs
#	crates/ui-patterns/tests/it/panels/palette.rs
#	crates/ui-patterns/tests/it/preferences/mod.rs
#	crates/ui-shell/src/shell/mod.rs
#	crates/ui-shell/tests/it/shell/mod.rs
#	crates/ui-widgets/src/tabs/strip.rs
#	crates/ui-widgets/tests/it/bars/mod.rs
#	crates/ui-widgets/tests/it/contract/mod.rs
#	crates/ui-widgets/tests/it/layout/mod.rs
#	crates/ui-widgets/tests/it/main.rs
#	crates/ui-widgets/tests/it/menu/mod.rs
#	crates/ui-widgets/tests/it/pickers/mod.rs
#	crates/ui-widgets/tests/it/text/mod.rs
2026-11-20 15:04:36 +01:00
Martin Ball 6dedbe4fe6 skeleton: merge up/next into area/ribbon-fw with conflict markers left in (land step 1) 2026-11-19 20:42:08 +00:00
Martin BallandClaude Opus 5.5 74379e51c0 fwstub-2: a right-to-left measure with no room limit along x gives the body a scrolling region's width, not an unbounded one, so its left edge is never -inf and a scrolling body's region never NaN (regions); trial: a vertically scrolling container in an RTL row that does not fit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 16:07:17 +00:00
FredApps 91c69dc2b1 Merge remote-tracking branch 'origin/next' into perf/text-layout-2333
# Conflicts:
#	crates/ui-contract/src/testing/mod.rs
2026-11-19 15:48:08 +01:00
FredApps e605a84218 Verify nested transcript reuse and fallback 2026-11-19 12:50:00 +01:00
FredApps d26057203e Cover conditional nested body measurement 2026-11-19 12:41:39 +01:00
FredApps b04d18a735 Select UI suite items through explicit registries 2026-11-19 12:20:08 +01:00
FredApps 61b0fc0b41 Measure opted-in leaf sizes together 2026-11-19 11:48:53 +01:00
aiongg f873abce2c Trials and a short-room story for the overlay bar and the named region mark 2026-11-17 23:44:00 +00:00
aiongg 9332e1c0c8 Fill children of a content-sized body take their measured width: a fill container not given the width offers its body the width it measured, unless it is held in a content column or passes its column's width on; a collection not given the width takes its content width in the real run too, unless held; trial: a content-sized row's fill leaf, held container and list leave the next member after them, inside the row 2026-11-16 18:16:48 +00:00
aiongg 260a64cf62 Clippy: lints the gate denies in ui-contract and window (identical if blocks, then_some, an Option mask in the icon trial, items after the test module); the it tests name epaint_default_fonts' special emojis and use Id::unique 2026-11-16 01:55:23 +00:00
aiongg e7b6352729 framework-01-w8: net change of 10 commits
- framework-01-w8: written by an agent
- framework-01-w8: finished by an agent
- framework-01-w8: fade takes env (framework-01-w5's signature)
- framework-01-w8: review fixes (review-1)
- framework-01-w8: review fixes (review-1, files the rulings name)
- framework-01-w8: a content column adds no Ui of its own, so its children keep their ids when its width becomes bounded or unbounded (fw01 round 2)
- framework-01-w8: the keyframe lane story fills the width its time axis is fitted to (fw01 round 2)
- framework-01-w8: a body's reveal is queued as a jump for the next pass's step 4, like the scroll bar's moves (fw01 round 2)
- framework-01-w8: the filling-bar trial pages the narrow bar and reads only what its view shows (fw01 round 2)
- framework-01-w8: a body group names its container; a text part's keys read the selection it holds for its edit menu (top run round)
2026-11-15 04:46:05 +00:00
aiongg eee9ab4e6d Ramp size roles say what reads them; trials: a container sharing a scrolled view keeps its content height when taller and runs its body at most the draft more than in a plain Stack 2026-11-13 19:26:51 +00:00
aiongg 05b1103621 Scrolled Stack bodies share their view: the children that fill y take what the view leaves, at least their content, and the body scrolls past it; the Color panel body scrolls in every mode 2026-11-13 19:26:50 +00:00
aiongg f7f75c178f Sizing::FillWidth makes a leaf fill its row's leftover room
Component::fills defaults to the width when the caller set Sizing::FillWidth,
and the sizing stays on the component after step 1 so the layout hooks read
it. Button, TextField and Slider lose their fill_width props and Swatch and
GradientSwatch their fill flags; callers set Sizing::FillWidth. The blend
select in BlendRows takes the room before Opacity, as in PhotoCraft.

A contract trial checks that a FillWidth leaf takes the row's room and a
Content leaf does not.
2026-11-12 15:12:10 +00:00
aiongg d4da861dad Check a kept transcript's leaf calls against the leaf's own answers
A real run under a kept transcript compared each kept measure call by asking
the component again, though step 5 had just asked it the same call. The check
now takes the calls the leaf's run made: a kept call at the same proposal and
room that read no inputs compares with that answer, and only other calls are
asked again. The check reads the transcript's calls in place instead of
cloning them and their inputs per leaf, and a leaf hands its ideal and minimum
calls over in one leaf_call.
2026-11-12 14:32:39 +00:00
aiongg e4d2fc38fb Runtime and contract: craft-ui-contract, macros and the test kit 2026-11-12 14:09:32 +00:00