Take the photo roll's grab band off the buttons that end a mode
Benchmarks / CPU and I/O (per commit) (push) Successful in 3m53s
Benchmarks / Frame budget (on demand) (push) Skipped
Build and test / Desktop (Linux) (push) Failing after 58s
Build and test / Layer separation (push) Successful in 45s
🐳 Android image / Build and push (push) Successful in 4s
Build and test / android-image (push) Successful in 4s
Traceability / Requirement traces (push) Failing after 1m0s
Build and test / Android (aarch64) (push) Failing after 31s

"Done Cropping", "Done Repairing", "Done Masking" and "Fit" float over
the foot of the canvas. So does the photo roll's swipe handler, and a
gesture handler is not a layout box — it is an input surface. A press
inside one is delayed, then offered to that handler's own children and
to nothing else: `input_event_filter_before_children` returns
`DelayForwarding`, which aborts the hit-test traversal outright, and the
replay afterwards visits only the handler's subtree. Everything behind
it is never asked, hover included.

The band was `strip-height + reach` — 136px along the bottom — whether
the roll was out or away. So the button that ends a mode was drawn, was
lit, and did nothing for as long as a library was open, which is the
whole time anybody is developing from one. The tool rail kept working
because it is a sibling of the canvas rather than behind the roll, which
is exactly why this looked like two dead buttons rather than a dead
region.

The band now goes where the roll goes. The handler carries the strip
instead of standing still while the strip animates inside it: closed,
only `reach` is on screen and the rest hangs below the window where
nothing can press it; open, it still covers the thumbnails, which is
what lets a swipe down anywhere across them put the roll away. The
180ms travel moved from the strip onto the handler, so the drawn
positions in both states are what they were.

The controls are then positioned against that band rather than against
the bottom of the canvas, and ride up with the strip when it comes out.
Reordering them in front of the roll would have been the other fix, and
it is the wrong one — the band would become the thing that cannot be
reached, and a gesture nobody can start is worse than a button with a
second way out.

`roll-strip` and `roll-reach` are tokens now, because two files have to
agree on where that band is for either of them to keep out of it.

