Skip to content

fix: Prevent HelpPanel content from clipping at drawer bottom edge#4716

Open
TrevorBurnham wants to merge 1 commit into
cloudscape-design:mainfrom
TrevorBurnham:fix/help-panel-bottom-whitespace-applayout
Open

fix: Prevent HelpPanel content from clipping at drawer bottom edge#4716
TrevorBurnham wants to merge 1 commit into
cloudscape-design:mainfrom
TrevorBurnham:fix/help-panel-bottom-whitespace-applayout

Conversation

@TrevorBurnham

@TrevorBurnham TrevorBurnham commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Description

I noticed that when I scrolled to the bottom of a HelpPanel, there was no whitespace below the content.

The cause: HelpPanel reserved its bottom whitespace as margin-block-end on its last child. A descendant's block-end margin is not added to an ancestor scroll container's scrollable region, so when the panel renders inside a fixed-height, scrollable app-layout drawer, that trailing margin is clipped and content sits flush against the bottom edge.

This fix reserves the space as padding-block-end on the panel root instead. An element's own padding is included in the scroll extent, so the whitespace renders consistently regardless of the wrapping container.

How has this been tested?

  • Existing HelpPanel unit tests pass (6/6); app-layout unit suite passes (1563 tests, 38 suites, 10 snapshots).
  • Manually verified in the dev server (app-layout/default).

Before

Screenshot 2026-07-11 at 5 10 12 PM

After

Screenshot 2026-07-11 at 5 09 06 PM

HelpPanel reserved its bottom whitespace as margin-block-end on its last
child. A descendant's block-end margin is not added to an ancestor scroll
container's scrollable region, so when the panel renders inside a
fixed-height, scrollable app-layout drawer, the trailing margin was clipped
and content sat flush against the bottom edge.

Reserve the space as padding-block-end on the panel root instead, which is
included in the scroll extent and renders consistently across all app-layout
drawer implementations.
@TrevorBurnham TrevorBurnham requested a review from a team as a code owner July 11, 2026 21:27
@TrevorBurnham TrevorBurnham requested review from georgylobko and removed request for a team July 11, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant