Commit Graph
102 Commits
Author SHA1 Message Date
David Mann 1cb53fbbf4 Merge pull request #3055 from davidmann4/fix/16403-16406-navigator-crop-bar-grip
Navigator drag, Crop move and shield seam, options bar clip, grip ink (photocraft#16403, #16404, #16405, #16406, #16410)
2026-11-22 21:02:29 +01:00
David MannandClaude Opus 5.5 4ba7c7e215 DocumentWindow: a level of its own; first_placed says the window is kept there (photocraft#16415)
DocumentWindow::level stands the window at a WindowLevel; with Palette a
floating document stays above the app's main window while the app is
active, drops below a blocking dialog and hides with the minimized main
window. first_placed's doc says what it does: the window is kept at the
rect while shown, so a caller whose user moves the window follows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:51:51 +01:00
David MannandClaude Opus 5.5 1aabfe2baf Memoized views keep the row line they stand on, so a memoized bar fills its slot
A memoized view starts a layout room of its own (`start_view_room`), which dropped the row line of
the row around it. A fill-width row shown through a memoized view (an app's options bar in the
shell's options slot) then measured its content with its padding on top and bottom instead of
taking the slot's line: its members sat below the slot's middle and the bottom of a text button's
outline was cut off. The view now keeps the line as a levelled unit does (`places: false`): its
content fills the line without taking slots on it.

Fixes storytold/photocraft#16405.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:07:21 +01:00
aiongg 8d39ecb4db ui-shell: embed::before_ui takes the root window's handle, outside the app feature
An app with its own eframe App and without ui-shell's app feature (which turns
on egui's default fonts) could not call before_ui, so its root window on
Windows got no hit sink: corner resizes and title-bar moves started late,
through the grips' StartResize. before_ui now takes any
raw_window_handle::HasWindowHandle (eframe's Frame), and it and the first fit
build without app. Native only: the browser has no native window.

The trial checks that with the sink installed, the window region's corner and
title bar answer the platform's hit test and a corner drag sends no
BeginResize.
2026-11-22 03:17:29 +00:00
aiongg f36b912872 Shell trial: reset the rail run counters as two statements 2026-11-21 20:59:54 +00:00
aiongg 0aa781ecf0 Trials for content rails, scrolling lists and the settled frame after a grow
Content start and end rails sit at their sides in left-to-right and
right-to-left windows, hold their content and settle in one pass with
each rail's content run once. A content slot holding a vertically
scrolling list, content-sized or filling its height, is as tall as the
list's rows and the body keeps the rest of the window. The count trial's
grow half also checks that the next frame is settled.

SlotSize::Content documents that the slot never takes more than the room
the window leaves it, and that raw egui content allocates its own extent
along the slot's edge.
2026-11-21 20:37:02 +00:00
aiongg 5366157e63 A content slot records its extent only from its own real run
The shell recorded a content slot's extent from any run of its content,
including the scope's measuring run, which alone runs for an embedded
shell out of sight. The slot's own body now says whether it ran for real,
and only that run records. A content slot's pane no longer carries an
extent: a pane at a rect ignores it.

The out-of-sight trial also holds a content slot, which does not run.
2026-11-21 20:37:02 +00:00
aiongg 2d8b842954 A content-sized shell slot runs its content in the room it can grow into
A SlotSize::Content slot ran its content in the rect it was laid out at,
the extent its content took in the last pass. A child that fills its
height there is capped at that room, so content of fill-height
containers (the ribbon's groups) could never grow the slot past its
first height, and their controls ran past their containers' feet.

The slot's pane is now as large as its content from its outer edge
(ShellPane::at_content_extent, which covers bottom and side panes as
well as the top), in the room from that edge to the far edge of what
the slots before it leave. The window is still laid out at the kept
extent, and remeasure lays it out again when the pane's extent differs.
2026-11-21 19:48:46 +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 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
The Daniel 5bb2886281 Labelled controls sit on the bar's line like other controls
A check box or radio with its label after it was placed at the top of
the room, while every other control is centered on the row's line. In
an options bar shown in a slot shorter than it asks for (36pt where the
bar wants 40), the check box stood at the bar's top edge, 6pt above the
fields beside it. It now sits on the row's line, and a tall room no
longer makes its row taller.
2026-11-21 07:58:25 +00:00
aiongg b66a60caf8 DocumentWindow: the body takes the window's room and never scrolls 2026-11-21 01:42:09 +00:00
Martin Ball 05acb5587f Merge pull request #2566 from storytold/fix/7149-items2-3-start-cards
ui-shell: start-screen cards take the app's picture shape, size and paper; card tiles frame all four sides
2026-11-21 00:01:28 +00:00
FredApps 36dea842e8 Merge remote-tracking branch 'origin/next' into perf/2332-print-coverage
# Conflicts:
#	crates/design-lint/src/workspace.rs
#	crates/menu/tests/it/main.rs
#	crates/ui-contract/src/testing/mod.rs
#	crates/ui-gallery/src/chrome/card.rs
#	crates/ui-gallery/src/viewer/catalog.rs
#	crates/ui-gallery/tests/it/main.rs
#	crates/ui-widgets/tests/it/bars/mod.rs
#	crates/ui-widgets/tests/it/body/mod.rs
#	crates/ui-widgets/tests/it/text/chips.rs
2026-11-20 19:23:18 +01:00
Martin BallandClaude Sonnet 5.5 7ee54362ae Merge storytold next into the start-card fix
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 16:45:45 +00:00
Martin BallandClaude Sonnet 5.5 2bd43ca27a ui-shell: start screen takes picture shape, card width and page pictures; tile frames its picture
Part of storytold/wordcraft#7149, item 2 and item 3.

StartScreen gets picture_aspect, card_width and page_pictures (white paper, no
transparency grid, icon without a sunken tile); RecentList gets picture_aspect.
Defaults keep today looks. A card tile now draws its frame over the picture so all
four sides show, not only the top and bottom edge of the sunken well.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 15:57:04 +00:00
FredApps 428601bc95 Merge branch 'next' of https://github.com/storytold/craft-libs into publish/registry-2332
# Conflicts:
#	crates/color-ui/src/ui/swatches.rs
#	crates/draw/tests/it/main.rs
#	crates/imaging/tests/it/main.rs
#	crates/menu/tests/it/shortcuts/mod.rs
#	crates/text/tests/it/main.rs
#	crates/ui-patterns/tests/it/form_dialogs/mod.rs
#	crates/ui-widgets/tests/it/text/mod.rs
2026-11-20 16:35:19 +01:00
aiongg 339570da6f Merge storytold next into memo-audit-fix
next's submenu switch (62189858af) requests a plain repaint, and its trial counts a memoized view beside the bar,
which replays while sibling submenus switch, in place of a settling Lazy region.
2026-11-20 15:33:50 +00:00
aiongg 39da1180ee Merge storytold next into memo-audit-fix
next's WordCraft port and the framework work under it (243d68e12d) take the memoized-view APIs where they meet the
branch: story values bind through StoryData::bind, value_at and pair_at (next's copy-out stories included; one held
form story still binds a copy, as its held answer is a note beside the value); next's env values (GroupLevel,
ControlPlace, RibbonLook, ScreenModeSet), IconMark and PageBandRoom derive MemoProps, and the shell entry keys the page
band's room; request_own_repaint calls become request_repaint. The collection extent next reworked (motion-owned
style context, FillHeight, ideal width by item count) moves into items_extent. The header's hosted cells join the
parts' roving group from the pass's own membership (parts_group over Cx::join_roving), as the parts' stops do. A
content-sized shell slot measures its content with the app running in it every pass. The gallery card hands the
story's output from its view's real run (StoryRun).
2026-11-20 14:58:23 +00: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
David MannandClaude Opus 5.5 16e2584365 Merge storytold next into haranishi-combined
Conflicts resolved by keeping both sides. The start screen keeps next's
Greeting layout and its move of the recent body to recent_list.rs; the
desktop Home grid aspect and card padding now reach recent_body through a
desktop_home flag. The scroll bars keep both the document chrome (arrows,
corner) and next's drag tip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 14:55:23 +01:00
David Mann 2ca8c47970 Merge #2424: Restore the Home screen rail and empty-state card 2026-11-20 12:51:46 +01:00
aiongg bddc593180 Merge storytold next into memo-audit-fix
Memoized views stay the one change mechanism: next's settling-path additions (modifier reads as bind keys, given-edit
and keymap unsettling, settle counters) give way to the tracked inputs that cover them, and request_own_repaint calls
become request_repaint. next's command board, node facts after the node check, the guide drag out of a ruler and the
CommandStates input are taken; the trials next wrote on Lazy::settles run on memoized views. The ruler guide env value
keys a view under the canvas in every pass of a drag. The replay audit's run in the gate takes next's target selection.
2026-11-20 10:26:06 +00:00
haranishi 329ceb85fb Give desktop Home recent cards more room 2026-11-20 19:18:52 +09:00
haranishi dfbaf6a18d Adjust spacing on the desktop Home screen 2026-11-20 11:32:24 +09:00
Martin BallandClaude Opus 5.5 a2085c5505 board: regression test for a kept resolution of the focused stop's edits
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 01:30:21 +00:00
Martin Ball 9a4dd39d3a Workspace clippy: fix lints across ui crates and tests 2026-11-20 00:56:55 +00:00
Martin Ball e9f8979aac Merge craft-libs next 200447091 (memo-resolve, drag handles) into the WordCraft port: story command states through CommandStates 2026-11-20 00:36:56 +00:00
aiongg b257b150fb craft-ui: the replay audit runs every memoized view that would replay and compares it with the replay
Test builds only. With CRAFT_UI_AUDIT_REPLAY=1 (or testing::audit_replays), the outermost view that would replay in a
real pass runs for real inside an audit record; the kept run stays as it was. The run is compared with what the replay
adds: the view's rect, paint, widget rects and AccessKit nodes (PassRecords::first_difference), focus registrations,
the journal and the output. A difference panics with the view's name and the first difference of each kind. Counters
count nothing inside an audit run, so the count trials hold under the audit.

A record that paints a paint callback is blocked: its view runs every pass, and the audit names it.
2026-11-20 00:10:09 +00:00
FredApps 236df21be2 Merge remote-tracking branch 'origin/next' into publish/registry-2332
# Conflicts:
#	crates/ui-shell/tests/it/commands/mod.rs
2026-11-20 00:43:55 +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
haranishi d136d34300 Restore the Home screen rail and empty card 2026-11-20 04:17:59 +09:00
FredApps a0d9d47d66 Merge remote-tracking branch 'origin/next' into publish/registry-2332
# Conflicts:
#	crates/automation/src/agents/mod.rs
#	crates/automation/src/agents/settings.rs
2026-11-19 19:14:31 +01:00
aiongg da6e6509fd craft-ui: a sizing replay measures content its last sizing run did not
A child keeps each kind's extent with the key of the content it showed. A sizing call
of a pass that replays takes the sizing extent only when it was measured from the
kept run's content; otherwise it runs once as a measuring run, which keeps no record
and leaves the pass's decision alone, so the real run still replays. Before, the
sizing call took the extent of an older run, so a container measured a changed view
at its old size.

A change now costs one real run and one measuring run: in the sizing pass that first
measures the new content, or before the real run where the container measures first.
2026-11-19 14:16:10 +00:00
aiongg 7e754a6742 craft-ui: a replayed view registers its revealed rects with the shell
ShellCx's revealed rects live in a pass-stamped record per viewport, keyed
by the shell's id, and each registration is journaled, so a memoized view
in a slot that replays registers the rects its run did. reveal_rect skips
measuring runs itself.
2026-11-19 13:36:11 +00:00
aiongg 5e6875a9d6 craft-ui-shell: is_multiple_of in the resolve trial 2026-11-19 13:35:56 +00:00
aiongg 587590fec7 craft-ui: dock chrome and shell slots as memoized views
Each dock group's tab row, each column's bar and each iconic column's bar is a memoized view on the spec values,
the arrangement and the look; what the user did on them leaves through an outbox. The containers (DockGroup,
DockColumn, IconicColumn) and the host's body, group view and group header run every pass, and the host memoizes
inside them; shell slots the same way. The group menu is one popup, opened by the panel menu button or by a
context request on a tab, and its rows are built only while it is open.

Removed: DockPanels::content and spec_version, the chrome key, DockColumn::content, IconicColumn::content,
Slot::content, Slot::content_version, AppShell::content, Lazy::show_or and Run::unkept. The gallery's mock
Navigator body is a memoized view.
2026-11-19 13:34:57 +00:00
Martin BallandClaude Opus 5.5 00035d1253 look-backstage: an empty RecentList says so in a muted line at the reading start, not the start screen's centred notice; trial and story
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:32:06 +00:00
aiongg 10ae05108d Two-window trial; a child window's frame takes no app input of its own 2026-11-19 13:19:46 +00:00
FredApps b04d18a735 Select UI suite items through explicit registries 2026-11-19 12:20:08 +01:00
aiongg fbaaa92e00 Command resolution: revived instances, per-viewport facts, indexed wake
An instance that missed one pass and registers again moves the shared
generation. The last focused chain, the instances inside the top modal
layer, a dialog owning the keys and the focused stop's edits are each
viewport's own, with their own generations. A resolution the focused stop
answered is read and woken under its own key. Removed instances' state
revisions go with a shared move. The wake walks only the entries indexed
under the inputs that moved. The testing check asks the gate apart from
its cache. The per-pass counters keep the previous pass readable.
2026-11-19 10:58:46 +00:00
aiongg 9bfa2c751b Command resolution only on change
Each kept resolution holds the key of what it read: the state's revision,
the gate's key and answer, a shared generation (keymap and catalog, scope
parents, instances and their liveness, modal facts) and, when read, the
focus generation, the focused stop's edits and a layer's or menu's vantage.
A reader whose key holds gets the kept Arc<ResolvedCommand>; the wake at
the start of a pass walks only when an input moved. CommandGate is a fn
plus props, asked once per command per key. App-scope states come from a
held Tracked<CommandStates>. resolve and resolve_command return
Arc<ResolvedCommand>. Under testing, every 100th pass compares every kept
resolution with a full one; count_resolve counts new, repeated and checked
resolutions.
2026-11-19 10:33:55 +00:00
aiongg fc8f48ff96 Command board: maps for instances, modal roots and shown readers; node facts after the node check; chord texts from the keymap build 2026-11-19 08:05:00 +00:00
Martin BallandClaude Opus 5.5 a39debb431 rr-app-ribbon2: a content slot measures what its content allocated, not the stack's clipped response
The stack's response rect is clipped to the pane (sense_root intersects a root's rect with its clip), so a slot laid
out one bar high measured its content as one bar high and never grew: the group row under the strip was cut off. The
slot now reads the stack body's min_rect after its content ran, plus what the pane keeps around its body (its rule).
The trial reads the lines from the slot's Ui, not from clipped responses, with a scrolling group row in a child Ui.
DIAG line kept until the screenshot confirms it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 00:51:53 +00:00
Martin BallandClaude Opus 5.5 23fa55c53d rr-app-ribbon: SlotSize::Content, a shell slot as tall as its content that stacks it (a ribbon's strip over its group row)
A top slot was one options bar high and laid its content in one centred line, so a ribbon's strip and group row sat
side by side in a bar-high pane and every group collapsed. A Content slot stacks its content, measures it in the real
run, keeps the extent in the shell's state and lays the window out again (discard_pass) when it moves. DIAG eprintln
at the measurement, to come out once the screenshot confirms it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 00:38:41 +00:00
aiongg 0392fc439d Commands: the gate answers each command once per frame
The board asked the app's gate again for every resolution: each reader
of a command, the measuring and the real run of each component, and the
re-resolution of every shown reader at the start of each pass. The gate
is a snapshot of what the app knew before the frame, so the board keeps
its answers for the frame and asks once per command. CommandRef::key_text
gives the key without allocating for a command without parameters; the
keymap's lookups and the board's answers use it.
2026-11-18 20:59:41 +00:00
Martin Ball def1c54d40 fmt: chrome framework batch 2026-11-18 16:52:16 +00:00
Martin Ball 6da5c07716 Merge branch 'red/rc-chrome-w2' into area/chrome-fw 2026-11-18 16:26:06 +00:00
Martin BallandClaude Sonnet 5.5 6c2cda8799 page band fills the room the shell gives it so its move band spans the free part; PageBand gets a story; title test reaches the button by Tab, as a button takes no focus from a click
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-18 16:20:12 +00:00
Martin BallandClaude Sonnet 5.5 24237189d4 RecentList registers as a pattern; the recent-row trial finds rows by their name with the folder
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-18 16:19:27 +00:00