Commit Graph
70 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 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
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 Ball 9a4dd39d3a Workspace clippy: fix lints across ui crates and tests 2026-11-20 00:56:55 +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
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
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 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
FredApps b04d18a735 Select UI suite items through explicit registries 2026-11-19 12:20:08 +01: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
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
Martin Ball 2e2c815299 chrome-w1: Laid default names dropped 2026-11-18 16:02:14 +00:00
Martin Ball 38436d5216 chrome-w1: trial records default to Rect::NOTHING (egui Rect has no Default) 2026-11-18 16:02:04 +00:00
Martin Ball b912c077f0 chrome-w4: net change of 4 commits
- chrome-w4: written by an agent
- chrome-w4: finished by an agent
- chrome-w4: finished by an agent
- chrome-w4: review fixes (review-1)
2026-11-18 16:01:11 +00:00
Martin Ball 8edb3735ab chrome-w2: net change of 3 commits
- chrome-w2: written from its sheet
- chrome-w2: repair 1
- chrome-w2: review fixes (review-1)
2026-11-18 16:01:11 +00:00
Martin Ball 5d8abecec3 chrome-w1: net change of 4 commits
- chrome-w1: written by an agent
- chrome-w1: finished by an agent
- chrome-w1: finished by an agent
- chrome-w1: review fixes (review-1)
2026-11-18 16:01:11 +00:00
aiongg 0139ee11ae settle chrome: the settled bar trial runs its four frames again, and the docking runs name their settled dock
`(0..4).map(|_| frame()).next_back()` runs the frame once, not four times: a Map over a range steps from the back
without calling the closure for the other items. The trial runs three frames and checks the fourth.
2026-11-18 09:35:37 +00:00
aiongg 6d3dceca44 settle chrome: the column bar scopes without an id salt, and the tests drop the deprecated Ui::id and unused mut 2026-11-18 08:33:28 +00:00
aiongg fc585f6227 Window caption parts: a settled region declares them again when it replays
A title bar that settles keeps the caption record the Windows hit test reads.
2026-11-17 23:57:45 +00:00
aiongg 6496e37e68 cargo fmt 2026-11-17 08:27:05 +00:00
aiongg f86c3b134c Keys with nothing focused match in the window's shell; a momentary command's held key makes its scope's keys work first (keymap context), and that scope's commands go to the application 2026-11-17 08:21:52 +00:00
aiongg c3d7655b9e Shell and mock: AppShell::tools and Slot::columns removed; the gallery mock's toolbar is a stepped dock column drawn through group_view, with a collapsed Navigator column and flyout binding 2026-11-17 04:03:17 +00:00
aiongg 6d972e35ed Rails: ToolRail lays out the columns its width holds with a measure and dock grid; PanelRail and the CanvasPanel rail removed 2026-11-17 03:59:55 +00:00
aiongg b6088dbdcf Merge branch 'fw/speed1' into fw/mac1
# Conflicts:
#	crates/ui-patterns/src/patterns/dock/area.rs
#	crates/ui-shell/src/shell/app_shell.rs
2026-11-16 19:05:56 +00:00