Commit Graph
1733 Commits
Author SHA1 Message Date
aiongg 8a99049ed8 Layout: a row in a horizontally scrolling body shrinks its leaves to the view before the body scrolls
A bar's members past the view were cut by the scroll's clip; selects and
elidable text now narrow to their least first, as the old bars' selects
elided.
2026-11-12 14:32:40 +00:00
aiongg a6c428206b story-render: a card's rect is its grid row's, since CardEvents no longer carries it 2026-11-12 14:32:40 +00:00
aiongg 037df036e0 Gallery inspector: inspected regions, the Inspect panel and the overlay over the selected card
inspect::record shows a region and records, in real runs, every component shown in it (box, box inside its padding,
depth, and the access facts step 16 wrote, named by their labels as a screen reader reads them), the sensing core's
hit areas of those components at their least size in tree order, and the focus stops numbered in Tab order: every
member of a roving group, whatever the platform's Tab setting. Inside a region nodes are reported whether or not
AccessKit runs. The record is kept as a value: a reader shown earlier in the pass (inspect::recorded,
inspect::pointed) reruns the pass when the record changes. Recording is on in fixture frames and inside an open
region; FrameInput.inspect and the focus state's all_controls go.

InspectOverlay (display) draws a record as the old gallery inspector did, cut to the region: padding bands, hit
areas with small ones flagged, numbered focus badges, and a marquee on the element the list points at.

Row, Stack and Grid take indent(levels), a start padding of space.pad.regular per level, and hover(), which gives
the root Sense::HOVER so its response reports the pointer. Text takes italic().

While the Inspect panel is in front of the components workspace and no Variants view is open, the selected card of
the Overview or of the selected component's tab shows each story as an inspected region with the overlay over it.
The Inspect panel lists the Padding, Hit areas and Focus order switches, the flag note, one section per story with a
row per element (number, role, name, value, actions, state, "no label"), indented by depth, whose hover marks the
element on the card, and the declared facts as the last section.
2026-11-12 14:32:40 +00:00
aiongg 3f63b71b3a Collection keys: a command palette's arrows wrap at the ends
CollectionProps::arrows_wrap passes the navigation's wrap to the item step's moves; the
command palette's list turns it on.
2026-11-12 14:32:40 +00:00
aiongg 3ad4bdd55c Collection keys: arrows move the focus in tab strips and preset browsers
Where a collection's arrows leave the selection (arrows_select off), Enter selects the
lead before it activates it, as the setting promised. The tab strip and the preset
browser's list and grid turn arrows_select off: the arrows move the focus, and Space,
Enter or a click shows the tab or picks the preset.
2026-11-12 14:32:40 +00:00
aiongg 939a80c85a Collection keys: type-ahead is a collection setting, off for lists
CollectionProps::type_ahead decides whether typed letters move the lead; the key role
reads it instead of turning type-ahead on for every collection, so a focused list leaves
single-letter tool keys to the app. Popup option lists, the hyperlink place list and the
gallery's component and token lists turn it on. The suite's type-ahead case runs where
the focused stop takes type-ahead.
2026-11-12 14:32:39 +00:00
aiongg ce5987d114 Collection keys: Enter activates and F2 renames on every platform
The macOS rows that made Enter rename the lead and Cmd+Down activate it go.
2026-11-12 14:32:39 +00:00
aiongg f74d963e8f Collection keys: Cmd+] and Cmd+[ move the selected items, Shift to the ends
The stacking keys replace Alt+Up and Alt+Down as the reorder keys of every reorderable
collection and section stack, from one table in the key table. ] moves toward the front:
the start of a vertical order, later in a horizontal strip. The keys move the selection
as a block (the lead alone when it is not selected), with the tree rule for into_groups;
the single-row nudge helpers go. Alt+Down is Open everywhere.
2026-11-12 14:32:39 +00:00
aiongg e64dd901d9 Tooltips: a control that paints no label shows its own label, and the hints and names the old controls showed
A control whose own label is not painted (an icon, a glyph label, a caption-less tile, a chip, the stroke button) shows that label as its tooltip inside a field too; one named only by its field label shows none. Restores the old tooltips of the ReferencePoint points, the list disclosure, the PeopleBar avatars, the recent files, Distribute Rows Evenly, a page that failed to render, the font class mark (ListRow::trailing_named) and the Character hints (SideLabel::tooltip).
2026-11-12 14:32:39 +00:00
aiongg d5074272e3 Reset dot: a ring at the default, the state layer and a tooltip
The label's reset mark shows a ring in text.disabled while the value is at its reset value, so the slot shows before
anything changes, and the filled dot while it differs. The dot part takes the state layer and the tooltip "Reset to
default" (common.resetToDefault).
2026-11-12 14:32:39 +00:00
aiongg 3a4cf8a8ba Muted ink for secondary glyphs and the menu bar's no-match line
VariantLook::muted: text.muted on a neutral outline or ghost button, the variant's text otherwise. SplitButton's
chevron reads it. The menu bar's "No matching commands" line is muted text.
2026-11-12 14:32:39 +00:00
aiongg c7716b5ea7 Surface kinds while on: a toggle button that is on sinks, the selected segment rises
on_surface draws a raised button pressed in while on; the selected segment takes the raised kind with its edge in
place of the flat one, so a bevelled theme shows the raised outline. Trials for the kinds, the field's inner line and
the dropdown fill.
2026-11-12 14:32:39 +00:00
aiongg 8b2e44fa98 State looks: one state layer, check indicator press and well, dropdown and field edges
- StyleCx::state_layer is the one hover and press fill; PartBuilder::state_layer declares a part whose look it is,
  and the paint step fills such parts under the component's paint (Rating stars, Breadcrumb crumbs, the reset dot).
  Button's local overlay goes.
