Wheel gains claimed, claimed_gathered, claimed_zoom_gathered and
claimed_spent. CanvasSpace::claim_wheel claims the pass's share of the
gesture the canvas owns and records the motion the body used up; the
gesture's later shares carry the claim and count only the shares the
body claimed, so a body that turns a gesture into steps keeps no state
of its own. A second claim in the same pass replaces the first, and a
claim outside a running pass, of a gesture another taker owns, or with
a non-finite spent value is refused. claim_wheel returns whether the
claim was taken.
The canvas does not move its view by a claimed gesture: it skips the
navigation of claimed shares and drops the eased wheel, the eased wheel
zoom, the touchpad glide and any partial zoom notch the gesture still
owed, also in passes without a share and after a device end.
CanvasSpace::mark_wheel_modal marks the running gesture as gone on
under one of the app's own modal windows, so its later shares carry
Wheel::modal until it ends. Synthesized end shares carry the claims of
the gesture they end, and a gesture the split hands to another owner
starts its claims again.
Wheel gains two fields. held is the modifiers held at any point of the
running gesture: those of its wheel events, of key events between them,
and of a key tapped between a swipe's device end and the momentum run
that resumes it. modal is set when a wheel event of the gesture, or one
less than GESTURE_GAP before it began, arrived while a modal layer held
the wheel, in the same window or in another. A canvas can then leave
the rest of a turn begun under a dialog alone after the dialog closes,
and apply a rule such as Shift tapped mid-gesture.
End shares carry the held and modal values of the gesture they end.
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.
Conflicts:
- ui-contract items/hooks.rs: rest_lead takes no placement here; main's
lead focus ring block is kept as main wrote it.
- ui-panels docking/mod.rs: main's FocusLook import kept; the memory::sub
import goes, since the dock no longer keeps pass frames in memory.
Follow-ups of the merge:
- MeasureCx::in_row (main) reads row_alone_room from the component's
scope env, as column_room does here.
- The split-handle focus ring trial (main) passes SplitArea's revision.
Reviewer findings on #3214: `pressed_part`'s entry ended mid-sentence and said
nothing about the pass that ends the press, and `icon_ink_on`'s ended after
picking the higher-contrast token, leaving out the non-text contrast minimum the
implementation then applies.
The catalog lists the first line of each doc comment, so both now open with a
complete sentence that carries the boundary: `pressed_part` is the part in the
pass that ends the press and in none after it, and `icon_ink_on`'s ink is pushed
to the non-text minimum. The catalog is regenerated; the run also picks up two
entries the branch's merges added without regenerating (`Action::restore` and
`floated`'s doc), and a second run leaves the file byte for byte as it was.
The jump-release trials gain the passing sense: a press that clicks and passes
its drag, released past slop in the batch that presses again, ends with a
`Release` that claims no drag, as the click-and-drag sense does, and the new
press opens.
Tests: cargo test -p craft-behavior --lib -- press (18 passed, 4 of them the
jump-release trials).
Reviewer finding on #3448: entries in `docs/contract-api.md` ended mid-sentence
(`size_ok` at "a `min` that is", `label_decimals`, and the `WindowSpec`,
`pressed_part` and `icon_ink_on` summaries). The generator lists the first line
of each doc comment only, so each of those doc comments now opens with a
complete sentence and keeps the rest below it: `size_ok` says on its second line
that a `min` that is not a number counts as one unit, `label_decimals` keeps its
cases in the paragraph under the summary, and `WindowSpec`'s first line carries
the whole "what it is for, who draws its frame, where it stands and whether it
has a taskbar entry" sentence.
Regenerated with the branch's own generator; a second run leaves the file byte
for byte as it was. Every entry this branch adds or changes now ends in a full
stop. The rest of the file keeps the entries the base leaves truncated (1273 of
4820 entry lines still end mid-sentence, none of them touched here): sweeping
those, or teaching the generator to join a doc's first sentence, is a separate
change.
The regeneration also picks up two entries the branch's merges added without
regenerating (`Action::restore`, and `floated`'s doc).
Review (CodeRabbit), codec.rs:337. The absolute branch recursed on the text after the sign, so a field's own
`or_parse` was handed "Auto" where it had always been handed "+Auto". The sign is read on its own only when the
reader accepts what follows; text the reader does not read falls through with its `+` intact, so a custom parser
sees the text as it was typed. Trial: codec::review_tests covers `+Auto` through or_parse beside `+2` and `+(2+3)`.
Review (Fred): the guard after the sign asked for a digit or the decimal separator, so "+(2+3)" fell through to the
reader, which read the plus as relative and committed 15 where the field shows 5 for "+2+3". Whatever follows the
sign that the reader accepts, a number in any script or an expression, is now read on its own: the signed text is
absolute, and a lone "+" still falls through and is refused.
Reviewer finding: once a press's `Down` was reported, a far release with no
move before it marked the press as dragging and held the release for the
`DragStart` it still owed. A new press in the same batch ended it first, so the
parts read a dragging `Release` with no `DragStart` before it.
A release that gives way to a new press now reports the drag only when the
parts were told its start (`Open::drag_reported`), so a press reads `Down`, a
`Release`, or `DragStart` then `Drag` and `Release`. Where the button went up
stays in `Release::pos`, and a release past slop is no click either way.
Regression: `Down` reported, then a far release with no move and a new press in
the same batch.
Review (CodeRabbit): the guard after the sign asked is_ascii_digit, so "+\u{663}" (Arabic-Indic 3) failed it and fell through
to the reader, which read the plus as relative: 13 for a start of 10. The guard now uses the reader's own digit class,
so any supported script's digit keeps the sign the number's, and a plain field's relative reading is unchanged.
Review (CodeRabbit): the guard after the sign looked at the next character only, so "+ 2.50" typed back fell
through to the reader, which strips the space and reads the plus as relative (12.5 for a start of 10); the digit
is now looked for after the space. A share field's signed percentage failed too: "+50%" dropped the sign and
re-entered parsing where the share branch had no start value, so it read as no value; a signed number is absolute,
so it is read without the share branch, as "+50" already was. Trials: codec::review_tests for both, and the plain
field's "+ 2" still adds to the start.
A group moved from a floating window or an expanded column into a column
collapsed to icons joined with no flyout width, so its flyout opened at the
column's width and the size the panel was resized to was lost.
The group now takes the width it was shown at as its flyout width: the
floating window's width or the expanded column's. A width equal to the
column's leaves the flyout following the column, and a group from another
collapsed column keeps its own flyout width.