Commit Graph
1705 Commits
Author SHA1 Message Date
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
aiongg dfb246665c craft and craft-theme READMEs: the library crates the facade reaches, the tools it leaves out, craft_ui::style as the egui bridge 2026-11-12 14:32:39 +00:00
aiongg 4b1f614ead README: a Craft framework section with the library crates, the facade, the tools and the framework docs 2026-11-12 14:32:39 +00:00
aiongg 6600443e92 design-lint README: the clone-baseline example names a path that exists 2026-11-12 14:32:39 +00:00
aiongg e2ae0d10ea docs(dialogs, docking, themes): name the library crate behind each craft_ui module 2026-11-12 14:32:39 +00:00
aiongg c49f9329d4 docs(authoring): which library crate a component goes in, the test executables of library and family crates, story groups and titles, cl commands 2026-11-12 14:32:39 +00:00
aiongg 8f4490ff99 docs(craft-framework): the split UI library, the egui fork, gates and landing as the code has them
- 3.1 to 3.4: the six library crates and the craft-ui facade, with a dependency
  diagram, the crate table and the craft-win32 unsafe exception; taxonomy covers
  every crate.
- 2.1 and 2.3: the gallery profile, cl and the story renderer.
- 3.6: layout memory's kept text; the scroll extent lives beside the offset.
- 3.7: the aiongg/egui pin, its 19 commits and what landing needs.
- 7.1: the step rule of closed list controls (Entry::stepped).
- 8.2: the gates that exist.
- 9.7 to 9.9: measured series size, landing rows without the pasted step rows,
  the facade and API map in place of deprecated aliases, aliases as a question.
- Appendix B: entries for craft-behavior, each library crate and craft-win32;
  where each concept lives.
2026-11-12 14:32:39 +00:00
aiongg afa3b3f6d7 docs(glossary): state where Lives in and Defined in point; drop the doc-test claim and DebugInspector 2026-11-12 14:32:39 +00:00
aiongg 37bb6cc4ec Comments: the story renderer shows StoryBody; drop the gallery manifest's component-sheet notes 2026-11-12 14:32:38 +00:00
aiongg 6d5ba693f7 Doc comments: drop DebugInspector and DragBadge, which no crate defines 2026-11-12 14:32:38 +00:00
aiongg 5040dd0879 docs: regenerate contract-api.md from the split library crates 2026-11-12 14:32:38 +00:00
aiongg 57d3c88b0a contract-api: read the shared modules from craft-ui-contract and craft-ui-widgets
The generator parsed crates/ui/src/lib.rs, which is a re-export facade over
the six library crates, so it found none of the shared modules. It parses
craft-ui-contract as craft_ui and craft-ui-widgets' layout_components, and
reads a path into any library crate as the craft_ui path the facade gives it.
2026-11-12 14:32:38 +00:00
aiongg 9bc147affd Level tables key every type of the library under craft_ui
The surface and story layout tables name the library's types under
craft_ui, but since the split a type's crate target is the crate that
declares it, so no library row matched: Slider's value groups lost their
form rows and every library type sat on the panel surface. The table key
reads a type of any library crate as craft_ui, as the level rows already
read a library module path. The stale-row check runs in the craft-ui
facade's trials, where every crate of the library is linked, and checks
the library's rows whenever one of its crates is.
2026-11-12 14:32:38 +00:00
aiongg 16b43d84a5 A kept measurement serves the value text its run found
A record of layout memory holds a measure or a text. emit_text hands a
text forward through the same transcript as emit_record: a body that
takes its kept measurement gives the text its measuring run found, where
the content that found it does not run, and a real run's text other than
the kept one shows the transcript changed. The gallery card emits each
story's value text in its shell and the form rows read it beside the
story, so a settled Slider card runs one pass per frame.
2026-11-12 14:32:38 +00:00
aiongg 9305448598 Gallery cards run each story once: an embedded shell as tall as its content
AppShell::content_height sizes an embedded shell from its body's measure,
which its body keeps while its inputs hold. The body pane is a pane at its
rect as tall as its content, taking its height in the scope's flow. The
gallery card drops its two measure_in runs and its detached shell record;
the value text and the dialog record come from the shell's real run, and a
story whose shell showed a dialog gets the card's whole room.
2026-11-12 14:32:38 +00:00
aiongg 64e3e6f4e5 A scroll body keeps its content extent with its offset
The extent that bounds a body's offset lived in shown memory (`BodyView`),
which is evicted soon after a body stops showing, while the offset and its
anchor live in session memory (`ScrollState`). A body shown again after a
longer hide clamped its kept offset against an extent of 0 and came back
at the top. The extent now lives in `ScrollState` beside the offset, with
the same lifetime; `BodyView` keeps the view rect.

