Repository navigation
Keep Huginn's drift inside the page - #26
Conversation
Each pane drifts 10px back along his line as he brushes it in. Since he can head left, that drift pushes it right, and the header is full width, so it went past the right edge and added a horizontal scrollbar while it played. With classic scrollbars (in an iframe, for one) that took height from the viewport and added a vertical one too. The drift is now held inside the page's right and bottom edges. The sweep still runs his way; only the pixels the pane moves are limited. Fixes #25
|
/craig-review |
There was a problem hiding this comment.
code-reviewer: looks good
The change limits the per-pane drift so a pane never moves past the page's right or bottom edge while it brushes in. Before, a leftward fly-in pushed the full-width header 2–6px past the right edge and added scrollbars for the length of the entrance. The clamp is sound for the transform implied by the comments, a translate of -10px × (--ng-dx, --ng-dy) in Base.astro, which I could not see. Room is measured against clientWidth and the document bottom (scrollHeight - scrollY) in viewport coordinates, and is only applied against drift toward the right or bottom, so other directions are unchanged. I found nothing that needs changing.
Reviewed 7e778c1 for craig-o-curtis · claude-opus-5-5 · 1 file · $0.12
Fixes #25.
As Huginn brushes each pane in, it drifts 10px back along his line. Since #24 he can head left, so that drift pushes panes right. The header is full width, so it went 2–6px past the right edge, which added a horizontal scrollbar for the length of the entrance. With classic scrollbars (in an iframe, for one) that took height from the viewport and added a vertical one too.
The drift is now held inside the page's right and bottom edges. The sweep still runs his way; only the distance the pane moves is limited. Heading left, the header drifts only up or down.
Checked
pnpm lint,format:check,checkandbuildpass.