fix(harmonia): cap dialogs to the viewport and scroll their body - #6951
Merged
delchev merged 1 commit intoAug 27, 2026
Merged
Conversation
A tall Harmonia form dialog - e.g. the document line-item editor with many fields - grew past the screen and its header and Save/Cancel footer bled off the top and bottom edges, unreachable. Harmonia's x-h-dialog is centred with no max-height and no internal overflow, and x-h-dialog-content is not a registered directive so it has no scroll of its own. Cap [data-slot="dialog"] to the viewport and let the x-h-dialog-content region flex-grow and scroll, keeping the header and footer pinned - the same cap+scroll recipe the platform's Fundamental/BlimpKit dialogs already use, placed in the shared application-core app.css override layer since Harmonia's compiled CSS does not bake it in. One edit covers every dialog on every shell (all shells load this file by absolute URL). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6950
Problem
A Harmonia dialog with enough fields to exceed the viewport height renders with its header pushed above the top edge and its Save/Cancel footer pushed below the bottom edge — both off-screen and unreachable. The dialog is vertically centered, so a body taller than the screen bleeds off both ends. The most visible case is the document line-item editor (the "Add line" dialog on a header-items entity such as a Sales Invoice), where the Save button cannot be clicked.
Root cause
The shipped
codbex/harmoniaCSS (2.14.0) givesx-h-dialoga centeredpositionwith nomax-heightand nooverflow:position-centercenters viatop:50%; left:50%; translate(-50%,-50%), so a body taller than the screen overflows off both the top and bottom. Additionally,x-h-dialog-contentis not a registered Harmonia directive (the library registers onlyh-dialog-overlay/-dialog/-header/-title/-close/-description/-footer), so the<div x-h-dialog-content>wrappers used across the templates receive no styling and cannot scroll on their own.This affects every Harmonia dialog on every shell; short dialogs (delete/print confirmations) simply never grow tall enough to trigger it.
Fix
Cap
[data-slot="dialog"]to the viewport and let thex-h-dialog-contentregion flex-grow and scroll, keeping the header and footer pinned and on screen. This is the same cap+scroll recipe the platform's Fundamental/BlimpKit IDE dialogs already use:It is placed in the shared
application-coreapp.css override layer (explicitly "App-level overrides on top of Harmonia's compiled CSS") since Harmonia's compiled CSS does not bake it in. One edit covers every dialog on every shell — the application/builder/admin/partner/personal/monitoring/database shells and the generated per-project shell all load this file by absolute URL (/services/web/application-core/shell/css/app.css).Short dialogs are unaffected: below the cap, the
flex/overflowrules are no-ops (no free space to distribute, no scrollbar shown).Longer term, the cleaner home is an upstream
codbex/harmoniachange (capx-h-dialogand registerx-h-dialog-contentwith the scroll); this override is the correct fix for this repo in the meantime.Testing
🤖 Generated with Claude Code