Skip to content

Clicks clipped by boxes that clip; the Tracker in narrow windows - #8

Merged
theetherGit merged 4 commits into
mainfrom
scroll-hit
Nov 26, 2026
Merged

theetherGit merged 4 commits into
mainfrom
scroll-hit

Conversation

@theetherGit

@theetherGit theetherGit commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes these bugs:

  • Clicks after scrolling: in the counter example, scroll the list a little and "start timer" stops working. The click selects a row instead.
  • The Tracker in a narrow window: the list's header, toolbar and bulk bar were drawn over the detail pane, and the Board and Insights ran out of the window.

Cause

Blitz's hit test (Node::hit_inner) checks whether a point is inside a box using the box's scrolled coordinates. With the list scrolled down 40 px, a point 37 px above the list counts as inside it. The hit test then descends into the rows and doesn't clip that descent to the box. So the rows scrolled out of the top of the list, which the list doesn't draw there, sat under the buttons and took their clicks. Text overflowing an overflow: hidden box took clicks outside it the same way; that's the route announcer case sepal/adapter works around.

Fix: blitz-dom patch 14

  • hit_inner now asks whether the element clips its descendants, decided as blitz-paint decides it (should_clip in render.rs): overflow other than visible on either axis, or paint containment; never the root element.
  • Outside the element's padding box, nothing inside it is hit. The element itself is hit on its border, and nothing otherwise.
  • The change is marked sepal patch and written up in crates/blitz-dom/PATCH.md.

Tests

  • New: rows_scrolled_out_of_the_list_do_not_take_clicks (counter). It scrolls the list 60 px and clicks the middle of "start timer". It failed before.
  • Five Tracker tests depended on the old behaviour. They clicked rows and "Show more"/"Show all" buttons far below the window, which only worked while hit testing ignored the clip. HANDOVER had this down as the reason the patch was put off.
    • A new SvelteDocument::scroll_into_view scrolls a node to the middle of its boxes and tells the app, like scrollIntoView({ block: 'center' }).
    • The Tracker's click() calls it when its target isn't what's under the pointer, as a user would scroll to it first.
    • Three list tests scroll back to the top after clicking "Show more" or "Show all" at the end of the list.
    • The comment field is clicked at its left end. Once the pane is scrolled to it, the rename's toast covers its right side; the toast lasts 5 s.
  • Status: pnpm test passes locally (138 host tests). The host tests passed on both engines with the first commit (134 each).

The Tracker in a narrow window (second and third commits)

Squeezing the window put the list's controls on top of the detail pane.

  • At about 1000 px: Priority was drawn over the issue's title.
  • Below about 720 px: the list column was 0 px wide and its header was drawn over the pane's. The 480 px pane also ran out of the window, close button included.

Why:

  • The layout assumed room for the sidebar (240), the list and the pane (480) side by side, and defined nothing for a narrower window.
  • The list's header and toolbar were lifted above everything (relative z-10, a workaround for rows scrolled under them taking their clicks). So what they couldn't fit was drawn over the pane and took its clicks.
  • The bulk bar, a fixed 560 px centred in the list, covered part of the sidebar and the pane whenever the pane was open, including at 1200 px.