The bottom of the photograph comes back with it: the crop's lower
handles and a repair placed near the bottom edge were inside the same
136px and had the same fault.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-30 19:42:17 +02:00
co-authored by Claude Opus 5
parent 3d248cfb79
commit 4dc954f01a
5 changed files with 111 additions and 33 deletions
+22
View File
@@ -236,6 +236,28 @@ lengths:
get the number out of the layout engine short of asking it.
_roll:
section: the photo roll
note: |
The strip of thumbnails along the foot of the develop view, and the
handle that pulls it out. Both numbers are tokens rather than private
properties of `PhotoRoll` because the canvas has to keep out of their
way: the roll's swipe handler takes every press inside itself, so the
controls floating over the photograph are positioned against these — a
button under that band is a button that does nothing.
roll-strip:
value: 108
doc: |
The strip's height. Enough for a thumbnail big enough to recognise a
frame by, and no more: it is drawn over the photograph.
roll-reach:
value: 28
doc: |
The handle, and the band of canvas left grabbable when the roll is away.
A thumb's worth, and no more — it is taken off the bottom of the
photograph.
swatch:
value: 12
note: |
+28 -1
View File
@@ -2143,8 +2143,35 @@ in property <bool> panel-visible: true;
// confirmation you take on trust. The rail is now the
// second way out rather than the first.
if root.total > 0 && root.load-error == "": HorizontalLayout {
// **Clear of the photo roll, or these do nothing.**
//
// The roll's swipe handler consumes every press that
// lands inside it and offers it to its own children
// and to nobody else — so a control drawn underneath
// that band is drawn, is lit, and then ignores the
// pointer entirely, hover included. "Done Cropping"
// sat there and was dead for as long as a library was
// open, which is the whole time anyone is developing
// from one.
//
// Being declared before the roll is not the fault and
// reordering is not the fix: the band would then be
// the thing that could not be reached. They stack
// instead — the controls ride on top of the roll's
// band, at whatever height it currently stands.
property <length> roll-clear:
root.library-total > 0
? (root.roll-open
? Theme.roll-strip + Theme.roll-reach
: Theme.roll-reach)
: 0px;
// The roll's own travel, so they rise with the strip
// rather than jumping ahead of it.
animate roll-clear { duration: 180ms; easing: ease-out; }
x: 12px;
y: parent.height - self.preferred-height - 12px;
y: parent.height - self.preferred-height - 12px
- self.roll-clear;
// Bounded, or the row takes the canvas's whole width
// and stretches its children across it. With one
// button that read as an odd-looking "Fit"; with two it
+36 -7
View File
@@ -497,7 +497,10 @@ export struct LibraryCell {
// it once one does. A tap therefore reaches the thumbnail and a drag does not.
//
// It covers only the band along the bottom, never the whole canvas — above
// that band a drag belongs to the photograph, for panning and for the crop.
// that band a drag belongs to the photograph, for panning and for the crop —
// and while the roll is away the band narrows to the handle's own `reach`,
// because a gesture handler consumes every press that lands in it. The note
// on `swipe` below says what that cost before it did.
export component PhotoRoll inherits Rectangle {
in property <[LibraryCell]> cells;
/// Which row of the loaded window is open, so it can be marked. `-1` when
@@ -511,10 +514,12 @@ export component PhotoRoll inherits Rectangle {
/// a cell click reports.
callback pick(int);
property <length> strip-height: 108px;
/// Both from the theme rather than from here, because the canvas
/// positions its floating controls against the band these two describe.
property <length> strip-height: Theme.roll-strip;
/// The band of canvas left grabbable when the roll is away. A thumb's
/// worth, and no more: it is taken off the bottom of the photograph.
property <length> reach: 28px;
property <length> reach: Theme.roll-reach;
property <length> thumb: 92px;
property <length> pad: 6px;
@@ -523,7 +528,30 @@ export component PhotoRoll inherits Rectangle {
swipe := SwipeGestureHandler {
width: 100%;
height: root.strip-height + root.reach;
y: parent.height - self.height;
// **The whole handler slides, and the strip sits still inside it.**
//
// A gesture handler is an input surface, not only a box to hang the
// strip on: while a press lands inside it that press is *taken* — it
// is delayed, then offered to the handler's own children and to
// nothing else, so no element behind it is ever asked. A band the full
// height of the strip is right while the strip is out and is a dead
// zone over the foot of the photograph while it is away, which is
// where the crop's bottom handles and the canvas's floating controls
// live.
//
// So the band goes where the roll goes. Closed, only `reach` of it is
// on screen — the handle, and the thumb's width of canvas that starts
// the swipe; the rest hangs below the window where nothing can press
// it. Open, it covers the strip, which is what lets a swipe down
// anywhere across the thumbnails put the roll away.
//
// This is also why the animation moved here from the strip: the strip
// is now fixed at `reach` within the handler, so the handler's `y` is
// the only thing left that travels.
y: root.open
? parent.height - self.height
: parent.height - root.reach;
animate y { duration: 180ms; easing: ease-out; }
handle-swipe-up: !root.open;
handle-swipe-down: root.open;
@@ -540,11 +568,13 @@ export component PhotoRoll inherits Rectangle {
// Slid out of view rather than removed. An `if` would have it appear
// fully formed at the bottom of the screen instead of arriving from
// the edge, and would leave nothing for the animation to act on.
// What travels is the handler around it; see the note on `swipe`.
strip := Rectangle {
width: 100%;
height: root.strip-height;
y: root.open ? root.reach : parent.height;
animate y { duration: 180ms; easing: ease-out; }
// Below the handle and no lower: the handler above carries both
// of them in and out.
y: root.reach;
background: Theme.surface;
clip: true;
@@ -628,7 +658,6 @@ export component PhotoRoll inherits Rectangle {
height: root.reach;
x: (parent.width - self.width) / 2;
y: strip.y - self.height;
animate y { duration: 180ms; easing: ease-out; }
background: Theme.surface;
border-radius: Theme.radius;