- The paint step's surface shapes move into one function, which Draw::surface_look also paints for a part.
- Check box, radio and switch draw their well on the sunken surface (the bevel in bevelled themes), take the press
  fill while pressed and the accent's pressed shade while on and pressed.
- StyleCx::dropdown: the closed box of Select, TreePicker, PresetPicker and the stroke button takes the hover fill
  under the pointer and while open.
- A focused invalid field keeps its focus edge and draws the failure colour as a line inside it (SurfaceLook::inner).
- The selected segment keeps hover and press looks; the disclosure glyph lights under the pointer; the EdgePicker's
  hovered line widens in its own colour; the chip body wears an outline badge, so it takes the hover fill.
- SurfaceLook::kind_on: the kind a look takes while on.
2026-11-12 14:32:39 +00:00
aiongg 353579afd3 Docking: a new float opens at a height fitted to its content
A panel or group floated out of the dock opens at its docked width and at
the height its group measures at in a floating window's room, at most
size.float.height. Content that fills its body opens at that height.

- Proposal::Size measures a component as it is shown at a rect of that
  size, with no share of the parent body's room.
- drag::amend lets a host change a drag's payload in the frame the drag
  started. The dock area measures the dragged panel there and puts the
  size on PanelDrag::source / GroupDrag::source. The Float command and a
  tab torn out of the window measure where they run.
- DockGroupOutput::drag_started also reports tab drags.
- FloatSpace::size_of caps a panel's, group's or column's height at the
  default float height. FloatSpace::record and its contents are gone.
