Commit Graph
139 Commits
Author SHA1 Message Date
aiongg d40340cd42 text: the editor's I-beam request in its own function (cognitive complexity) 2026-11-22 05:55:54 +00:00
aiongg e49f8de1ea text: show the editor's I-beam only over its text and during its own press
The text editor requested the I-beam every pass of an open session, wherever
the pointer was. At hover priority it beat the canvas tool's cursor and showed
over panels, the options bar and the rest of the UI. It now asks only while its
press is not idle: the pointer is over the editor or its own press is held.
2026-11-22 05:48:54 +00:00
aiongg e826abef73 focus: a leaf can open a focus scope; the canvas text editor returns the focus to the canvas
Component::FOCUS_SCOPE gives a leaf the scope ContainerProps::focus gives a container, through the leaf
shape's focus hook. TextEditor opens a scope that restores (FocusPolicy::TAB_LAYER), so a session that
ends hands the focus back to the stop it came from, the canvas, instead of the stop before the editor
(the rulers' corner, whose arrows moved the zero point after a commit; photocraft#15555). Regenerates
docs/contract-api.md.
2026-11-21 18:49:26 +00: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
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 1b62c5687d Preset sources: the remaining framework callers, the popover replay trial and the preset count trials
ParamRows and ParamDialog take a PresetSource for their pattern rows (a hosted dialog's build gives one over owned
inputs); the export and PDF export dialogs, the swatch list (swatch_source, thumbs from the drawn colours), the
gradient palette and Gradient Map picker, the pattern fill editor, the text style picker (style_source) and the Layer
Style dialog (patterns, style presets, contour_source) build their presets from sources. Their painters are fns:
RampSampler, SwatchPainter, ContourSampler. Key types and the model types they are built from are memo props.

A memoized view inside an open popover replays while nothing changes; an open preset picker runs no list row while
nothing changes; a Size drag in the Brush Preset picker runs its head and replays the list.

The Swatches panel's rows stay public as `swatch_rows(groups, words)`, which the source's rows fn calls.
2026-11-21 03:20:44 +00:00
aiongg 4201696e6b Merge pull request #2742 from aiongg/office-ruler
Text ruler: the tab selector shows in the corner its host gives
2026-11-20 21:26:32 -05:00
aiongg 0ea84419cd Text ruler: the tab selector shows in the corner its host gives
PageRulers handed the text ruler the canvas's top strip, which starts after the
canvas corner, and the ruler cut its own corner square out of that strip, so the
selector sat one strip depth right of the corner, over the horizontal ruler, and
the corner stayed blank. The host now gives the corner (TextRuler::corner):
Rulers::strips returns it beside the strips, and PageRulers shows the ruler over
the top strip and the corner. The corner follows the host in either direction.

The selector's box is the icon size with the theme's small rounding, in the
column's colour with the state layer under the pointer; the corner continues the
strip round it; the glyph is centred by its own bounds.
2026-11-21 01:34:06 +00:00
aiongg 3eebedfcff Component sets: the productivity set 2026-11-21 01:19:14 +00:00
aiongg baa3a2f258 Merge remote-tracking branch 'upstream/next' into ruler-look
# Conflicts:
#	crates/ui-contract/src/testing/mod.rs
2026-11-20 20:31:23 +00:00
aiongg b5edc283c0 Merge remote-tracking branch 'upstream/next' into ruler-look
# Conflicts:
#	crates/text/src/ui/ruler/stories.rs
#	crates/ui-canvas/src/canvas/rulers/stories.rs
#	crates/ui-gallery/src/chrome/card.rs
#	crates/ui-gallery/src/chrome/variants.rs
#	docs/contract-api.md
2026-11-20 19:21: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
aiongg 3f9adf355d Rulers: an edge and a centred face, picked by the component set
`RulerFace { Edge, Centred }` sits beside `TickEdge`, and
`RulerFace::of(set)` maps the creative set to Edge and the office set to
Centred. The shared tick painter takes the face. Centred draws a bar
inset in the strip by `space.gap.tight`, centres the marks on it, and
puts a number in place of each whole-unit mark. No mark runs under a
number (`RulerFace::beside_numbers`), so a whole-unit tick shows only
where its number is dropped.

TextRuler, VerticalRuler and canvas Rulers take an optional `face` prop
in their style key. Unset, the style resolves it from the scope's set.
PageRulers passes its face to both of its rulers, and the timeline ruler
keeps the edge face.

Under Centred:
- the strip is on the chrome surface and the bar carries the margin
  shade and the text column on the well;
- numbers show only over the text area and are dropped where a marker
  stands;
- canvas Rulers shade their margin bands as the text ruler does.

Edge is the look the rulers had before. Each ruler gets an edge and a
centred story.
2026-11-20 18:23:17 +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 b968010a80 Merge #2382: Keep Character fields readable in narrow sidebars 2026-11-20 12:51:35 +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
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 717ff260cb stories: format 2026-11-20 09:50:49 +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
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 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
FredApps 7a98690f4a Merge remote-tracking branch 'origin/next' into publish/registry-2332
# Conflicts:
#	crates/design-lint/src/contract/mod.rs
#	crates/ui-contract/tests/it/contract/mod.rs
2026-11-19 15:18:42 +01: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
FredApps 938d170b87 Keep library trials available without a UI suite and preserve the generator API 2026-11-19 14:11:23 +01:00
haranishi 97800568cc fix(text): keep Character fields readable in narrow panels 2026-11-19 21:31:43 +09: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
aiongg fc8d1205ab Use const for immutable UI tables (#2336) 2026-11-19 06:40:20 +00:00
Martin Ball a483b74c92 Merge branch 'red/fu-dialogs' 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 59d39a2049 fu-dialogs: app batch 1 rulings (S-L285, S-L289, S-L301, S-L310, S-L312)
FormCx::accept files or closes as the OK press; FormButtons::Close leaves out OK;
ListManager::name_box binds the name box; FindReplaceDialog::show_tab and
set_go_to_kinds, and options() opens Search Options; ParagraphFormat::contextual_spacing.
2026-11-18 22:43:21 +00:00
Martin Ball 9597f1204b Tabs, Paragraph and Columns dialogs: a held OK files its answer when picked (a stays-open button reports a pick, not a close); the Tabs result clears the positions its moved stops left 2026-11-18 18:32:30 +00:00
Martin Ball c5304b7657 dialogs-w4: the hyperlink refusal closure borrows its refusal (dg.F1 refusal is FnMut, S-L192) 2026-11-18 18:21:19 +00:00
Martin Ball 2f3820858e dialogs-w4: net change of 3 commits
- dialogs-w4: written from its sheet
- dialogs-w4: repair 1
- dialogs-w4: review fixes (review-1)
2026-11-18 18:18:25 +00:00
Martin Ball 0e7f1d1643 dialogs-w3: net change of 3 commits
- dialogs-w3: written from its sheet
- dialogs-w3: finished by an agent
- dialogs-w3: review fixes (review-1)
2026-11-18 18:18:25 +00:00
Martin Ball 5eb840e771 rc-canvas-w6: red round 1 fix (canvas-run-1-fw) 2026-11-18 14:44:12 +00:00
Martin Ball ebbc091114 canvas-w6: take the stage rect before the strips borrow ui 2026-11-18 14:06:41 +00:00
Martin Ball a6926b4881 canvas-w6: net change of 3 commits
- canvas-w6: finished by an agent
- canvas-w6: review fixes (review-1)
- canvas-w6: review fixes (review-1b)
2026-11-18 14:03:48 +00:00
Martin Ball ee52d2283e Contract stubs: craft-text craft-pages craft-gpu craft-ui-gallery craft 2026-11-18 08:50:46 +00:00
aiongg 7b745c75bf Colour picker: Photoshop's fixed Full arrangement, dialog buttons in a body slot
- FooterPlace::Body and FooterSlot: a container's footer drawn at the cell its body keeps; the footer step still
  runs it, so roles, platform order, Enter, Escape and Alt-Reset stay the dialog's. Dialog::button_place(ButtonPlace
  { Foot, Side, Body }) replaces side_buttons(bool); every caller updated.
- Grid::fit(GridFit { Stack, Fixed }) and layout::empty_cell, with the grid_fixed story.
- ColorArea sizes by AreaShape { Plot, Square } from tokens, never from the room.
- CompareSwatch: one block, new over current, one edge, captions, warnings column from the block's top.
- ColorWarningChip arrangement enum (Stacked, Beside) replaces beside(bool); icon.sm chips.
- Full: area and strip over Only Web Colors and the screen-pick button; compare block and actions slot over two
  field groups in grids that never stack; '#' in the radio column, hex field across the channel cells. No wrap, no
  alpha row, no OKLCH column (OKLCH rows join group 2 with their radios); Only Web Colors always shown.
- Compact: width from the plot area and strip; hex row with the screen-pick button at its end.
- ColorPickerDialog puts its buttons in the picker's slot; color_picker_dialog story.
- Trials: Full arrangement across rooms, densities and themes; dialog proportions and button cell; compact width;
  body-placed dialog buttons and their keys.
2026-11-17 18:20:35 +00:00