Commit Graph
7250 Commits
Author SHA1 Message Date
aiongg 6ca8b40158 Layout: a control finds an egui grid's cell through the UiStack, with_env is the one scope wrapper, an egui cell is decided at what its row needs
- Env::of sets Scoped::egui_cell when its walk from a Ui to the entry it finds passes an egui::Grid's Ui; scopes that pass the env on keep it, a body or a component's children end it. It replaces Ui::is_grid in the label step and the container hooks.
- In an egui cell the row is decided at what the label and the control at its ideal width need, from the cell's left edge, narrowed as well as widened.
- flow_scope folds into with_env (Overrides::id_salt); the dock group header and the Liquify footer are craft Rows.
- text_edit and the selectable text read the caller's env before they make their child Ui.
- Grid docs: rows after an egui container are placed over it.
2026-11-21 22:46:06 +00:00
aiongg 017ecd683f egui: pin storytold/egui next f5025284, whose Grid marks its Ui as UiKind::Grid and lays out left to right
craft::egui_fork::REV follows the pin.
2026-11-21 22:46:06 +00:00
aiongg 9d928c7954 Trials: flow facts stop at egui containers, a Lazy keeps the row's line, labels in egui grid cells and narrow horizontals 2026-11-21 21:50:53 +00:00
aiongg f4bd0ae95f Layout: what a body sets up for its children in flow stops at egui containers; labels unbounded only in an egui::Grid cell
Env::of clears the start_room facts (grid cursor, row line and room, shrink step, first line, flow start, fill share,
content column, offered width) when the entry it finds was installed for an ancestor of the Ui, not for the Ui
itself. Copies made from it (with_env, MemoView's counting install, with_item_facts) and the measure keys start from
the cleared facts. Env::installed_for, row_line_of and grid_of go.

Craft code that runs children in a Ui it makes installs its env there: run_sharing and measure_sharing's no-share
block, run_spread's sweeps, Lazy and MemoView, Pages, measure_slot, the levelled unit's probe, a content-height pane at
a caller rect (a room of its own), PaintUi's children. flow_scope is the craft form of ui.scope, push_id and
with_layout around craft content; the dock group header and the Liquify footer use it, and the select search row and
the date popup's Today row are craft Rows. A craft Grid documents that an egui container in it is no cell.

The label step's signal is egui's Ui::is_grid (egui_cell): in an egui::Grid cell a labelled control or container
decides its label at its own width and widens at the cell's right edge in either direction. ui.horizontal keeps
wrapping and stacking at the room's end.
2026-11-21 21:50:53 +00:00
aiongg f6b98be494 egui: pin storytold/egui next efd532a5, which makes Ui::is_grid public 2026-11-21 21:50:53 +00:00
aiongg 7547d34702 Layout: a labelled control in a flow egui lays out without wrapping decides its label at its own width
egui::Grid offers a column with no width from the last frame its least cell width (40 points). A check box's label
after it was decided in that width, so it wrapped, its cell grew taller than the one-line cells beside it, and
egui::Grid centred the shorter cells lower: in PhotoCraft's Conditional Mode Change dialog, Bitmap and RGB Color
no longer shared a row. The column then stayed that narrow.

In a Ui that egui lays out (no body installed its env for it) where egui extends text instead of wrapping it
(Ui::wrap_mode: ui.horizontal, an egui::Grid without a max column width), the label step's row has no end: the
label keeps its natural width, a beside label never stacks for want of room, and the step's flow widens from the
row's start edge to what the label and control need. Craft's own rows, bars and grid cells, and vertical and
wrapping flows, keep their bounded room.
2026-11-21 20:43:45 +00:00
aiongg aae6c5a458 Layout: a body's row line and grid cells are for its direct children only
A component an app shows inside an egui container (an egui::Grid, ui.horizontal) in a Row or Grid body read the body's
env up the Ui stack and was placed as one of the body's children: a labelled check box in an egui::Grid inside a
full-width form row took a slot as high as the row's whole line, so every grid row was as tall as the block
(PhotoCraft's Conditional Mode Change dialog), and a check box in ui.horizontal in a Grid body took the grid's cells.

Env::installed_for says whether a Ui has an env entry of its own; row_line_of and grid_of give the row's line and the
grid's cells only there. The spread row's sweeps install the row's env for the Ui its children run in.
2026-11-21 20:15:40 +00:00
aiongg 9ccaa3bdd6 Merge pull request #2872 from aiongg/memo-sizing-key
Memoized views replay in sizing passes (#2336)
2026-11-21 14:24:39 -05:00
Dylan M. Taylor 699f08b901 Merge pull request #2433 from vangel76/fix/checkbox-sweep-3333
Check or clear related checkboxes in one drag
2026-11-21 14:21:44 -05: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 72cc7a131d Merge pull request #2840 from aiongg/frame-cost-15493
Frame cost: tooltip text and AccessKit data only when needed
2026-11-21 13:38:59 -05:00
Dylan M. Taylor 5aee23ed85 Test immediate checkbox click after a sweep on the same control 2026-11-21 13:22:19 -05:00
Dylan M. Taylor 89032df543 Merge commit 'refs/prep/next' into dot-checkbox-2433 2026-11-21 13:21:38 -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 059d8c9ea3 Memoized views: derived returns the same Arc while its key is unchanged 2026-11-21 17:45:03 +00:00
aiongg cfe04c3ab4 Memoized views: a row unit replays in the row's measuring sweeps
With the flow facts out of the key, the counting sweep's call keys as the real call does, and an idle frame or a
frame at the same width runs a memoized row unit in none of the row's sweeps. The trials say so: the row-unit trial
asserts no measuring run, and the counting-call trial describes the call by its flow.
2026-11-21 17:45:03 +00:00
aiongg f300c5954a Memoized views: the header trial asserts every call replayed; a measuring replay's value holds the real run's layout
The trial checks the frame's memo log: three replays (the sizing pass and the real run of each of the frame's two
passes), the last pass's real run among them. MemoView::show and the runner say that a measuring call that replays
returns the kept real run's value, laid out in that run's room and flow, so a caller that measures takes the extent
the call reports.
2026-11-21 17:45:03 +00:00
aiongg f8888f8beb Memoized views: the flow of the body around a view is a fact of its place, not of its key
A container's measuring run lays its header and end regions out as a content column, and its real run does not;
a shrinking row's counting sweep shows its units unbounded, and its least probe at their least. With those flow
facts in the scope key, such a sizing call keyed apart from the kept real run, ran as a measure and could decide
"run" for the whole pass, so the real call ran too.

The flow facts (content column, given column, content axes, least measure, unbounded axes, cell fills, and whether
the leaves fit the view's room) move into a Flow that Place (real calls) and Measured (sizing and measuring calls)
hold, and each kind of call compares its own. Only a real call reads or writes the pass decision; a measuring call
checks the key and the rest of the predicate itself each time and decides nothing for the pass. This replaces the
per-call key exception and Place.fits. Env::local_mut clears the cached scope key, so a sweep that edits its scope
keys again.
2026-11-21 17:45:02 +00:00
aiongg adcff3f70a Merge pull request #2790 from aiongg/floating-expand
Docking: a collapsed native palette expands in place on macOS; a faint grip on icon groups
2026-11-21 12:43:36 -05: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 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 77c7c62345 Merge pull request #2860 from davidmann4/crop-grown-backdrop
RasterDisplay: a region fill past the document for Crop's grown-canvas preview (photocraft#16185)
2026-11-21 17:27:44 +01:00
David Mann 8fbff30223 Merge pull request #2830 from davidmann4/fix/2812-panels-read-mods
Panels and widgets read the modifiers, not the pointer frame
2026-11-21 17:27:30 +01:00
vangel76 aefc495087 Preserve completed checkbox sweeps across new presses 2026-11-21 15:53:21 +01:00
vangel76 a8813a11b9 Merge upstream next into the checkbox sweep port 2026-11-21 15:47:41 +01:00
aiongg e5e007233a Dots are one shared paint: Rule::dotted
The collapsed icon group grip is a faint dotted line: hairline dots one
dot apart, as the reference apps' grips. Guides' dotted line and the
grid's dots draw through the same paint, so each dot covers whole
physical pixels and a one-pixel dot no longer vanishes. The guides
stories show a dotted guide.
2026-11-21 14:46:57 +00:00
David Mann 2dd38baf49 RasterDisplay: a region fill past the document, under the picture (photocraft#16185)
Crop's preview of a crop that grows a Background shows the area it adds in the
background colour, as the commit fills it, instead of the checkerboard.
2026-11-21 15:46:10 +01:00
aiongg ed9823347c contract-api.md regenerated after the next merge 2026-11-21 14:23:08 +00:00
aiongg f016e24751 Merge storytold/next into rework-d2
Brings in craft-libs#2756 (frame-t3), #2810 (a memoized view in a row sits on the row's line) and #2838 (home rail look).

- egui pin and Cargo.lock: rework-d2's egui rev, which contains #2756's; frame-t3's serde line for craft-tracked.
- menu bar: EnglishFn goes with frame-t3's removal of english; rework-d2's docs stay.
- Env::start_view_room: keeps both column flags, then Shrink::Fit when the view fits.
- lazy::Place: both opacity and fits.
- Lazy::run_keyed: a memoized view's room is the row's cap when the row narrows it, else the flow region, and then moves down onto the row's line (on_row_line); the cap is horizontal and the move vertical, and the move keeps the room's size, so a kept run replays moved with it.
2026-11-21 14:23:08 +00:00
David MannandClaude Opus 5.5 806fe5b278 Preset browser trial follows #2756: a pointer move beside it replays it
#2756 made the browser read its rows from a PresetSource and read the
pointer and the modifiers only for its rows' events, so the browser part
of this branch is next's now. The trial builds its rows from a source
and checks the pointer move only: at rest the browser reads no
modifiers. Its tile view still fails without the tile grid change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 15:15:56 +01:00
David Mann 4cb54cc1dd Merge remote-tracking branch 'origin/next' into fix/2812-panels-read-mods
# Conflicts:
#	crates/ui-patterns/src/patterns/presets/browser.rs
2026-11-21 15:07:50 +01:00
aiongg 7d8b961515 Merge pull request #2756 from aiongg/frame-t3
Model-view-update: overlays and focused views replay; preset lists and menu facts as tracked inputs
2026-11-21 09:05:14 -05:00
David Mann 53d9f8028c Merge pull request #2838 from davidmann4/fix/home-rail-look-before-port
Home layout: the rail's look from before the PhotoCraft port (photocraft#15476)
2026-11-21 15:01:40 +01:00
David MannandClaude Opus 5.5 3b572a3954 Every panel and widget reads the modifiers, not the pointer frame (#2812)
The same read as in the Layers and Channels panels: pointer::frame(..).mods
notes the pointer as a tracked input, so a memoized view holding the
component ran on every pointer move in the window. pointer::mods returns
the same modifiers and notes only the modifiers. Fifteen more sites read
the frame for its modifiers only (the preset browser, the tile grid, the
section footer, the dock's drop, the canvas guides, the crop tool, the
bins, Color Range, the raw develop dialog, the table conditions, the form dialogs,
Save for Web) and the text style panel; each reads pointer::mods now.

The preset browser also reads the pointer's buttons, press and release
for its rows' events; it reads the frame only when there are events, so
a pass without one does not depend on the pointer.

In PhotoCraft this left Swatches, Gradients, Patterns, Styles, Shapes,
Tool Presets, Character and Paragraph Styles, Brushes and Glyphs running
on every pointer move over the canvas; with the change every docked
panel replays.

Trial: the preset browser in a host view replays on a pointer move
beside it, in its list view (fails without the browser change) and its
tile view (fails without the tile grid change), and Alt held runs it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 15:01:27 +01:00
aiongg c10002e09f Frame cost: one Access rule for components, members and faces
Collection members build their Access and sub-node only when the
collection has a node, and faces build their record's facts only for a
reported face of a host with a node: the component's node flag (step 8)
is one signal on its core that the report, members and faces read.
Without a node, a component builds Access only when its roles include a
merged one or both a role with a node and none.

Tooltip texts are counted where text_of and spec_text build them; part,
member and pointer tooltips borrow their spec. The tooltip trial checks
that the tip shows its text and builds it once a pass while it fades,
and none after; the Access trial adds an open menu and a tab strip's
members.
2026-11-21 13:43:10 +00:00
aiongg 4c9df420e5 Regenerate docs/contract-api.md 2026-11-21 13:26:52 +00:00
aiongg bc73cf5d1d Frame cost: tooltip text and AccessKit data only when needed
The report step builds a component's Access only for a reader: its node,
a merged role's facts, or a type whose role Access picks from
alternatives. With AccessKit off, a run takes only the value text. The
carried-name lookup moves below the node check.

A tooltip's text is built only when the pointer or keyboard wants the
tooltip or its layer still shows, at most once per call, and the tooltip
spec is borrowed instead of cloned on every run.

Count trials: 40 Field rows build no Access with AccessKit off; 40
unhovered icon buttons build no tooltip text, the hovered one builds its
own once a pass.
2026-11-21 13:26:52 +00:00
David Mann 687aad26e9 Merge pull request #2810 from davidmann4/fix/photocraft-16113-memo-row-line
A memoized view in a row sits on the row's line (photocraft#16113)
2026-11-21 13:55:54 +01:00
David MannandClaude Opus 5.5 ec5bcc602d Layers and Channels panels read the modifiers, not the pointer frame (#2812)
Both panels read pointer::frame(..).mods on every pass: the Layers
panel for its rows' held modifiers and its drop test, the Channels
panel before it takes its commands. pointer::frame notes the pointer
as a tracked input, so a memoized view holding either panel ran on
every pointer move in the window. pointer::mods reads the same
modifiers and notes only the modifiers.

Trials: a pointer move beside each panel replays its host view and Alt
held runs it; both fail without the change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 12:28:28 +01:00
aiongg 282d45bb28 Help gives the help line's Text, which its callers show 2026-11-21 11:19:46 +00: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
David MannandClaude Opus 5.5 efb06e9951 Home layout: the rail's look from before the PhotoCraft port
The desktop Home layout (`StartScreen::home_layout`) drew its rail with the
dialog button look and inline links: pill New and Open, Home as a filled pill,
Learn and the community links underlined in the link colour, and the page
title as a Display heading. The rail is back to how PhotoCraft drew it before
it moved onto the framework (photocraft#15449):

- New and Open at the control radius.
- Every link a full-width row with its icon: muted at rest, normal under the
  pointer; a URL row opens its URL (its tooltip), a command row fires it.
- The selected row (Home) keeps normal ink and has an accent bar at its
  leading edge.
- The page title as a Heading.

Only the Home layout changes; the other start-screen layouts keep their links.

Part of photocraft#15476

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 11:54:42 +01:00
David Mann fb8aae1df6 WIP: memoized view in a row sits on the row's line (photocraft#16113) 2026-11-21 11:43:38 +01:00
aiongg 6c72055339 A memoized row unit's room follows the row, not its own content; a call's key is its own
A memoized view the row does not narrow shows as in no room, in the row's flow region, and its content sizes from its
content along x; only a row that narrows it cuts its room to the width it gives. The cap of a view the row did not
narrow was its own counted width, so new content changed the view's room and the discard pass ran it again. The
shrink record carries whether the row narrowed the unit.

The replay decision of a pass covers the kept run; each call compares its own key. A row's counting sweep calls the
view with another key (its content shows unbounded): that call no longer decides the pass against the real call
after it, and a sizing call takes the extent the last sizing run measured for its own key.
2026-11-21 10:42:23 +00:00
aiongg 2ef7bbff38 A field labelled above sits on a row's line by its control, as a control labelled above does
A container labelled above its body reports its body's first control line as the line it sits on in a row, so a
button beside a field labelled above sits level with the field's control, not its label.
2026-11-21 10:33:46 +00:00
aiongg b62b64af52 FloatingGroup::scale is a declared prop (display scale, pixels per point) 2026-11-21 10:20:12 +00:00
aiongg 9bb77ccba4 Preferences docs name host-labelled rows; trials for their search and for a palette's context menu popup 2026-11-21 10:18:40 +00:00
aiongg 69ed953094 Preferences: host-labelled rows show their rule's help and follow its enabled state 2026-11-21 10:18:40 +00:00
aiongg 8983476f09 Memo trial: a view in a shrinking row runs at most once per measuring sweep of the row 2026-11-21 10:18:40 +00:00