fix(pages): a short Custom HTML block shrinks to its content height #71

Merged
ngqile merged 1 commits from fix-frame-content-height into main 2026-12-03 12:07:10 +00:00
Owner

The frame script reported document.documentElement.scrollHeight. Inside a frame, that value is never less than the frame's own height, which starts at 600 px. A top bar on its own therefore left about 530 px of blank space below it.

The script now reports the height of the content box (getBoundingClientRect().height).

  • The new test failed before the change and passes after it.
  • Full vitest run: 1986 passed, exit code 0. tsc is clean. Lint shows 0 errors.
  • I checked the change live on /p/INS/hotel-technology: the top bar frame now fits its content.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs

The frame script reported `document.documentElement.scrollHeight`. Inside a frame, that value is never less than the frame's own height, which starts at 600 px. A top bar on its own therefore left about 530 px of blank space below it. The script now reports the height of the content box (`getBoundingClientRect().height`). - The new test failed before the change and passes after it. - Full vitest run: 1986 passed, exit code 0. tsc is clean. Lint shows 0 errors. - I checked the change live on `/p/INS/hotel-technology`: the top bar frame now fits its content. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
ngqile added 1 commit 2026-12-03 12:07:03 +00:00
scrollHeight inside the frame never drops below the frame's own 600 px start height,
so a top bar left a large blank gap. The frame script now reports the content box height.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
ngqile merged commit dbb58e6e94 into main 2026-12-03 12:07:10 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ngqile/co-lite#71