2026-11-12 14:32:39 +00:00
aiongg 77daec01a6 Adjustment sliders: a wheel notch moves at least 0.01 2026-11-12 14:32:39 +00:00
aiongg 306fef9a38 Value controls take the wheel only while focused or armed
A value control takes the wheel only while focused or armed, on the axes
it senses. WheelScope replaces the wheel_gated scope: Free lets the
sliders of an adjustment dialog take the wheel without focus, and Gated
(the Overview card) gates every taker and wins over a Free inside it.
Slider senses the vertical wheel only; RangeSlider and ThumbRow sense no
wheel bits; PointPicker and AngleDial sense both scroll axes.
2026-11-12 14:32:39 +00:00
aiongg 264ad8cc53 Native windows: the macOS title-row move starts on the press
The tracked macOS move sent StartMove a pass after the pointer passed the
click distance. winit hands performWindowDragWithEvent the event AppKit is
handling when the command runs, and in that later pass it is often not the
press, or none, so the drag took only some of the time.

- StartMove goes out in the band's Down pass where the OS tracks moves. The
  move is reported (Begin, Update, Commit) once the system pointer has passed
  the click distance; a click on the row moves and docks nothing.
- A window whose move the app runs keeps AppKit's own movable flag: the band
  writes nothing for it and the end hook leaves it alone. AppKit moves such a
  window for the hand-off and resizes it from its edges only while it is
  movable.
2026-11-12 14:32:39 +00:00
aiongg 52cc593d40 Native windows: one writer of a window's place at a time
A viewport window's builder carried its caller's rect every pass, and egui sent
each change of it to the window. The caller's rect follows the window's own
reports a pass late (the dock model records the OS place, a saved window reads
its store), so every OS move or resize came back as a command of the place one
pass old. While AppKit moved or live-resized a window the two writers set it to
two places in turn, without end: the title-row drag jittered, and a live resize
stretched the content with black edges.

- The builder carries the place only until the window opens.
- Each window keeps its known place: what its own pass last saw, or what act
  last commanded. A caller's place goes out only where it differs from the
  known place, never while a move gesture runs or the window is minimized,
  maximized or full screen. Placements are recorded from the known place.
- A dock window is fitted to the monitors when it opens; an open one stays at
  the placement the model recorded.
- The windows fixture sends a child the changes of its builder as commands,
  as eframe does, so trials see what an integration would send.
2026-11-12 14:32:39 +00:00
aiongg 6cf7952263 docs/development.md: the renderer's dependency lines in cl doctor 2026-11-12 14:32:39 +00:00
aiongg 867971d0c8 One build of the facade for renders and the gallery; cl reports a second build per crate and mode
story-render asked craft-ui for snapshot, which the runtime's testing already
includes, so every render built its own facade. cl doctor checks the
renderer's lines against the gallery's, and the new-build report keeps
check-only builds apart from full ones.
2026-11-12 14:32:39 +00:00
aiongg f49cd1742a docs/development.md: the old gallery for frame-time comparisons builds with the gallery profile's settings 2026-11-12 14:32:39 +00:00
aiongg bc1a92fcd9 docs/development.md: measuring frame time on the gallery profile, in a measuring-only worktree 2026-11-12 14:32:39 +00:00
aiongg 7e9768f07b Dev profile: craft-ui-contract at opt-level 0
An edit to the runtime's 65k lines spent 35-90 s in opt-level 1 codegen before
its test binary linked. The hot pipeline is generic and compiles in the
dependants anyway; theme, behavior and proof stay at opt-level 1.
2026-11-12 14:32:39 +00:00
aiongg 7410239246 tools/cl: every command resolves features through feature-root, one framework build per target dir
cargo unifies features only over the packages a command selects, so a framework
crate's tests, a domain crate's tests, the gallery and the story renderer each
built their own copy of the framework and of wgpu. feature-root carries the
gallery's dependencies with every domain crate; cl selects it beside every
command's package and names the crate's own targets, so nothing of it builds.
The per-crate feature anchors go; cl check also checks a crate's bins.
2026-11-12 14:32:39 +00:00
aiongg 72a8204117 Gallery: the Foundations level with Colours and EditPolicy
Colours shows every semantic colour role of the card's theme by group, as a
swatch, its path and its hex value. EditPolicy binds a slider and a text
field to one of two documents under a write-through or on-commit policy,
logs their edit events, and its Undo and Switch document buttons cancel a
running gesture through cancel_all. Types of the gallery's foundations
module are Foundations, the first level listed.
2026-11-12 14:32:39 +00:00
aiongg 543ab4236e Overview: selecting a component glides its card to the top
Lazy::reveal asks its scroll body to glide until the child starts at the
view's start, run or not; the body follows the child's place on the motion
service's follow curve and a move of its own ends the glide. It replaces
Lazy::keep. The gallery's Overview passes the selected card's reveal in the
pass its cards follow the selection, in place of egui's scroll_to_rect,
which no scroll body reads.
2026-11-12 14:32:39 +00:00
aiongg 613b6a82c1 Story canvas: stories draw their old content through StoryPicture
StoryPicture is a story picture whose pixels are a function of the document point, and StoryShape
fills and outlines shapes on it; show_quad takes any picture. The stories show what the old gallery
drew under their control again:
- CropOverlay: the crop tool's landscape under ratio_held, straighten_armed (horizon at 6 degrees)
  and image_mode.