The anchor rule runs only in the run that lays the content out for the
view: a measure run places no Lazy children, so it would clear the anchor.
2026-11-12 14:32:38 +00:00
aiongg e872978edc Overview first show runs only the cards in view
A Lazy child no pass showed yet takes the estimate its app gives
(`Lazy::new(key, estimate)`): that long along the axes its scroll area
scrolls, nothing across them, as a collection places rows it never built
by its item layout's estimate. The never-shown "always run" branch of
`lazy::decide` is gone. Gallery cards estimate their height from their
story rows.

A scroll position the framework holds is also named by content: the
first child at or after the view's start (`lazy::Anchor`, kept with the
offset in `ScrollState` and a collection's `Scrolled`). When extents
before it change, the offset follows the child and the pass runs again,
so the content in view does not move. Bound offsets keep no anchor.

Entries of the out-of-view store record their scroll area. A frame drops
only the entries an area that ran did not reach, so a hidden area (a tab
switched away) keeps its children's extents.

Trials: first show, shown again after a hide, content in view stays when
an estimate above it resolves, collection rows stay when a row above them
changes height; the gallery trial asserts each level first runs the cards
in view.
2026-11-12 14:32:38 +00:00
aiongg 0cb5bc3db9 cl test works for every framework crate: the runtime's testing includes snapshot; cl doctor checks that every canonical set resolves
cl test failed for craft-ui-panels, canvas, patterns and shell: their canonical set named craft-ui-contract/snapshot, and cargo lets a command name a feature only of a direct dependency, which the runtime is not for crates above widgets. craft-ui-contract's testing now includes snapshot (the resolved feature set of the runtime in a test build is the same three features as before, so no unit changes), and the canonical sets drop the snapshot entries. cl doctor resolves every crate's canonical set against cargo metadata, with no build: a plain feature must be the crate's own, a dep/feature must name a direct dependency and a feature it has. docs/development.md states what CI covers (ui.yml for the seven ui crates, theme.yml, docs.yml, path-filtered workflows for some leaf crates) and what it does not (the domain crates on the framework, the gallery, the renderer, the umbrella crate, any workspace-wide build).
2026-11-12 14:32:38 +00:00
aiongg 78193f81b6 Activation suite: a step is the one the control took, declared before the key
An arrow's step is read from the focused node's number: Increment when it rose,
Decrement when it fell, and the arrow's own direction only when the node reports no
number on both sides of the key. The step counts only when it was declared before
the key, the state an AccessKit user acts from. A Select holding its first entry
(story select_first) steps forward on ArrowDown, which is its Increment.
2026-11-12 14:32:38 +00:00
aiongg c09e0a6798 Entries a step skips: Entry::stepped, one step rule for Select and ComboBox
A step over a closed control stops on the enabled, stepped entries only. A value on
none of them (mixed, or an entry only the open list offers) has no place: it reports
no number, so both steps are offered, and a step forward lands on the first stop and
a step back on the last. Select and ComboBox step with the shared step_stops and
step_stop.

LutPicker marks Load 3D LUT…, the folder files and the loaded LUT as not stepped, in
place of its filter on step events. The loaded LUT then offers both steps, which the
craft-color activation suite asks for.
2026-11-12 14:32:38 +00:00
aiongg 3a0736c569 Docs: the framework, development workflow, design notes and migration records 2026-11-12 14:32:38 +00:00
aiongg 21e354ec67 design-lint: architecture and look rules for the framework 2026-11-12 14:32:38 +00:00
aiongg a5469d5446 Gallery and story renderer: every component's stories, old/new comparison 2026-11-12 14:32:38 +00:00
aiongg 25597ecfc7 Media, formats and engine crates: follow-ups from the framework migration 2026-11-12 14:32:38 +00:00
aiongg 8735a8b1c5 Document and app crates on the framework: text, pages, table, review, timeline, menu, browse, dialogs, print, font manager, theme store, update, automation 2026-11-12 14:32:38 +00:00
aiongg fa139e6d3d Picture crates on the framework: imaging, draw, colour, layers 2026-11-12 14:09:48 +00:00
aiongg e59460135e Base crates on the framework: theme, behaviour, keymap, platform, window, settings, i18n, fonts 2026-11-12 14:09:48 +00:00
aiongg a2676b8eac Framework UI crates: widgets, panels, canvas, patterns, shell and the craft-ui facade 2026-11-12 14:09:32 +00:00
aiongg e4d2fc38fb Runtime and contract: craft-ui-contract, macros and the test kit 2026-11-12 14:09:32 +00:00