Skip to content

fix(drawer): prevent pill inline drawer from extending beyond viewport - #8386

Merged
mcoker merged 3 commits into
patternfly:mainfrom
jcmill:fix/8351-pill-drawer-gaps
May 13, 2026
Merged

fix(drawer): prevent pill inline drawer from extending beyond viewport#8386
mcoker merged 3 commits into
patternfly:mainfrom
jcmill:fix/8351-pill-drawer-gaps

Conversation

@jcmill

@jcmill jcmill commented May 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #8351

The pill inline drawer was extending below the browser window due to gap spacing on __main being added to the 100% container height. Defaulted gap to 0 and managed it in expanded. Use padding-block-end to allow for pill shadows instead of gap for pill + inline variants, keeping the inset spacing internal to the container height.

Summary by CodeRabbit

  • Style
    • Adjusted inline pill spacing for the Drawer root to remove default inline gap.
    • Restored intended inline spacing for the expanded Drawer so pill items align with the page chrome inset.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: fe65c196-c859-47d9-9ecd-8718e7a25263

📥 Commits

Reviewing files that changed from the base of the PR and between 6676da4 and 7774b38.

📒 Files selected for processing (1)
  • src/patternfly/components/Drawer/drawer.scss
✅ Files skipped from review due to trivial changes (1)
  • src/patternfly/components/Drawer/drawer.scss

Walkthrough

Set drawer pill-inline main gap default to 0 and add an override in .pf-m-expanded to restore the page-chrome inset spacer token.

Changes

Pill Inline Drawer Gap

Layer / File(s) Summary
Root default gap
src/patternfly/components/Drawer/drawer.scss
Set pill-inline --#{$drawer}--m-pill--m-inline__main--Gap to 0 at the drawer root.
Expanded-state gap override
src/patternfly/components/Drawer/drawer.scss
In .pf-m-expanded, override pill-inline --#{$drawer}--m-pill--m-inline__main--Gap to --pf-t--global--spacer--inset--page-chrome.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

released on @prerelease``

Suggested reviewers

  • mcoker
  • lboehling
  • thatblindgeye
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title follows conventional commit format with 'fix' type and clearly describes the main change of preventing pill inline drawer from extending beyond viewport.
Linked Issues check ✅ Passed Changes address all objectives from #8351: removes gap for collapsed drawer, prevents viewport overflow, and manages spacing with padding-block-end for expanded state.
Out of Scope Changes check ✅ Passed Only SCSS changes to drawer.scss are present, all directly addressing the gap spacing issue in #8351 with no unrelated modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@patternfly-build

patternfly-build commented May 8, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/patternfly/components/Drawer/drawer.scss (1)

9-11: 💤 Low value

Rename --PaddingBlock to --PaddingBlockEnd for accuracy.

The variable --#{$drawer}--m-pill--m-inline__main--PaddingBlock implies a shorthand covering both padding-block-start and padding-block-end, but it is only ever consumed by padding-block-end (line 368). The name will mislead future maintainers into thinking block-start is also covered.

🔧 Suggested rename
-  --#{$drawer}--m-pill--m-inline__main--PaddingBlock: 0;
+  --#{$drawer}--m-pill--m-inline__main--PaddingBlockEnd: 0;
-    --#{$drawer}--m-pill--m-inline__main--PaddingBlock: var(--pf-t--global--spacer--inset--page-chrome);
+    --#{$drawer}--m-pill--m-inline__main--PaddingBlockEnd: var(--pf-t--global--spacer--inset--page-chrome);
-          padding-block-end: var(--#{$drawer}--m-pill--m-inline__main--PaddingBlock);
+          padding-block-end: var(--#{$drawer}--m-pill--m-inline__main--PaddingBlockEnd);

Also applies to: 298-299, 368-368

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/patternfly/components/Drawer/drawer.scss` around lines 9 - 11, The CSS
custom property --#{$drawer}--m-pill--m-inline__main--PaddingBlock is misleading
because it's only used for padding-block-end; rename the declaration to
--#{$drawer}--m-pill--m-inline__main--PaddingBlockEnd and update all usages
(notably the consumer in the padding-block-end rule and the other
declaration/uses in the same SCSS around the other occurrences) to the new name
so that intent is accurate and no references remain to the old --PaddingBlock
variable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/patternfly/components/Drawer/drawer.scss`:
- Around line 9-11: The CSS custom property
--#{$drawer}--m-pill--m-inline__main--PaddingBlock is misleading because it's
only used for padding-block-end; rename the declaration to
--#{$drawer}--m-pill--m-inline__main--PaddingBlockEnd and update all usages
(notably the consumer in the padding-block-end rule and the other
declaration/uses in the same SCSS around the other occurrences) to the new name
so that intent is accurate and no references remain to the old --PaddingBlock
variable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: cfa3971b-49c2-4c2a-bd5a-662eb1af8d39

📥 Commits

Reviewing files that changed from the base of the PR and between 5882641 and b9c0d6d.

📒 Files selected for processing (1)
  • src/patternfly/components/Drawer/drawer.scss

@mcoker
mcoker merged commit 483d833 into patternfly:main May 13, 2026
5 checks passed
@patternfly-build

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 6.5.0-prerelease.90 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug - Drawer - gap with collapsed pill drawer

3 participants