Commit Graph
95 Commits
Author SHA1 Message Date
bflatastic a7b48fb036 theme, dock: size.bar.column, the height of a dock column's bar (size.control.sm in both built-in sets, so the bar keeps its height unless an app sets it); a column's bar, expanded or collapsed to icons, lies on the surface its dock's tab strips do: surface.canvas beside PanelTabLook::Block tabs, the window's background otherwise 2026-11-25 11:34:02 +07:00
aiongg 9b818faae7 Merge pull request #3413 from aiongg/dock-gaps-2
Tab order, IME fence and start-up crash fixes from EffectCraft's minimal port
2026-11-24 23:12:20 -05:00
bflatastic 27d1e9c469 theme, ui-widgets buttons: size.button, a standard push button's height, read by the text-faced buttons (Button, SplitButton, ToggleButton) through StyleCx::button_height; a small button stays a small control high. Both size sets give it control.md's value, and an app that overrides size.control.md and not size.button has it follow, so no other app's buttons change (the token dumps gain only the size.button line, equal to control.md). Trial; dumps updated 2026-11-25 10:24:16 +07:00
aiongg e46f5180a0 Focus: a Tab with no stop to move to and nothing focused stays in egui's input for the app's own binding 2026-11-25 01:15:31 +00:00
aiongg c933a90624 Every focusable egui widget the app draws is a stop of the window's one Tab order
The focus service takes egui's focus candidates of the pass (Memory::focus_candidates) at every
order-dependent registration and at the end hook: each widget no component made becomes a stop of
the app's own, where it was drawn among the framework's stops, a text stop for a TextEdit. Recorded
views and lazy children replay them with their transcripts.

A bare Tab is the framework's move unless an egui popup is open or the app's focused widget keeps
Tab by its egui key filter. Removed: focus::host_stop and the separate egui-Tab path for windows
without framework stops. The scrim absorber no longer takes key focus.
2026-11-25 00:36:38 +00:00
aiongg b2cd661510 Focus: host_stop puts an app's own widgets into the one Tab order
focus::host_stop registers an app's own egui widget as a focus stop
(Stop::host, as host_canvas does, without marking a document canvas), so a
window that has framework stops and the app's own widgets keeps one framework
Tab order holding both, in registration order.

A canvas keeps Tab only while it has the focus. With nothing focused a bare Tab
moves focus into the window or toggles the panels, even for a canvas that
keeps Tab, as the unfocused canvas's claims already never take Tab: the canvas
cannot trap keyboard navigation. The last assertion of
a_host_canvas_marks_the_window_and_tab_toggles_its_panels changes to this
rule: with nothing focused, the Tab toggles the panels instead of reaching the
canvas in egui. The unused Strip::canvas field goes with the old rule.
2026-11-24 21:39:59 +00:00
aiongg 3709418d5f Keys: an app's own focused widget keeps the plain Enter
While an app's own egui widget or popup has the focus, a plain Enter stays in
egui's input for it and no window Submit comes of it, as with Tab and Escape.
The window's Submit was offered beside the press, so an app editor read one
Enter and an app that returns the window's Submit to egui read two; an app
TextEdit in a framework dialog also fired the dialog's default button. With
nothing focused the plain Enter stays the window's Submit and in egui's input.
2026-11-24 21:35:30 +00:00
aiongg 9fd8b0cdaa Add frame::will_rerun for host work once per shown frame
Layout memory requests its discard pass from egui in its end hook, after the
app's UI, so Context::will_discard() read by host code during a pass that a
changed size runs again is still false. frame::will_rerun is true when egui
will discard the pass or when this pass asked layout memory for the frame's
discard pass and will get it. Hosts gate frame counts and settle counts on it.
The discard request stays in the end hook, so lazy runs and memoized replays
keep their records of the asking pass.
2026-11-24 18:57:43 +00:00
aiongg 73b31f60ca Merge storytold next into next-host-input 2026-11-24 18:28:22 +00:00
aiongg 2f8d73e7cf Merge storytold next into next-host-input
Conflicts resolved so that next's changes and this branch's fixes both hold:
- keys: next's unfocused-canvas state claims join the key stage's framework claims; the canvas's
  declared claims stay the host's (egui keeps their presses).