- GradientOverlay: the gradient itself in 64 x 40 cells, on the old line with the old four stops.
- HoverOutline: the light picture with the hovered object in the accent.
- ConnectorHandles, CornerWidgets, RulerOverlay, TransformOverlay: the boxes, rounded shapes,
  measured object and transformed layer in the accent.
- TransformBox and PerspectiveCropQuad: the layer and page with their dark grey edge.
- ColorSamplerMarks: the hue and brightness picture the samplers sit on.
- WideAngleWorkspace and ConstraintLines: the generated picture in place of flat grey.
SmartGuides, RasterDisplay and PixelGrid stories draw their pictures through StoryPicture;
FlatPicture is gone.
2026-11-12 14:32:39 +00:00
aiongg 9c7f50d40c Story canvas: the story document's ground is document pixels
Every story document shows the old gallery's ground: white with grey squares of 40 document pixels,
composed under the story's picture, so the squares scale and turn with the view. The screen-fixed
transparency grid and Checker::PREFERENCE_DEFAULT no longer draw story documents. Pasteboard and
RotateView stories show the story document again.
2026-11-12 14:32:39 +00:00
aiongg c19abe8663 Dock a native window by dragging its title row
A floating dock group in its own OS window now moves through a window move
gesture the app runs, which reports Begin, Update, Commit and Cancel like a
layer's move, so the dock marks the target under the pointer and docks the
whole window on release.

- macOS (Caps::OS_MOVES_TRACKED): the OS moves the window (StartMove), and the
  app follows the system pointer, button and Cmd through SystemWindows, the
  running platform's WindowSystem in craft-window. The hand-off ends when the
  system reports the button up.
- X11 and Windows: the app moves the window with SetOuterPosition so the
  pressed point stays under the pointer; Escape puts it back.
- A drag started by a container shown in its own OS window follows that
  window's pointer, not its parent's.
- The runtime's end hook sets NSWindow.movable for every window; a window
  whose move the app runs is never moved by AppKit from its band.
2026-11-12 14:32:39 +00:00
aiongg 97d56c2964 Floats open at their docked size, and the floating drag bar shows no title
A native float's OS window opens at its placed rect; the measured size applies
only to a window sized by its content. A tab, group or window drag carries the
size it left where it started, and a float command the size of the group it
runs from: the float takes it (with the drag bar above), after a panel's own
float size and before the default. FloatSpace's never-filled group and column
records go.

