Commit Graph
102 Commits
Author SHA1 Message Date
Martin Ball aaa87b5754 Merge pull request #2568 from storytold/fix/7149-item7-top-clamp
pages: one rect for the page view and its canvas, so the page no longer jumps at the top with rulers on
2026-11-21 00:00:26 +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 9ee925024c pages: #7149 item 7, one rect for the page view canvas and offset with rulers on
The layout, the given view and the offset clamps used the full rect while the canvas clamped in the rect inset by the ruler strips, so a wheel up at the top moved the page 8 points and it snapped back.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 15:30:05 +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
aiongg 5589523161 stories: values bound together come from one story value or StoryData::pair_at, helpers bind by source
A story binds two values at once from pair_at when one of them must keep its own name, as a dialog's open does for
the gallery's opener; values bound together otherwise share one story value, and a helper takes the value's ValueAt
beside it. The PDF export story's open leaves its settings value, so the card opens the dialog again after Cancel.
Unused Bind imports in story files are gone.
2026-11-20 10:11:06 +00:00
aiongg 922dc82098 stories: story values kept in a local bind through ValueAt
Script: `let PAT = data.value(ARGS);` (or ranged, choice) whose locals a later Bind::bound / Bind::bound_mixed in the
same block binds becomes `let (PAT, AT) = data.value_at(ARGS);` and the binds become AT.bind / AT.bind_mixed; 292
values, 333 binds; unused Bind imports dropped.
2026-11-20 09:46:30 +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
aiongg 2e8d7a21bf stories: bind mixed story values through StoryData::bind_mixed
Scripted: Bind::bound_mixed(data.value(..)) becomes data.bind_mixed(..) at 35 sites, and an import of Bind that
nothing else uses goes.
2026-11-20 08:28:54 +00:00
aiongg 13764666ac stories: bind story values through StoryData::bind
Scripted: Bind::bound(data.value(..)) becomes data.bind(..) and Bind::bound(data.ranged(..)) data.bind_ranged(..).
2026-11-20 07:43:21 +00:00
Martin BallandClaude Opus 5.5 5d6a3ef6ea Merge follow-up: the page view leaves room for its rulers without Canvas::show_rulers
Upstream 650694d5a removed Canvas::show_rulers and clips a canvas body to its view. PageView::rulers(on) now shows the canvas inside the ruler strips (Rulers::strips), so the view is inset as before, and runs the app body with the clip opened over the strips, where PageRulers show at PageBody::rect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 04:53:30 +00:00
Martin Ball e93b8c1fea Docs: intra-doc links resolve under -D warnings 2026-11-20 01:33:09 +00: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
Martin BallandClaude Opus 5.5 785e15c52e fwstub-1: headings and list items take AccessKit's zero-based level (Heading 1 is level 0, which UIA reports as 1; a first-level list item level 0), as WordCraft #3173; trial
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:25:29 +00:00
Martin Ball 576dcb3817 fw-rest: resolve the framework sync conflicts (up/next into area/ribbon-fw)
- Dialogs: ButtonPlace { Foot, Side, Body } beside the port's refusal notice and
  ChildDialog; every side_buttons caller (find, hyperlink, paragraph, list manager,
  form dialogs) takes button_place, keeping the port's held answers, close buttons
  and name check.
- Colour picker: upstream's fixed Full arrangement, CompareSwatch and warning module;
  the port's shown_model and tabbed Colors dialog kept (its buttons stand in the side
  column, the Full layout's in the picker's slot); the Compact layout shows the
  compare block beside its area when the host gives a compare colour; focus_on_open
  goes as upstream.
- Task bar: the grip is the bar's first member on one floating surface, for the task
  kind only; the selection kind and the close reason stay.
- Keymap: lookup_where's accept filter runs through upstream's winners().
- craft-gpu: upstream's provider-neutral crate, with the port's eframe start-up
  choices behind a startup feature (facade gpu-startup); duplicate facade row removed.