Fix (the third commit replaces the second's one-line clipped toolbar):

  • Side by side only where both fit: sidebar + a list of at least 400 px + pane = 1120 px. Below that, the open issue takes the list's place and fills the space; closing it brings the list back. The default 1200 px window is unchanged.
  • Containment: each column keeps what it draws inside itself. The z-10 workarounds are gone, since the first commit makes clipping apply to clicks.
  • Toolbar: it wraps onto another line when its controls don't fit. Every filter, Group and Sort stays visible and clickable.
  • Bulk bar: 560 px, or the list's width less 16 px a side, whichever is smaller.
  • Rows: labels show where the list is at least 760 px (a 1000 px window); below that the title gets the room. A label that doesn't fit drops out whole and never pushes the date out of the row.

New tests, each failing before:

  • At 700 px, the toolbar wraps inside the list and every row keeps 100 px for its title.
  • At 1120 px (the narrowest side by side), the toolbar and bulk bar stay in the list, and the pane takes its own clicks.
  • At 1000 px, the pane takes the list's place, the list's header isn't under it, its close button is in the window, and closing it brings the list back.

The Board and Insights in a narrow window (fourth commit)

At 720 px, the smallest window the Tracker asks for in #10:

  • Board: the filter bar ran out of the window, putting Project out of reach.
  • Insights: the tiles and lower panels were cut off at the right edge, because fr tracks can't shrink below their content.

The fix:

  • The Board's bar wraps onto another line when it has to, like the list's toolbar.
  • Insights shows its four tiles in one row from 1120 px, where each 1fr tile gets the ~155 px its number needs, and two by two below that. Its two panels sit side by side from the same width and stack below it.

New test: board_and_insights_fit_the_narrowest_window. It failed before.

Renderer or example?

Checked against headless Chrome: the same Tracker build (the web version the Tauri comparison uses) served locally, before and after these commits.

  • Clicks after scrolling (counter): the renderer. Blitz's hit testing didn't clip to a scroll box (patch 14). Chrome clips.
  • Everything else here is the Tracker's own CSS. Chrome draws the same overlaps and cut-offs from the unfixed build: the header, toolbar and bulk bar over the pane, the Board's filter bar, the Insights rows. With the fixed CSS, Chrome and Blitz lay out the same.
  • What the renderer added to the example's problems: the z-10 workaround for the click bug made the overflow draw, and take clicks, on top of the pane.

Follow-up, not in this PR

sepal/adapter's pointer-events: none on SvelteKit's route announcer is no longer needed, since the announcer's overflowing text is clipped now.

🤖 Generated with Claude Code

In the counter example, scrolling the list a little made "start timer"
stop working: the click selected a row instead. Blitz tests a node's
descendants in its scrolled coordinates, where a point above a list
scrolled down by 40 px counts as inside it, and it does not clip the
descent to the box. The rows scrolled out of the top of the list, which
the list does not draw there, sat under the buttons and took their
clicks. Text overflowing an overflow: hidden box took clicks outside it
the same way (SvelteKit's route announcer).

hit_inner now asks whether the element clips its descendants, as
blitz-paint decides it (overflow other than visible on either axis, or
paint containment; never the root element), and outside its padding box
hits nothing inside it: the element itself on its border, nothing
otherwise. Marked `sepal patch`, written up in PATCH.md.

Tests that clicked rows far below the window relied on the old
behaviour. SvelteDocument::scroll_into_view scrolls a node to the middle
of its boxes and tells the app, as scrollIntoView({ block: 'center' })
does; the Tracker's click() calls it when its target is not under the
pointer, as a user would scroll to it. Three list tests scroll back to
the top after clicking "Show more" or "Show all" at the end of the list,
and the comment field, which a toast partly covers once the pane is
scrolled to it, is clicked at its left end. A counter test scrolls the
list and clicks "start timer"; it failed before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@theetherGit
theetherGit marked this pull request as draft November 26, 2026 14:59
With the pane open the list column is the window less the sidebar (240)
and the pane (480): 280px in a 1000px window. The toolbar is one line
that does not wrap, and the search (at least 160px) and the filters did
not fit in it, so Priority ran 76px into the pane, over the issue's
title. The line is above the list (z-10, so that rows scrolled under it
do not take its clicks), so it was drawn over the pane, and took the
pane's clicks there.

The filters now wrap inside a box one line high that clips: one that
does not fit beside the pane drops out of sight whole, and nothing of
the toolbar reaches the pane. Beside the pane the search starts at its
smallest and grows into what is left, so Status stays in a 1000px
window; at 1200px and wider nothing changes. The clicks on what the box
clips depend on the previous commit.

A test opens an issue in a 1000px window: each filter fits beside the
pane or has wrapped out of sight, and a click where Priority used to
reach is the pane's. It failed before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@theetherGit theetherGit changed the title Clicks: a box that clips its overflow clips hits too (counter buttons after scrolling) Clicks clipped by boxes that clip (counter after scrolling); the Tracker's toolbar stays out of the pane Nov 26, 2026
Squeezing the window still put the list's controls on top of the detail
pane: below about 720px the list column was 0px wide, its header was
drawn over the pane's, and the 480px pane ran out of the window, close
button and all. The previous commit only kept the filters in one clipped
line, which hid them in a narrow window. The layout assumed room for the
sidebar (240px), the list and the pane (480px) side by side, and said
nothing about a window without it. The list's header and toolbar were
also lifted above everything (`relative z-10`, so that rows scrolled
under them would not take their clicks), so what they could not fit was
drawn over the pane and took its clicks. The bulk bar, a fixed 560px
centred in the list, covered part of the sidebar and the pane whenever
the pane was open, at 1200px too.

- The list and the pane sit side by side only where both fit: the
  sidebar, a list of at least 400px (the toolbar's search, Status and
  Priority, a row's title, the bulk bar's actions) and the pane, 1120px
  in all. In a narrower window the pane takes the list's place and
  fills the space; closing it brings the list back. The default 1200px
  window is unchanged.
- Each column keeps what it draws inside itself (the list's clips), and
  the z-10s go: the first commit makes a box clip clicks as it clips
  what it draws, which is what they stood in for.
- The toolbar wraps onto another line when its controls do not fit, in
  place of the previous commit's clipped line: every filter, Group and
  Sort stays visible and clickable in a narrow window.
- The bulk bar is 560px or the list's width less 16px a side.
- A row shows its labels where the list is at least 760px (a 1000px
  window); below that the title gets the room. A label that does not fit
  drops out of sight whole and never pushes the date out of the row.

Tests, each failing before: the toolbar wraps inside the list at 700px
and every row keeps 100px for its title; at 1120px, the narrowest side by
side, the toolbar and the bulk bar stay in the list and the pane takes
its own clicks; at 1000px the pane takes the list's place, the list's
header is not under it, its close button is in the window, and closing
it brings the list back. They replace the previous commit's test, which
expected the list beside the pane at 1000px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@theetherGit theetherGit changed the title Clicks clipped by boxes that clip (counter after scrolling); the Tracker's toolbar stays out of the pane Clicks clipped by boxes that clip; the Tracker in a narrow window Nov 26, 2026
At 720px (the smallest window the Tracker asks for, #10) the Board's
filter bar ran out of the window, Project out of reach, and the
Insights tiles and lower panels were cut off at its right edge. Both are
the example's CSS, as headless Chrome shows with the same build: the
Board's bar was one line that could not wrap, and the Insights rows were
`2fr 1fr 1fr 1fr` and `3fr 2fr`, whose fr tracks cannot shrink below
their content (the tiles' large numbers, the priority table).

- The Board's filter bar wraps onto another line when it has to, as the
  list's toolbar does. Its columns scroll sideways, as before.
- Insights puts its four tiles in one row where each 1fr tile gets the
  ~155px its number needs (1120px of window), and two by two below
  that; its two panels sit side by side from the same width and stack
  below it.

A test opens both at 720px: the Board's filters stay in the window and
can be clicked, and every Insights tile and panel is inside it. It
failed before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@theetherGit theetherGit changed the title Clicks clipped by boxes that clip; the Tracker in a narrow window Clicks clipped by boxes that clip; the Tracker in narrow windows Nov 26, 2026
@theetherGit
theetherGit marked this pull request as ready for review November 26, 2026 15:31
@theetherGit
theetherGit merged commit 25e8493 into main Nov 26, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant