Commit Graph
130 Commits
Author SHA1 Message Date
BFlat 877b55f835 Merge pull request #3805 from dotCooCoo/fix/pointer-scoped-field-wheel
Allow apps to limit wheel edits to the focused field under the pointer
2026-11-27 14:22:49 +07:00
BFlat bb84da2f88 Merge pull request #2965 from dotCooCoo/feat/unit-text
Units: number rows can show unit text, and UnitKind gains Milliseconds
2026-11-27 14:16:13 +07:00
BFlat fa29f503f8 Merge pull request #3554 from dotCooCoo/fix/segmented-narrow-room
ui-widgets: a segmented strip wider than its room moves segments to the next line
2026-11-27 14:11:48 +07:00
BFlat 326856bd18 Merge pull request #3512 from dotCooCoo/fix/dock-band-host-items
dock: a narrow group's drag band leaves room for the host's header items
2026-11-27 14:06:45 +07:00
dotCooCoo 5f896c5bdf Document the PerInch unit variant 2026-11-26 21:00:09 -08:00
dotCooCoo 1d85617a61 Merge main into feat/unit-text 2026-11-26 20:38:25 -08:00
dotCooCoo 8873320c70 Allow apps to limit wheel edits to the focused field under the pointer 2026-11-26 14:50:50 -08:00
dotCooCoo 60626900b7 Merge next into feat/unit-text 2026-11-26 07:42:52 -08:00
aiongg 5ec98bd628 Merge remote-tracking branch 'upstream/next' into next-into-main-2
# Conflicts:
#	crates/ui-widgets/src/text/text_field.rs
2026-11-26 11:03:44 +00:00
FredApps cc59357033 Merge pull request #3475 from storytold/fix/wordcraft-7708-print-zoom-whole-percent
ui-contract: a ZoomPrecision env value lets zoom show whole percents (storytold/wordcraft#7708)
2026-11-26 11:14:23 +01:00
FredApps 7e7456955a docs: contract-api lists FieldLook, StyleCx::quiet_field and TextOptions::look
Regenerated with the contract-api bin; only the three entries this PR adds are taken, the file's other drift on next is left alone.
2026-11-26 16:30:14 +07:00
FredApps e39fd100af Merge remote-tracking branch 'origin/next' into tc14-3475 2026-11-26 16:08:37 +07:00
aiongg ecdc221f4a Merge next into main 2026-11-26 05:38:41 +00:00
dotCooCoo 1eeb7baf17 Merge next into feat/unit-text 2026-11-25 20:36:19 -08:00
dotCooCoo bdccf96831 ui-widgets: a segmented strip in a row or bar keeps one line
In a row, a bar included, the strip's least is its whole line again, so the
row's shrink step does not wrap it. It still wraps in a column narrower than
the strip. A rect with room for one line only keeps the segments on that line.

- ui-contract: `MeasureCx::in_row` says whether a component is a direct child
  of a `Row` body.
2026-11-25 19:43:32 -08:00
BFlat 40c4cb3157 Merge pull request #2949 from dotCooCoo/feat/fit-short-order
Fit: items rank their short forms, and late ones shorten after the free items leave
2026-11-26 10:24:19 +07:00
BFlat 14cd3ae8a9 Merge pull request #3513 from dotCooCoo/fix/link-text-contrast
ui-contract: link text reads at 4.5:1 on every surface it is drawn on
2026-11-26 09:56:34 +07:00
BFlat 733e35fea8 Merge pull request #3492 from dotCooCoo/fix/dock-group-band-keeps-tab
dock: a docked group's drag band narrows before the shown tab loses its first letters
2026-11-26 09:56:07 +07:00
BFlat 91877f4160 Merge pull request #3431 from dotCooCoo/fix/job-progress-layer-role
ui-contract, ui-panels: a job progress window's layer has the progress role, and OpenFilter::Asks leaves it out
2026-11-26 09:51:10 +07:00
Martin BallandClaude Opus 5.5 e173ef092e ui-contract: zoom_percent follows ZoomPrecision with zoom_codec
One zoom_decimals helper serves both, so the read-only zoom texts (Navigator slider, full-window title, zoom bar
entries) agree with the zoom fields. with_zoom_precision is pub(crate). Regenerates docs/contract-api.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:07:27 +00:00
aiongg 97794fff62 ui-contract: DocRun::coords draws a run at variation coordinates of its face; FontSample takes them 2026-11-25 20:37:43 +00:00
dotCooCoo ce87f5484d Merge next into fix/dock-group-band-keeps-tab 2026-11-25 10:22:44 -08:00
skylartaylor f62036b16a docs: regenerate contract-api.md 2026-11-25 15:58:07 +01:00
skylartaylor 9a7c2255a2 Merge remote-tracking branch 'origin/next' into design-port/pr-menus-popups 2026-11-25 15:19:07 +01:00
dotCooCoo 36b0dc54b8 ui-contract, ui-widgets: link text reads at 4.5:1 in accent.text; a toast's links take the card's text color
StyleCx::link_look drew links in accent.solid, which the theme holds only to
the 3:1 non-text minimum, so link text read at 2.93:1 on the light panel and
2.30:1 on the dark one. It now takes accent.text at every contrast, the
accent step the theme holds to 4.5:1 on the panel, raised and sunken
surfaces. accent.solid is unchanged, so buttons and fills keep their color.

A toast's card is the inverse surface, where accent.text reads at 2.57:1 in
the default light theme and 1.24:1 in the dark one. Link::on_inverse draws a
link in text.on_inverse, always underlined, and a toast's action links use it.
2026-11-25 05:48:47 -08:00
dotCooCoo 170e0924b6 dock: a narrow group's drag band leaves room for the host's header items
The room a docked group's header keeps for the shown tab did not count
the items the host adds before the tab strip (DockGroup::extra). The
header parts are sized before the header runs, so in a narrow group the
band kept its full width and the shown tab got what the host items left:
12.3 pt of the 44.4 pt a shrunk tab keeps in a 72 pt compact group with
one host button.

- ui-contract: layout_memory::emit_width and layout_memory::width hand
  forward a measured width as emit_text and text hand forward a text. It
  serves the rest of the pass, comes back with a kept measurement, and a
  memoized view that replays emits it again.
- ui-panels: DockGroup's header hands forward the width its host items
  take, and the header parts add it to the room they keep before the band
  narrows. Until the header has handed it forward, and in groups without
  host items, the band narrows as before.

Tests: a_narrow_groups_drag_band_leaves_room_for_the_hosts_header_items
(both densities, both directions, one and two host items, one and two
tabs), a_replayed_view_hands_forward_the_width_its_run_measured
2026-11-25 05:47:36 -08:00
dotCooCoo 52948ceaaf dock: a docked group's drag band narrows before the shown tab loses its first letters
In a header too narrow for the drag band and the shown tab, the band took
its whole width first and the tab strip got what was left. In the DockArea
story's 40 pt Tools column the shown tab was 2 pt wide at compact density
and missing at comfortable density, though TabStrip keeps the shown tab
visible.

- ui-contract: HeaderParts::end_narrows lets a container's end parts give
  up width, down to a least, so the header's children keep a given room.
  The header line applies it; headers that fit are unchanged.
- ui-panels: DockGroup keeps room for the shown tab with its first three
  letters (with its icon, count, mark and close button, and the overflow
  button beside other tabs), and its band narrows to an icon's width
  before that room shrinks. Floating groups use the same header.

Test: a_narrow_groups_drag_band_narrows_before_the_shown_tab
2026-11-25 03:57:40 -08:00
dotCooCoo cdcd0c7c4d Merge next into feat/unit-text 2026-11-24 19:22:42 -08:00
dotCooCoo 557a5bf932 ui-contract, ui-panels: a job progress window's layer has the progress role, and OpenFilter::Asks leaves it out
The overlay host recorded every layer with LayerRole::Plain, since no path copied Overlay::role into
the layer's open entry, and JobProgress set no role. any_open's check for progress windows never
applied, so an app that waits while a dialog asks something counted its own progress window: it
drew the window only every second frame. The host now records the layer's role at all four places
it records a layer, Prompt takes a layer role, and JobProgress sets LayerRole::Progress. The new
OpenFilter::Asks counts modal layers except progress windows; Any, Modal and Keys still count a
progress window, as they did before. Trial a_job_window_is_a_modal_layer_that_asks_nothing.
2026-11-24 19:14:10 -08: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 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
skylartaylor ed7a4c4ee6 Focus: focus_came_with_open is a documented runtime API, as the menu rows read it 2026-11-24 17:45:28 +01:00
dotCooCoo 09906f30b5 Merge next into feat/unit-text 2026-11-24 05:37:05 -08:00
bflatastic 0a4d309686 Merge remote-tracking branch 'origin/next' into sync/next
# Conflicts:
#	Cargo.toml
#	crates/font-manager/src/picker/rank.rs
#	crates/font-manager/src/picker/rows.rs
#	crates/ui-panels/src/docking/group.rs
#	crates/ui-panels/src/docking/iconic/trials.rs
#	crates/ui-patterns/src/patterns/dock/area.rs
#	crates/ui-widgets/src/choice/mod.rs
#	crates/ui-widgets/src/choice/swatch.rs
#	crates/ui-widgets/src/choice/swatch/stories.rs
#	docs/contract-api.md
2026-11-23 13:53:35 +07:00
aiongg 3b629776d8 Testing runtime runs background work inline: InstallSpec::jobs and Env::jobs_of
Story trials have no host, so document-face and texture loads ran on default_jobs' threads and a fixture
could settle before a face landed (StyleList::variants on Windows: rtl 52.0 vs 52.8, motion shapes change
after the drive). InstallSpec::jobs sets where a context's background work runs while no host is installed;
Env::jobs_of (host, else installed, else default_jobs) replaces the two copies in the face registry and the
texture loader. testing::install_spec and the suite's language hosts use InlineJobs, so a load asked for in
one pass lands in the next on every machine; the two per-story InlineJobs options go.
2026-11-23 04:43:29 +00:00
bflatastic 7d61a755c9 docs: regenerate contract-api for Reader::split_unit and contract::response_of 2026-11-23 11:32:56 +07:00
bflatastic 443a05c863 docs: regenerate contract-api for SubNode::run_link's removal, EditorStep, ItemLayout::set_fit, Fired's place and FrameOutput::dimmed 2026-11-23 10:52:58 +07:00
aiongg 8c4e115ea4 docs/contract-api.md: regenerated (document_face's job and the face bytes; also ColumnSpec::at_least and data_fill_tiled, which next's copy lacked) 2026-11-23 03:27:14 +00:00
bflatastic e1c00aac13 docs: regenerate contract-api for the drag payloads, CollectionEvent::Picked and CollectionKind::Picked 2026-11-23 07:00:26 +07:00
bflatastic a7ff91cd16 docs: regenerate contract-api for PointerFrame::pick_pos 2026-11-23 06:12:13 +07:00
bflatastic 9f99a64cf7 docs: regenerate contract-api 2026-11-23 05:07:04 +07:00
bflatastic 534db793a0 Merge remote-tracking branch 'origin/next' into sync/next
# Conflicts:
#	crates/font-manager/tests/it/picker.rs
#	crates/ui-shell/tests/it/shell/app_shell.rs
2026-11-23 04:35:03 +07:00
bflatastic 6f69df0e47 docs: regenerate contract-api.md 2026-11-23 02:05:06 +07:00
aiongg fe271bf574 Dropdowns name the list that takes their opener's keys
A dropdown's opener (a picker's field or button) hands Up, Down, Page keys,
Enter and Tab to a collection in its dropdown. The framework took the first
type-ahead collection it found in the layer. The font picker's dropdown holds
the class column before the family list, so with filters shown Enter and the
arrows went to the class column: typing a name and pressing Enter picked
nothing.