- Facade features, ATTRIBUTION, BMP density probe, margin story fit, theme icon-pack
  and dialog first-field trials: both sides kept; the clipboard presence code stays
  replaced by the port's offer modules.
2026-11-19 20:57:28 +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
Martin BallandClaude Opus 5.5 5404f0eb8b fwstub-1: a canvas control's label is never its tooltip (its rect is the canvas: PageRulers' MarginHandles showed "Rulers margins" wherever the pointer rested on the page); each margin edge part carries a tooltip naming its edge, as the old app's Left Margin (divider::declare returns the part); trial
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 20:28:26 +00:00
Martin BallandClaude Opus 5.5 99d40aba4d fwstub-2: a page view zoom by the wheel or a pinch anchors at the point the canvas zoomed about (CanvasSpace::zoom_anchor), not one rebuilt from the change of centre: the canvas's clamp keeps pages no wider than the view centred, so the rebuilt point was the middle of the view, in the gutter, and a reflow from two columns to three anchored page 2 and drew page 3, under the pointer, a row off; trial: Ctrl+wheel out from page 3 just right of the gutter through three reflows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 19:47:14 +00:00
Martin BallandClaude Opus 5.5 ae5ff42dfa fwstub-3: a page view zoom that does not ease draws its new layout, reflowed, through the anchored view in its own pass, so the next pass moves nothing; a zoom with the pointer in a gap keeps the place relative to the nearest page instead of scaling the offset; trial: Ctrl+wheel zoom out through a column gutter with rulers, every frame
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 17:41:34 +00:00
Martin BallandClaude Opus 5.5 a14084cba6 fwstub-3: the page view gives back the pictures of pages scrolled more than picture_reach (3 view heights, one width sideways, as WordCraft #811) from the view; PageView::picture_reach and PICTURE_REACH; story; trial
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 17:28:09 +00:00
Martin Ball a3a5d14e05 look-rest-3: Page Setup's Mirror margins (Facing Pages) at its section's start, outside the field group's label column, as WordCraft's; trial pins it and the wrapped grid kinds 2026-11-19 14:17:34 +00:00
Martin Ball 1f43e0f81d Merge branch 'red/look-chrome' into area/ribbon-fw 2026-11-19 13:38:02 +00:00
Martin Ball 8b700f4368 look-dialogs-a: setup.rs imports in order 2026-11-19 13:34:26 +00:00
Martin Ball 9d40eb184c look-dialogs-a: PageSetupDialog lays out as WordCraft's Page Setup: framed section boxes, margins, paper sides and grid counts two to a line, orientation and grid kinds in a row, Paper under Pages, section direction and vertical alignment in the Document Grid box, WordCraft's grid wording; trial and story 2026-11-19 13:31:59 +00:00
Martin BallandClaude Opus 5.5 738d21ba8e look-chrome: rulers paint ticks only over their extent; column lighter than margins
TextRuler::paint_ticks drops the tick rule's extra labelled step beyond each
end where the ruler is cut to an extent (a page's x range), so no ticks show
past the page. TextRuler and VerticalRuler fill the column with surface.sunken
and the margins with surface.canvas: the margins were the lighter part
(surface.sunken is #fff in ArtCraft light), the reverse of a word processor's
ruler. Trials a_ruler_cut_to_an_extent_paints_no_tick_past_it and
the_ruler_column_is_lighter_than_its_margins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:31:44 +00:00
aiongg 52c1f953ea craft-ui: env word sets, Units, formats and the host key memoized views by generation
A word set written by words! keeps the generation of the Words it was localized in and keys by it. Format, DateFormat
and Host get a generation per instance built (clones keep it), and Units keys by its format, words and point size.
The scope key and the host's word cache use these generations, not pointers. Checks that captured env words, units
or other locals take them as check_with inputs (page range, path field, print preview and font picker stories).
2026-11-19 13:31:20 +00:00
FredApps 938d170b87 Keep library trials available without a UI suite and preserve the generator API 2026-11-19 14:11:23 +01:00
FredApps b04d18a735 Select UI suite items through explicit registries 2026-11-19 12:20:08 +01:00
FredApps f8dddb2a55 Split UI test kit from story suite 2026-11-19 09:25:07 +01:00
Martin Ball 1028c0724b fu-canvas2: page view reports its resident page pictures (PageViewOutput::resident_pictures) 2026-11-18 23:35:36 +00:00
Martin Ball e85250bf61 Merge branch 'red/fu-chrome' into area/ribbon-fw 2026-11-18 22:53:47 +00:00
Martin Ball 477bc5f6d0 Merge branch 'red/fu-canvas' into area/ribbon-fw 2026-11-18 22:53:47 +00:00
Martin Ball 0bc621b93f fu-canvas: app batch 1 rulings (S-L233, S-L236, S-L238, S-L243, S-L244, S-L247) 2026-11-18 22:47:02 +00:00
Martin Ball 85695c0376 base-margins: show the page's corner in the margin handles story so its edges are on stage; remove DIAG lines 2026-11-18 22:40:06 +00:00
Martin BallandClaude Opus 5.5 05f2de14a6 fu-chrome: app batch 1 rulings (S-L267, S-L271, S-L330)
ListRow label_spans: the label drawn from styled spans, the match in the
highlight look, with a story and a trial. AccessBuilder::image: a placed
picture's image node with screen bounds; link sub-nodes carry their URL.
AccessTree::level_of and url_of. WindowHost::monitor_of, with scale_of
rewritten over it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 22:39:41 +00:00
Martin Ball ca278cf6d5 dialogs-w6: the page setup grid trial runs in a room that shows every section (the body scrolls, so grid rows sat below its view); DIAG prints removed 2026-11-18 18:58:56 +00:00
Martin Ball 9fd06ac73f rd-dialogs-w6: red round 5 fix (lead commit) 2026-11-18 18:57:04 +00:00
Martin Ball 7965d7a309 rd-dialogs-w6: red round 4 fix (lead commit) 2026-11-18 18:54:18 +00:00
Martin Ball 885cca4068 DIAG: why a held Page Setup OK files nothing 2026-11-18 18:47:07 +00:00
Martin Ball 034b736956 rd-dialogs-w6: red round 2 fix (lead commit) 2026-11-18 18:43:52 +00:00
Martin Ball aac27a5ddf pages: DIAG prints for the Page Setup grid kind pick 2026-11-18 18:33:58 +00:00
Martin Ball 5fd18885f9 dialogs-w6: net change of 2 commits
- dialogs-w6: written from its sheet
- dialogs-w6: review fixes (review-1)
2026-11-18 18:18:25 +00:00
Martin Ball 57830ecc11 rc-canvas-w1: red round 3 fix (canvas-run-3-fw) 2026-11-18 15:13:45 +00:00
Martin Ball 09238e21e6 Merge branch 'red/rc-canvas-w5' into area/canvas-fw 2026-11-18 15:06:21 +00:00
Martin Ball 33ed2e5bc9 rc-canvas-w5: red round 2 fix (canvas-run-2-fw) 2026-11-18 15:06:21 +00:00
Martin Ball 0b92344ae6 DIAG: label activation scope nodes and margin edge press phases 2026-11-18 14:53:57 +00:00
Martin Ball 976886d62d Merge branch 'red/rc-canvas-w5' into area/canvas-fw 2026-11-18 14:44:12 +00:00
Martin Ball 14bb90a109 DIAG prints: NumberField label click and MarginHandles drag in the suite 2026-11-18 14:37:48 +00:00
Martin Ball c2209ed20a pages views trials: show the reading view over the whole room, and find the page-turn row's Next button by the row it is in 2026-11-18 14:31:56 +00:00