craft-design-lint's mapped_crates_have_no_findings test failed on main
with two findings:
- crates/ui-contract/src/runtime/access/scope.rs:710, layer/import: the
label scope (layer 2) called crate::layout::record_baseline, which
lives in layout::label (layer 4). The call came in with afd18d148.
Recording a control's baseline and the key the baselines of a control
size are noted under now live in runtime::layout_memory as
record_control_baseline and control_baseline_kind. The label scope
and layout::label both call them, and the behavior is unchanged.
- crates/ui-patterns/src/patterns/presets/browser.rs:449,
props/hand-setter: PresetBrowser::host_version, added in 16f896280,
only stored its argument. The field is now a #[prop], and
#[derive(Props)] writes the same setter with the same documentation.
A browser given a tip painter, row menu rows, drop rules or drag payloads
keyed its presets view as changing in every pass, because no key can follow
what a closure reads. The Swatches panel passes all of these, so its list
ran in every frame.
PresetBrowser::host_version and SwatchesPanel::host_version take a version
for everything those closures read. While it holds and nothing reaches the
presets, the view replays its last run; a new version runs it once. Without
a version the view still runs in every pass.
A flyout measures its group before it shows it. The dock measured the group
in the flyout body's own scope, while the show runs in a child Ui of that
body, so the measure gave the group's memoized views (its tab row and the
panel bodies) other ids than the show. Those views never had a kept run at
the measure's ids and ran in every frame while the flyout stayed open.
The measure now runs in child Ui scopes matching the show's: the group's
child Ui, and inside it the host view's room. At rest an open flyout's tab
row and memoized body replay in every call of the frame.
* docking divider: a drag moves the divider with the move that starts it
The move that carries a press past slop arrives as PressPhase::DragStart with the pointer position, but divider::drag dropped it, so every container moved its divider a pass later. Drag::Start now carries its coordinate (Start(f32), mirrored for right-to-left like To) and Drag::coord gives the coordinate of either. SplitArea, DockColumn, StackSections, the iconic column's edge, SplitViews, the column bar and the margin handles begin their gesture as before and then apply the start's coordinate in the same pass.
Drag is public, so Start(f32) is an API change for code that matches Drag::Start.
Trial a_column_divider_follows_the_move_that_starts_its_drag_in_the_same_pass
* docs: regenerate contract-api.md
---------
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
The details pane puts Color Profile and Pixel Aspect Ratio in an Advanced Options disclosure under
Background Contents, open by default; folding it keeps their values. The float depth entry reads
"32 bit" (storytold/photocraft#14035).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PropertiesDialog wrote the shown tab back to its `tab` binding after
every pass, starting from tab 0. A pass in which the body did not run
(a measuring run that ends before the body, or a closed dialog) wrote
0 back, so a dialog bound to its second tab showed the first one after
its first frame. The tab is now written back, and Reset Panel applied,
only when the body ran.
The dialog face of CommandPalette was a modal centered on both axes and
sized to its rows, so its search field moved up and down with each query.
The box is now centered across the window with its top 15% of the window's
height down, and only its bottom edge moves as the rows come and go.
- ui-contract: FloatPlace::top_centered(share) places a float centered
across its bounds with its top at that share of their height. Its room is
held to the height that leaves the same share below it, measured in the
overlay's own bounds, so a body as tall as it may grow (in an embedded
shell, whose region lifts the modal's cap) does not push the top up.
- ui-patterns: the palette's dialog face uses it, at the share that matches
its 70% height cap.
- Tests: the palette's top and field stay put between a 12-row and a 1-row
query; in an embedded shell a 50-row list leaves the top in place; a
bounded float keeps its top for a short and a tall scrolling body.
In a form whose rows share a label column, a radio row started at the
form's left edge, in the label column, while the check boxes and the
fields of the other rows started past it. A radio group lays out apart
from the label column of the form around it, so its radios never read
the column.
A radio row now shows its group in a field with a hidden caption, in
each of its three layouts (a caption over the options, stacked_options
and options_in_row), so the first radio starts where a check box row
starts. A radio row in a shared line and a row nested under an option
stand where they stood. A document form without a shared caption column
is unchanged.
The new test shows a text row, a check box row and a radio row in each
layout, and compares where the check box label and the first option
start.
A Range row with Param::length and Param::step kept the step for the
slider only. The permanent row's number field stepped by the shown
unit's default, and the popup row's field stepped by the set step but
did not snap typed values to it.
SliderField now converts a set step from the stored unit to the shown
unit for its length field and snaps typed values to it unless
typed_decimals is set. Without a step the field keeps the shown unit's
own step. The length field also takes the slider field's pointer
modifiers, which the plain field already does. The popup row's length
field snaps typed values to its set step.
With points stored, inches shown and a step of 144 pt, Up on either
field moves 2 in, and typing 1.4 stores 144 pt.
Only Number rows read Param::length, so a Range row over points showed
points in an inch or millimeter document.
- SliderField::lengths makes its number field a length field: it shows
and reads the value in the shown unit at that unit's step and
decimals, while the binding, the range and the slider stay in the
stored unit.
- Range rows pass Param::length to their SliderField. A popup-slider
range row builds a length field too, and a set step, which is in the
stored unit, steps the field by the same length in the shown unit.
While a measuring run lays out a field group, a row only sees the label
column that the rows before it reported. A check box row with its label
after it, above the first row with a side label, saw no column. A row
beside a label narrower than the widest saw a narrower column. Both
measured their help line wider than the control column of the real run,
so the footer was sized for fewer lines and the last line was cut off.
The label step now notes the column such a row read when the row has a
help line, so the group runs its rows again at the final widths. This
covers a label after the control, a label beside it and a hidden side
label.
The fixture's shown rect grows with whatever the row allocates, so a
button that overflowed the column also widened it and the check passed.
The room starts at x = 0, so the test now compares the button's right
edge with the requested width.
PathRow showed its FillWidth text field in a content-sized Row, where a
filling leaf keeps its measured width. The field stayed at its full field
length and the row narrowed the Browse button instead, so in a column
narrower than about 280 pt the label was cut to "Brows...". The row now
fills its width: the field takes the room the button leaves.
CardText::PageTile is a page card whose rest state lays a light veil of
surface.scrim over the surface under it. Hover, pressed and selected
fills and the selection edge are the same as CardText::Page, which keeps
its flat card. PresetCardLook::PageTile shows New Document's preset
cards this way. No default changes: the start page and apps that set
PresetCardLook::Page draw as before.
Stories show both new looks. Tests check that a PageTile card paints the
veil at rest and a Page card paints no fill, and that New Document's
PageTile cards rest on the veil with the paper on it while the selected
card takes the hover fill.
A group or panel taken out of a column collapsed to icons kept the
column's collapsed state in its new column. A group dragged out of an
icon column by its grip floated as a strip with a flyout: the tab names
were cut off and a click on a tab did not switch the panel.
A new column, floating or docked, now stays collapsed only when it holds
the whole column it came from. When other panels stay behind, the new
column is expanded. Groups that join an existing column still keep the
source column's state, so their flyout widths are unchanged.
An icon dragged out of a collapsed column that keeps other panels now
starts a plain group drag, so the float preview and the window rect match
the expanded window that the drop makes.
While the app moved a floating window shown in an OS window, the dock
area recorded the window's new place (Action::SetNative) in every pass
of the drag. Each record was a workspace edit, which changed the
workspace revision and rebuilt the dock's kept specs, titles and
geometry in every frame of the drag.
FloatingGroupOutput gains `moving`, kept in the group's memory from a
move's Begin to its Commit or Cancel. DockArea skips native::reported
while it is set; the Commit pass and the passes after it record the
place where the window was let go.
The new trial counts the placement records during a six-step drag of
a palette the app moves: 6 without the change, 0 with it, and the
release still records the final place.
TitleBar puts space.gap.item between its leading controls (it used
space.gap.row, 5 pt in the compact sizes), and show_fitted lays out the
trailing controls at space.gap.item as well.
Overlay::dropdown() sets the new Overlay::off_edge: an anchored dropdown
stays space.pad.regular inside the window's edges, except where its field
reaches nearer the edge. The fit's cap is still a share of the window.
A content-sized collection whose rows run past its room ends on the last
row that fits whole and scrolls the rest, so a Select list no longer ends
part way through a row.
The workspace switcher's doc comment says its commands are in the More
options menu of the list's header.
Clicking the Optimize rows' OK while Desired File Size held text that does
not parse filed a search with the size the rows held before. Clearing the
field had the same effect for both OK and Enter, since the field took empty
text as a blank value and the rows kept their old size.
The size field now holds an f32, which has no blank value, so empty text
does not parse either, and OK is disabled while the field's text does not
parse, as the parameter dialogs hold their OK. Enter in the field already
filed nothing for text that is not a number.