Overlay::list (FocusPolicy::list) names the collection instead, and every
dropdown names its list: Select, ComboBox, TreePicker, completions, number
presets, PopupList (new PopupList::list) and the font picker, which names its
family list while it shows one. The type-ahead guess is gone.
2026-11-22 18:59:40 +00:00
bflatastic 8206a076a2 ui-contract: a focused stop that is no longer shown leaves focus nowhere; only a removed child of a collection row hands it back to the row
behavior: after_removal goes with the rule it served. The spec trials state the new rule.
2026-11-22 18:15:04 +07:00
dotCooCoo d54bb6c5b1 Merge main into feat/unit-text 2026-11-22 00:50:40 -08:00
aiongg 750a9bdd57 Merge pull request #2896 from aiongg/rework-d3
Focus: a removal's new focus is not revealed; the canvas text editor returns the focus to the canvas
2026-11-21 21:17:56 -05:00
dotCooCoo 5b6295b5c9 Fit: short form docs name the late order, and the API listing lists the new items
FitItem::short now says that an item marked short_late takes its short
form only after no free item is left to leave. The first line of each new
builder's doc is a complete sentence, since docs/contract-api.md copies
only that line, and the module doc wraps like its neighbors.

docs/contract-api.md is regenerated with
cargo run -p craft-ui-gallery --bin contract-api; only FitItem's lines
change.
2026-11-21 17:47:52 -08:00
dotCooCoo 002c8f0c37 Units: number rows can show unit text, and UnitKind gains Milliseconds
A host can now show a unit after a number that no UnitKind names,
such as kbps, s, MB, MiB or GiB, and count durations in milliseconds.

- UnitKind::Milliseconds shows "{n} ms", reads "250 ms" and "250ms",
  and shows whole numbers by default.
- Param::unit_label(text) shows text after the number of a number,
  int, optional-number, range or popup range row, in place of the
  symbol of the row's unit. The row's unit still reads typed text.
- RowKind::unit_label(text) does the same for Preferences Int and
  Float rows. Int and Float rows that count a UnitKind now draw its
  symbol after the field, as RowKind documents.

Stories show both forms, and two trials check the drawn text and
that typed text is still read by the counted unit.
2026-11-21 17:08:11 -08:00