Skip to content
This repository was archived by the owner on Nov 7, 2026. It is now read-only.

Web: keine zitternden Scrollbalken unter Windows - #39

Merged
code4teaching merged 2 commits into
mainfrom
web-scroll-zittern
Oct 20, 2026
Merged

code4teaching merged 2 commits into
mainfrom
web-scroll-zittern

Conversation

@code4teaching

Copy link
Copy Markdown
Owner

Before: On Windows (classic scrollbars, 125 % display scaling) the scrollbars in the web editor flickered, most visibly with the learning area open. The tab bar above the diagram was 1 px taller than its box (scrollHeight - clientHeight = 1), so Windows drew a tiny vertical scrollbar there. The diagram SVG was sized from fractional values and could overflow its box by a fraction of a pixel, and the resize observer redrew on every notification.

After: The tab bar (and the palette row on narrow screens and lesson code blocks) only scroll horizontally. The diagram size is floored, the canvas only redraws when its size really changes, and the canvas and learning area reserve their scrollbar space (scrollbar-gutter: stable) so a scrollbar appearing no longer shifts the layout. Mac (overlay scrollbars) looks the same as before.

How: CSS overflow-y: hidden and scrollbar-gutter: stable, plus a size guard in the canvas ResizeObserver. Reproduced the tab-bar overflow in Chromium with real scrollbars at 1.25 device scale; the actual flicker on Windows still needs a check on a Windows machine.


Generated by Claude Code

- Reiterleiste: Bei 125 % Skalierung war der Inhalt 1 px zu hoch, Windows
  zeigte dort einen winzigen senkrechten Scrollbalken. Die Leiste scrollt
  jetzt nur noch waagerecht (ebenso Palette auf schmalen Bildschirmen und
  Codeblöcke in Lektionen).
- Diagramm: Größe abgerundet, damit es den sichtbaren Bereich nicht um
  Bruchteile eines Pixels überragt, und neu gezeichnet wird nur bei echter
  Größenänderung.
- Diagramm und Lernbereich halten Platz für den Scrollbalken frei, damit
  er beim Erscheinen das Layout nicht verschiebt.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X5L4wNpcXBufwAn6U3AMDj

Copy link
Copy Markdown
Owner Author

All three jobs (web-test, swift-test, app-build) failed without starting. GitHub's annotation says: "The job was not started because recent account payments have failed or your spending limit needs to be increased." That is an account billing limit, not this change. Locally npm test (98 tests), tsc --noEmit and npm run build:site pass. CI needs a re-run once the Actions billing/spending limit is fixed.


Generated by Claude Code

# Conflicts:
#	website/app/assets/index-D27AYNVA.js
#	website/app/assets/index-DFUmRQ-F.js
#	website/app/assets/index-DXvHM7EL.js
#	website/app/index.html
@code4teaching
code4teaching merged commit 673ea48 into main Oct 20, 2026
0 of 3 checks passed
@code4teaching
code4teaching deleted the web-scroll-zittern branch November 5, 2026 21:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants