Skip to content

Add integration_test case: scroll clips overflowing content - #152

Open
beaucollins wants to merge 1 commit into
simon/260814-valdi-webfrom
beaucollins/web-scroll-overflow-clipping
Open

Add integration_test case: scroll clips overflowing content#152
beaucollins wants to merge 1 commit into
simon/260814-valdi-webfrom
beaucollins/web-scroll-overflow-clipping

Conversation

@beaucollins

Copy link
Copy Markdown
Collaborator

Adds an apps/integration_test case that documents a web-renderer regression on this branch (#148): a <scroll> with a fixed height renders at its content height instead of clipping/scrolling, so it overflows its bounds and pushes following siblings off-canvas.

Root cause

src/valdi_modules/src/valdi/web_renderer/src/elements/ScrollElementClass.ts — the scroll box's own height + overflow aren't applied to constrain it, so it grows to content.

Repro

Case scroll-overflow-clipping renders a height=200 scroll over 600px of content plus a sentinel below it. Web: the scroll box renders ~600px and the sentinel is shoved down/off. Native: the scroll is 200px and content scrolls within it. The web-vs-native diff fails.

Suggested fix

Apply the scroll element's own height + overflow so content is clipped/scrollable within the box.

A <scroll> with a fixed height must clip and scroll content taller than its
bounds. Under the new web renderer the scroll box grows to its content height
(600px here instead of 200px), so it does not clip and pushes following siblings
off-canvas.

This case renders a fixed-height scroll over tall content plus a sentinel below
it; the web-vs-native snapshot diff catches the missing clip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

📊 PR Size: size/S

Total changes: 25 lines (1 files)

Top files changed:

  • apps/integration_test/src/valdi/integration_test_app/src/IntegrationTestCases.tsx: +25 -0

Size calculated as additions + deletions. Labels: XS (<10), S (<50), M (<250), L (<1000), XL (1000+)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant