fix(block-editor): fill 100% height for inline editor in UVE sidebar (#36620)#36621
fix(block-editor): fill 100% height for inline editor in UVE sidebar (#36620)#36621rjvelazco wants to merge 6 commits into
Conversation
…36620) The new block editor (`dot-block-editor`) rendered inline in the UVE block-editor sidebar drawer did not fill the drawer height — it fell back to its hardcoded 500px scroll surface, leaving empty space above the Cancel/Save footer. The legacy editor filled the drawer via a parent `::ng-deep .editor-wrapper { height: 100% !important }` override, but the new editor no longer renders `.editor-wrapper` (its height moved to an inline `[style]` binding on `.editor-scroll-container`), so that override was dead CSS for it. Add a `fillHeight` input to `DotCMSEditorComponent`: when set, the host, wrapper and panel become a flex column and the scroll surface uses `flex: 1; min-height: 0` instead of the fixed 500px — mirroring the existing fullscreen layout so the toolbar and stats bar keep their natural height. The sidebar passes `[fillHeight]="true"` and its container is now a proper flex column (editor grows, footer keeps its height). The dead `.editor-wrapper` override is scoped to the legacy editor only. Standalone / Edit Contentlet usage is unchanged (fillHeight defaults to false, keeping the fixed resizable height). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @rjvelazco's task in 1m 2s —— View job Review: is this the right CSS pattern?Yes — this is the correct and idiomatic pattern. A flexbox column chain where the scroll region gets
The chain is intact end-to-end: host New Issues
No bugs, security, or convention issues. Test coverage is appropriate — the spec asserts |
|
@claude review this code and check if this is the right CSS pattern to solve this issue |
…ter (#36620) Hide the empty PrimeNG `.p-drawer-header` in the UVE block-editor sidebar (the drawer has no title and is not closable, so the header only wasted ~42px above the editor) and add a gap between the editor and the Cancel/Save footer buttons. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…r sides (#36620) The Lara drawer content ships with `padding-top: 0` (the header normally supplies the top gap). With the header now hidden, the editor toolbar sat flush against the drawer edge. Restore a top padding matching the left/right/bottom sides (overlay.modal.padding = 1.5rem). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… heights (#36620) Addresses PR review feedback: in fill/fullscreen mode the panel is a flex column and the scroll surface is `flex: 1`, but the toolbar and stats bar had no `flex-shrink: 0`. At a very short drawer/viewport height they could be squeezed. Pin both with `shrink-0` so only the scroll surface flexes. No effect in the default (block-flow) layout. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Proposed Changes
Fixes the UVE inline block editor not filling 100% of the sidebar drawer height (only ~500px was used, leaving empty space above the Cancel/Save footer).
Root cause
dot-block-editor,@dotcms/new-block-editor) had no "fill parent" layout mode. Its scroll surface (.editor-scroll-container) was hardcoded toheight: 500pxvia an inline[style]binding, and the panel wasn't a flex column.::ng-deep .editor-wrapper { height: 100% !important }override. The new editor no longer renders an.editor-wrapperelement (the height moved onto.editor-scroll-container), so that override was dead CSS for it — and couldn't beat an inline[style]binding anyway.Fix
fillHeightinput (booleanAttribute, defaultfalse) toDotCMSEditorComponent. Whentrue::host(.dot-block-editor--fill-height)),flex flex-col,flex-1 min-h-0),flex: 1; min-height: 0instead of the fixed 500px — mirroring the existing fullscreen layout, so the toolbar buttons and the stats/word-count bar keep their natural height and the editing surface consumes the rest.dot-block-editor-sidebarpasses[fillHeight]="true"and its.containeris now a proper flex column (editor grows, footer keeps its natural height viaflex: 0 0 auto). No more magiccalc(100% - 4rem)..editor-wrapper::ng-deepoverride to the legacy editor only.Unchanged
fillHeightdefaults tofalse).Screenshots / Recording
This PR fixes: #36620
Checklist
dot-block-editor-sidebarspec to assertfillHeightis passed)new-block-editor,portlets-edit-ema-portlet)new-block-editor,dot-block-editor-sidebar)🤖 Generated with Claude Code