A floating window's drag bar carries no title: the tabs below name the panels.
2026-11-12 14:32:39 +00:00
aiongg e9c1a3a776 Popup lists: one popup padding and the listbox option rows
Every popup pads its content by POPUP_PAD (space.pad.control, the old menu
margin): OverlayUi::show insets its body, and PopupList, Popover and Menu
take it as their pad; Menu::inline has no pad of its own. Option rows of a
listbox have their own form: rounded, the chosen row in state.selected with
an accent.text outline, the lead row in state.hover with a line.control_edge
outline. ListRow::check gives a value list's rows a mark column with the
check glyph on the chosen one; Select, ComboBox, the number presets, the
tree picker and the font picker set it.
2026-11-12 14:32:39 +00:00
aiongg cf21454e3f story-render: the shell spans the gallery's window, the story or card a column in it
A dialog or workspace opens over the shell's view as over a gallery view, so it gets the window's room, not the
card's width.
2026-11-12 14:32:39 +00:00
aiongg f494e40237 story-render --card: render whole Overview cards through the gallery's own card code
overview_card builds an Overview card's Spec from the catalog alone and Spec::card turns it into the Card the
Overview shows; the Overview uses both. story-render --card renders one selected card per story group, the given
width wide, in a one-column grid row in a vertical scroll as the Overview holds its cards, inside the one shell the
bin runs everything in, with its dialogs open. --scale sets the images' pixels per point (1 matches the old gallery's
shots) and stories.tsv lists it. cl render passes both through.
2026-11-12 14:32:39 +00:00
aiongg 31948854ad A native dock window's own title row is its only title bar
A tool window's frame comes from policy::tool_frame, whatever frame the main
window has: Inset with the traffic lights hidden on macOS, undecorated with no
caption buttons elsewhere. The installed decision applies to the other kinds.
2026-11-12 14:32:39 +00:00
aiongg 0799bc7588 Open floating dock windows as OS windows where the host reports window positions
DockConfig::native_windows is on by default. A float opens native where the
window host opens OS windows and reports their positions (ShellInfo::window_positions,
WindowHost::positions_reported: not on Wayland); a float never shown native opens
over its place in the main window. AppSpec::new takes the backend winit opens on.

The OS close of a native float is its Close action, taken when every panel in the
window may close; the group's open state belongs to the dock model. The gallery's
mock editor keeps its floats inside its preview.
2026-11-12 14:32:39 +00:00
aiongg 100843bcf4 Popups shown from an overlay hook sit on the popup surface
OverlayUi::show paints the Popup surface (fill, edge, elevation.popup
shadow) under its body, through the same window-clipped surface slot the
container step uses (SurfaceSlot). Select, ComboBox, completions, the
number field and date popups and the domain pickers drew their bodies
with no fill or shadow. Menu::inline no longer carries its own surface,
so the popup_in_layer clip special case goes.
2026-11-12 14:32:39 +00:00
aiongg 6c748d2a28 Pin the gallery's Overview tab
The Overview stays where the layout puts it: it neither moves, floats nor
closes. It still takes tabs, so component tabs open beside it.
2026-11-12 14:32:39 +00:00
aiongg 47d26b9813 Keep layer and window mounts out of their parent's fill share
A container on a layer, a full-window layer or an OS window takes no room in
its parent's flow, but step 5 sized it in the parent's Ui and counted it among
the children that share a Stack or Row body's room. A dock area's floating
window was a second fill child of the dock root, so the docked tree took half
the window's height.
2026-11-12 14:32:39 +00:00
aiongg 624b4f5a1d ui-contract: pass facts read once per run
PassFacts carries the frame number beside the viewport, pass number and
clock; the begin hook reads them once. Moment::of, pass::frame_nr and
register_owner read the running pass's facts instead of egui's counters and
the context's viewport, and frame::facts gives the same facts outside a pass.
The measuring-run depth is a pass-local field instead of a context-data slot,
so measure::active takes no data lock.
2026-11-12 14:32:39 +00:00
aiongg dd0666065e ui-contract: pass-local service state
The services the pipeline touches on every run live in one PassState with a
RefCell field each. The begin hook of a context's outermost pass on a thread
moves it out of context data into the thread; the end hook moves it back.
Inside a pass a service access is a borrow of a plain field: no TypeId map
probe, no Arc handle, no mutex. Access outside a pass holds the state for
that one call.

