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
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 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
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
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
aiongg a214d2e8e5 MemoProps: every_pass, covered_by and address derive attributes; the framework's own keys stay hand-written in ui-contract
The derive takes #[memo_props(every_pass = "why")] on a type (it keys in every pass and
feeds no field), #[memo_props(covered_by = "<field>", reason = "why")] on a field another
field of the same variant stands for (the named field must exist and feed the key) and
#[memo_props(address = "why")] on a &'static field. Group, menu level, timeline and canvas
contexts and GuideDrag key in every pass; CaptionIcons, Catalog and ModalRules name the
field that covers the rest (ModalRules' allowlist entry goes); CardStory keys its
registration by address. design-lint allows hand impls of framework keys in ui-contract
(values.rs, icon.rs, memo_view.rs beside memo.rs) and lists the gallery's &mut state views
and the two presets walks with their reasons. Doctests for each attribute.
2026-11-20 14:21:25 +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 MannandClaude Opus 5.5 6327670e92 Fix the two design-lint findings from the Home screen spacing
The tile's regular card padding is a #[prop] instead of a hand-written
setter. The desktop Home page's outer margins are larger than any spacing
token, so they keep their measured values behind a listed exception.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 14:36:47 +01:00
haranishi 329ceb85fb Give desktop Home recent cards more room 2026-11-20 19:18:52 +09:00
aiongg 90e40105d2 stories: start and metadata stories bind their story value through ValueAt
They copied the value out and wrote it back, so their binds named the copy by address.
2026-11-20 09:49:00 +00:00
Martin BallandClaude Opus 5.5 a9deabd00e design-lint: api, props, contract and exception findings of the port code
- api/non-exhaustive: #[non_exhaustive] on public enums, variants and structs, with constructors for what
  callers built by struct expression (KeytipControl, GroupWidths, RibbonMenuRequest, EdgeLook::sample,
  BalloonItem, CropScope::object, PageBandRoom, WheelSpeed, AltCodePages, GalleryFace, GradientTile).
  GalleryItem, RibbonOutput, LineBreakOptions, AsianTypography and GapEdge join the closed list.
- props/hand-setter: setters that only store become #[prop] fields. Keytips drops its own enabled field
  for Common enabled, and its show becomes show_over.
- contract/no-global-state: constant tables are const, not static.
- contract/egui-import, memory, allocate: LayerId, TreeUpdate, Id::unique, the text scroll memory and
  allocate_space go through runtime::egui.
- contract/overlay-flag: CanvasScrollbars declares overlay; its drag story covers Open.
- Markers and exception entries only where the code is the exception (stories, trials, unit-square
  coordinates, the balloons id scope).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 09:38:56 +00: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
Martin Ball f77301a76d Merge follow-up: resolve_in takes Reads; the host-key trial gives states through CommandStates; cargo fmt 2026-11-20 00:40:05 +00:00
haranishi d136d34300 Restore the Home screen rail and empty card 2026-11-20 04:17:59 +09:00
Martin Ball abbc281fbc Merge branch 'red/look-backstage' into area/ribbon-fw 2026-11-19 13:38:02 +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
Martin Ball 992a367563 remove the port red rounds DIAG prints 2026-11-19 13:21:50 +00:00
FredApps b04d18a735 Select UI suite items through explicit registries 2026-11-19 12:20:08 +01:00
aiongg c832163e10 craft-ui: memoized views refuse replays of evicted memory, outside saved writes and discarded passes
A kept run records the memory owners it registered and the generation of
ended shown lives; a view whose components' shown memory was evicted or
ended since runs when it is shown again. A kept or saved binding in a view's
props feeds the context's count of writes made outside a component's edit
(set_saved_value and forget_saved per key, forget for session memory), read
through the view's key, and those writes note the edit for the frame.

A record whose run asked for a discard pass is never replayed: egui's count
of discard requests is compared between open and close, and layout memory,
whose ask reaches egui only in the end hook, notes its own. A run keeps the
key from before it, so a view that writes through its props runs once more
from the written value before it replays. A memoized view's entry id is
claimed once per pass, as stage bases are.

Check inputs are keyed only when a view takes the key (NameCheck and the
binding check box their inputs), PresetNames borrows the library and walks
its names, a Tracked field binding keys by address and write count, and
caption icons read again take the next generation.
2026-11-19 10:29:58 +00:00
aiongg 460bb5de7d craft-ui: MemoView, memoized views keyed by their props
A memoized view's content is a fn and its props are its only input, so the
framework sees every input it reads. While its key (the props type, the fn's
address and the props' inputs) equals the key after its last run, it adds
that run again and returns what the run returned. Lazy and MemoView share
one runner and one settled test; a memo view ignores the two rules that infer
a change of app data (input arrived, a repaint was asked), replays a run of an
earlier pass of the same frame when nothing it read was edited after the run
started and the run asked for no discard pass, and keeps its entry through
absence up to twice the shown views per viewport.

MemoProps gains identity() (the props type with its lifetimes erased, through
the typeid crate), &mut Tracked<T> by revision and Bind by value and place.
A binding's check takes its inputs as props: check(fn) and
check_with(inputs, fn), one mechanism; a composite hands its check on through
BindMut::check_of. The preset name check (NameCheck) takes inputs the same
way, with PresetNames as a library's names. Glyph is Any + MemoProps, and an
icon keys a glyph by its type, then by its key; the caption glyph owns an
Arc<CaptionIcons>.

Facts::register is journaled, layout memory notes discard asks into the open
record, and the settle counters become MemoRun and last_pass_memo_runs. The
idle-frame trial moves onto memo views, beside count trials of the mechanism.
2026-11-19 10:04:00 +00:00
FredApps f8dddb2a55 Split UI test kit from story suite 2026-11-19 09:25:07 +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 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
Martin Ball 10b23c3d55 Contract stubs: craft-ui-canvas craft-ui-shell 2026-11-18 08:21:44 +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
aiongg 9d61d87e46 cargo fmt 2026-11-16 18:29:58 +00:00
aiongg b54fe562bc The canvas panel's rail is one rail column wide at the panel's end edge, so the document area runs up to it 2026-11-16 17:49:05 +00:00
aiongg 9b8dbfb332 Shell slots and dock panel bodies settle when they give a content version
Slot::content and AppShell::content give a slot the version of the app data it shows; DockPanels::content
gives one per panel body. With one, the slot or body runs in a settling Lazy. Trials: a versioned slot and a
versioned panel body run only when their version changes; a stroke whose tool asks for repaints runs no
versioned panel beside the canvas and one pass per move frame.
2026-11-16 17:42:23 +00:00