Skip to content

Keep Huginn's drift inside the page - #26

Merged
craig-o-curtis merged 1 commit into
mainfrom
25-entrance-scrollbars
Nov 13, 2026
Merged

craig-o-curtis merged 1 commit into
mainfrom
25-entrance-scrollbars

Conversation

@craig-o-curtis

Copy link
Copy Markdown
Contributor

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

  • Sampled overflow every frame across headless fly-ins at 800×600. Before: every leftward entrance (sweep angle over 180°) overflowed, always the header. After: none did in 12 runs, 7 of them leftward.
  • pnpm lint, format:check, check and build pass.

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-o-curtis

Copy link
Copy Markdown
Contributor Author

/craig-review

@craigs-reviewer craigs-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@craig-o-curtis
craig-o-curtis merged commit 013549a into main Nov 13, 2026
1 check passed
@craig-o-curtis
craig-o-curtis deleted the 25-entrance-scrollbars branch November 13, 2026 10:29
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.

Bug: some entrances add v and h scrollbars

1 participant