PerViewport types say where their records live through the Stored trait:
a context service by default, a PassState field for the pass-local ones.

The thread-local handle map (HANDLES, ContextToken, open_handles) goes;
Service::run is a context-data lookup for the services that stay there.
A testing counter of those lookups backs a trial: a settled pass of forty
leaves makes as many lookups as one of ten.
2026-11-12 14:32:39 +00:00
aiongg c6b9f48bc5 A story runs in its view's shell, in one body
The card runs each story in one Stack inside the view's embedded shell,
without a shell of its own per story. The shell counts the dialogs shown
in a pass (ShellCx::dialogs_shown), and the card reads the count around
its story, so a story's dialog opens over the view. AppShellOutput loses
its dialog flag, which only the card read. story-render shows a story in
an embedded shell of its own.

testing::last_pass_runs counts a pass's runs by component type; the
Overview trial asserts that the shell regions don't grow with the
stories in view.
2026-11-12 14:32:39 +00:00
aiongg df2b2aa490 contract: one read and one props clone per body run, props compared by value, shared inherited env
- pass_extent builds the measuring run's hooks from the run's own read instead of reading again on a peek stage;
  the measuring run of a real pass now sees the kept scroll extent and anchor, as a sizing pass's does.
- BodyHooks holds the container's props in one Arc for the run; the measure key keeps that Arc and compares the
  fields a body's measure reads (ContainerProps::measures_like), replacing the Debug-text fingerprint. Glyph is Sync
  so the props can live in layout memory.
- Scoped keeps the per-scope fields and shares the rarely changed ones (tokens, platform, words, formats, app
  values, commands) in an Arc<Inherited> read through Deref; writers go through inherited_mut/extend_values.
  ItemFacts sits behind an Arc.
- The line env derives only when it changes something; run_body, run_body_measured and run_sharing take the body's
  env instead of looking it up again.
2026-11-12 14:32:39 +00:00
aiongg 635c732488 Fewer allocations per run: borrowed part declarations, inline samples and part lists, reused arena buffers
Step 8 borrows the declared parts instead of copying them: Decls keeps the
sensing core's PartDecls beside their extras. sense_root records its shapes
from an iterator and moves its widget list into the arena. The arena swaps
and clears its per-pass lists. Member decls and shapes, read samples and the
value and reset part lists sit inline. A real read takes no copy of the open
measuring runs.

Adds a trial: a control whose size follows its value reruns the frame after
its own edit.
2026-11-12 14:32:39 +00:00
aiongg d4da861dad Check a kept transcript's leaf calls against the leaf's own answers
A real run under a kept transcript compared each kept measure call by asking
the component again, though step 5 had just asked it the same call. The check
now takes the calls the leaf's run made: a kept call at the same proposal and
room that read no inputs compares with that answer, and only other calls are
asked again. The check reads the transcript's calls in place instead of
cloning them and their inputs per leaf, and a leaf hands its ideal and minimum
calls over in one leaf_call.
2026-11-12 14:32:39 +00:00
aiongg cb33c14ff2 cl lets cargo fmt --all through: formatting builds nothing 2026-11-12 14:32:39 +00:00
aiongg 65f67985fc Count trial: a settled memory stage records no slot again 2026-11-12 14:32:39 +00:00
aiongg 51c7fc3117 A component's shown copy, last drawn pass, last state and state tweens are one shown slot 2026-11-12 14:32:39 +00:00
aiongg 5835939df3 Memory write-back records only what the registry lacks 2026-11-12 14:32:39 +00:00
aiongg 89981c691f cl runs cargo through CL_LAUNCHER when set; the job-pool docs describe the setting, not one machine 2026-11-12 14:32:39 +00:00
aiongg ecd4eca834 docs(development): CI coverage per workflow, the ui gate's path filter, and every crate no workflow tests 2026-11-12 14:32:39 +00:00