- overlay: the app's own modal (`FrameInput::app_modal`) joins next's modal stack at the frame it
  first showed in.
- docking: the tab-pick trial moves key focus into the group with Tab, since a click on a dock tab
  leaves key focus where it is.
2026-11-24 15:37:34 +00:00
Dylan M. Taylor badd2a8822 ui-contract: a host's window-input policy reaches every OS window the runtime hosts
FrameInput::window_input(WindowInput::Dropped) drops a hosted window's own
events and OS files in the input filter, before injected input joins, so an
agent-driven session's floated panels take only injected input. eframe runs
raw_input_hook for the main window only; the root's input stays the host's.
The test kit's Windows takes the policy; trials cover the drop and a macOS
Control+Click in a hosted window.
2026-11-24 09:55:46 -05:00
bflatastic 6798a83eb9 theme, tabs, canvas panel: size.bar.tab_large, the height of large document tabs (today's size.bar.title in every size set), so large tabs no longer take the title bar's height; CanvasPanel gives its tab pane an extent, size.bar.tab or size.bar.tab_large with the new large_tabs prop, so a strip taller than its first measured height shows its tabs whole. Story canvas_panel_with_large_tabs. 2026-11-24 18:52:09 +07:00
aiongg 3a10c49a2c Quit is a framework command, and the update dialogs show the icon the app gives its host
- QuitCommand::Quit (window.quit, Cmd+Q) replaces egui's quit shortcut, which the runtime clears at
  install. The runtime runs it from any source through the root window's close path, so the app's
  close decision asks about unsaved work. Its default yields to another command bound to the chord,
  as the window shortcuts' defaults do (library::yields_default).
- HostBuilder::icon_png gives the app's icon once, beside its AppInfo; the update dialogs show it in
  their head instead of the name's initial.
- Docs: craft-framework.md §2.2 Quit and Zoom keys rows, craft-host README.
2026-11-24 02:30:10 +00:00
aiongg 5d9f4b62cb Hosted egui apps on next: host code runs once per pass, and the app's own modal blocks its other windows
A dock panel's egui code (PanelSpec::host_body) ran in the framework's
measuring runs too, so egui saw its widgets twice per pass at two rects
and painted ID-clash warnings. HostStyle::show runs it in the real run
only; a measuring run takes the size its last real run took.

FrameInput::app_modal names the window where the app's own egui code
shows a modal; the app's other windows (native floats among them) are
blocked through the same path as under a framework app-modal layer.
2026-11-24 02:14:13 +00:00
aiongg 22e82c930e Keymap: warn about shortcut overrides that name no command; framework doc names the pane and menu-bar command ids 2026-11-24 00:49:06 +00:00
aiongg 55fef13aaf Hosted egui apps on next: canvas claims, Ctrl+wheel pinch switch, host style in dock bodies
- The key target's declared claims count for Alt-code entry and the key stage: with nothing
  focused the window's document canvas (`host_canvas`) stands for the focused component, so an
  app's Alt+digit shortcut it claims reaches it on Windows and Linux. A host stop's claimed press
  stays in egui's input, where the app reads it, focused or as the unfocused key target.
- `RootEnv::ctrl_wheel_pinch` (default on) makes the fold of a fractional Ctrl+wheel into
  `Event::Zoom` a host choice: off, the wheel event stays as sent, for an app whose Ctrl+wheel
  does something else or zooms at its own rate.
- `PanelSpec::host_body` marks a panel whose body is the app's own egui code: the dock hands its
  body, footer, header, rail footer and group view the style of the `Ui` the dock was shown in
  (`HostStyle`), while framework bodies keep the group's spacing.
2026-11-23 23:21:49 +00:00
bflatastic 1385f0ff3d ui-contract: a held Escape cancels once: its repeats raise no Cancel, focused or not 2026-11-23 11:21:26 +07:00
bflatastic d467ed3dcd Merge remote-tracking branch 'origin/next' into sync/next
# Conflicts:
#	crates/font-catalog/src/tests.rs
#	crates/font-manager/src/picker.rs
#	crates/font-manager/src/picker/rows.rs
#	crates/font-manager/src/picker/stories.rs
#	crates/ui-patterns/src/patterns/panels/palette.rs
#	crates/ui-patterns/src/patterns/presets/browser.rs
#	crates/ui-widgets/src/list/mod.rs
#	crates/ui-widgets/src/list/view.rs
2026-11-23 02:15:44 +07:00
bflatastic 9c58208bba ui-contract: an Alt+letter the keymap binds to an enabled command runs it instead of opening the menu with that mnemonic 2026-11-23 00:50:14 +07: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 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
aiongg 1851f6984f Component constants: one-component values live in the component's file
A dimension that belongs to one component's own drawing is a documented
constant in that component's file; layout sizes stay semantic tokens, and
no size-preset token exists for one component (craft-framework.md 5.4).

- Spec: 5.4 rule 3 reworded; Appendix A, 4.6 (the component-token rung
  goes, no such tokens exist), 8.3, porting.md and the theme README agree.
- design-lint: literal-size/* treats a module- or impl-level const with a
  doc comment as a named value: a name that resolves to it is not flagged,
  and its initializer is its definition. Fn-local and undocumented consts
  and call-site literals stay flagged. Nine markers that only covered such
  consts are removed.
- Ruler ticks: size.ruler.tick.* leaves the size presets; kit.rs draws
  TICK_MID = 6 and TICK_MINOR = 3 points in every density, as the old
  library and the apps' rulers do. Comfortable ticks go back to 6 / 3
  (from 9 / 4.5); Compact is unchanged.
- size.scroll_fade becomes FADE_LENGTH in scroll_bar.rs, size.notice.width
  CARD_WIDTH in notice.rs, and size.story.* multiples of size.control.md
  in testing/stage.rs (15, 10 and 30 control heights: today's values in
  both densities). pointer_tip, checker, thumb.sample.*, the card gaps and
  icon.glyph_md stay tokens: each has more than one user.
2026-11-20 17:33:27 +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 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
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
aiongg c7e4abfcfa craft-ui: memoized views are the one change mechanism; the settling path goes
Lazy::settles, Lazy::content, Key::Version, the input and unsettle rules
(Changes::input_through, unsettled_through, scan) and lazy::unsettle with its
callers are removed. frame::request_repaint marks the record of the view it
is asked in and reruns only that view; asked outside every view, every view
replays. request_own_repaint goes; ui-canvas calls request_repaint. Pages
measures each hidden page once per pass. The tests that used the old API are
memoized views, with trials for repaints in and outside views and for
given-value edits. API map rows and the framework doc describe memoized
views.
2026-11-19 16:32:30 +00:00
David MannandClaude Opus 5.5 6195b126d2 craft-automation: re-export the agents code from craft-control (#2390)
craft_automation::agents kept its own copy of the agent settings, the
launcher's switch and the connection file beside craft_control::agents.
It now re-exports craft-control's (and with it the CLI's live client)
and keeps only the egui link host. The Agents page is unchanged.

Callers see two API changes: AgentSwitch::watch takes a closure
instead of craft_host::Wake, and the connection functions return
std::io::Error. AgentSettings is #[non_exhaustive] in another crate
now, so the trials set fields on a default instead of using struct
update syntax.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 15:14:26 +01:00
Martin Ball 42bcdb68e7 fu-platform: app batch 1 rulings (S-L324, S-L239) 2026-11-18 22:39:34 +00:00
Martin Ball 4f37976c25 platform-w4: net change of 4 commits
- platform-w4: written from its sheet
- platform-w4: repair 1
- platform-w4: review fixes (review-1)
- platform-w4: review fixes (review-1b)
2026-11-18 17:25:03 +00:00
aiongg 016ca5425d Merge storytold next into themecraft-wave1 2026-11-18 14:01:25 +00:00
aiongg 50362dd2c4 build: dev-build tuning lives in cl; Cargo.toml profiles match main 2026-11-18 05:40:33 +00:00
aiongg 08dad9c745 Themes name an icon pack; the resolved tokens carry the set every icon draws from
ThemeDef gains icon_pack (IconPackId), read and written as the top-level
icon_pack key of the v1 theme format. UiTokens::of_theme resolves a theme
and takes the icon set its pack names (craft.lucide, craft.phosphor,
craft.carbon, craft.tabler); a pack that is not installed draws the
default set. SvgIcon::of reads the set from the tokens, so IconSpec.set
is removed.
2026-11-17 16:22:58 +00:00
aiongg 35b0b38909 Rename our craft-color to craft-color-ui; keep storytold main's craft-color (frame colour tags) at crates/color 2026-11-17 12:54:32 +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 a038653ff2 merge-fwe: FW16 E7: docs for agents in the open window (craft-automation README, craft-framework.md) 2026-11-16 12:48:01 +00:00
aiongg 20e0bcf93b dialogs-w2: net change of 3 commits
- dialogs-w2: written by an agent
- Integration: ParamRows keeps dialogs-w1's preview_colors beside the patterns rows (dialogs-w1 7a195af4a)
- dialogs-w2: review fixes (review-1)
2026-11-15 04:46:07 +00:00
aiongg e12c63310a Docs: landing on next; development guide counts and CI 2026-11-13 23:31:57 +00:00
aiongg 74d232d238 egui: the fork is storytold/egui next (dcd4de1f, the same revision) 2026-11-13 23:29:07 +00:00
aiongg eee9ab4e6d Ramp size roles say what reads them; trials: a container sharing a scrolled view keeps its content height when taller and runs its body at most the draft more than in a plain Stack 2026-11-13 19:26:51 +00:00
aiongg 17b0290d77 docs: a scrolled Stack body shares its view among the children that fill its height 2026-11-13 19:26:50 +00:00
aiongg f04b5867fa Color panel look (fix round): channel rows at production density with content-sized fields and the colour band of size.ramp.bar; readout letters and fold; framed edited well; gamut warning beside its swatch; ramp a control tall
- PaintUi::measure: a composite measures a child as PaintUi::child shows it.
- SliderField::field_sizing; the Inline field takes its measured width.
- Slider: the triangle starts under the colour band; TrackLook::ramp is size.ramp.bar.
- NumberField: a field that rounds what it commits is sized at those places; a mixed field is sized as with a value.
- ColorReadout: a wrapping row, the hex field then R, G, B fields after their letters, each content-sized.
- SwatchPair::frame_active; ColorWarningChip::beside.
2026-11-13 19:26:50 +00:00
aiongg b27d5d4eb5 Theme: shape.wells, the shape of a colour well that stands on its own; SwatchPair draws round wells where the theme says so (Adwaita, Breeze, Soft) 2026-11-13 19:26:50 +00:00
aiongg b719904755 Take harfbuzz-subset-sys from storytold's HarfBuzz fork
The HarfBuzz subsetter bindings live in storytold/harfbuzz, branch
rust-subset-15.0.0 (HarfBuzz 15.0.0 plus rust/harfbuzz-subset-sys, which
compiles the fork's own src/). The workspace pins that package by commit
and no longer carries a copy of the HarfBuzz sources, the crate, or the
update script. design-lint's unsafe allow list, the facade's crate list,
ATTRIBUTION and the framework doc follow.
2026-11-13 16:42:06 +00:00
aiongg e80cbd30ab docs: sweep: neutral wording, craft-automation module table, broken link 2026-11-13 12:49:28 +00:00
aiongg 62e38dc39f docs: porting guide (docs/porting.md), linked from craft-framework.md and development.md 2026-11-13 04:25:52 +00:00
aiongg bcd07c7167 F-5 docs: the hover band lies inside the view; the host's clock is the last painting pass 2026-11-13 01:08:19 +00:00
aiongg 74a1426e57 F-5 review: the host reports the autoscroll step from the pass clock; the hover band is size.hit.edge inside the view's rect; a secondary background press leaves a text session open 2026-11-13 01:08:19 +00:00
aiongg 5b22727818 Story suite: a shown run lies inside its own clip, and a run the base shot shows whole stays whole under each variant 2026-11-13 00:45:28 +00:00
aiongg 1cc518f92d Icon strokes scale with the glyph: one stroke.icon role, a share of the icon side (Lucide at 1.75 of 24), for stroke sets and the suite's stroke drawings alike 2026-11-12 15:23:58 +00:00
aiongg 237e2a1566 Panel footer actions show their icons at the tool size (size.icon.md) 2026-11-12 15:23:58 +00:00