Skip to content

fix(compass): add opt-out for small screen warning#8153

Merged
mcoker merged 1 commit into
patternfly:mainfrom
mcoker:issue-8151
Feb 19, 2026
Merged

fix(compass): add opt-out for small screen warning#8153
mcoker merged 1 commit into
patternfly:mainfrom
mcoker:issue-8151

Conversation

@mcoker

@mcoker mcoker commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

fixes #8151

Summary by CodeRabbit

  • New Features

    • Added a new modifier option to the compass component, enabling customization of behavior on smaller viewports and improving responsive layout handling.
  • Documentation

    • Updated component documentation with usage details for the new modifier.

@mcoker mcoker requested a review from mattnolting February 18, 2026 21:06
@coderabbitai

coderabbitai Bot commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The Compass component now supports an opt-out modifier class (.pf-m-no-screen-warning) that allows the layout to remain functional on smaller screens by conditionally disabling the responsive view warning. The SCSS rule set was updated to check for this modifier before applying narrow-screen hiding behavior.

Changes

Cohort / File(s) Summary
Compass SCSS Logic
src/patternfly/components/Compass/compass.scss
Modified narrow-screen media query to conditionally apply hiding using :not(.pf-m-no-screen-warning) selector, allowing the compass layout to function on smaller viewports when the opt-out modifier is present. Added visible overlay message block for narrow screens.
Compass Documentation
src/patternfly/components/Compass/examples/Compass.md
Added documentation entry for the new .pf-m-no-screen-warning modifier in the usage table, describing its role in disabling the screen warning on smaller viewports.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • kmcfaul
🚥 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 The PR title follows conventional commit format (fix: scope) and accurately describes the main change of adding an opt-out mechanism for the small screen warning.
Linked Issues check ✅ Passed The PR successfully implements the opt-out mechanism requested in #8151 by introducing the pf-m-no-screen-warning modifier that allows users to disable the responsive behavior on smaller screens.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing the requested opt-out feature: SCSS conditional logic for the modifier, documentation of the new modifier, and no extraneous 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.

@coderabbitai coderabbitai Bot requested a review from kmcfaul February 18, 2026 21:07
@patternfly-build

patternfly-build commented Feb 18, 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/patternfly/components/Compass/compass.scss (1)

337-338: 🧹 Nitpick | 🔵 Trivial

Optional: remove dead width: 80% declaration.

width: 80%; is immediately overridden by width: 300px; on the following line. The first declaration is never applied.

♻️ Proposed fix
-      width: 80%;
       width: 300px;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/patternfly/components/Compass/compass.scss` around lines 337 - 338,
Remove the redundant width declaration by deleting the earlier "width: 80%;"
line in the CSS rule that also contains "width: 300px;" (the block around the
Compass component in compass.scss), leaving only "width: 300px;" so the rule is
not shadowed by a dead property.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/patternfly/components/Compass/compass.scss`:
- Around line 337-338: Remove the redundant width declaration by deleting the
earlier "width: 80%;" line in the CSS rule that also contains "width: 300px;"
(the block around the Compass component in compass.scss), leaving only "width:
300px;" so the rule is not shadowed by a dead property.

@mattnolting mattnolting left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LPTM 👍

@mcoker mcoker merged commit c6c8cd4 into patternfly:main Feb 19, 2026
5 checks passed
@mcoker mcoker deleted the issue-8151 branch February 19, 2026 15:50
@patternfly-build

Copy link
Copy Markdown
Collaborator

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

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.

Compass - add an opt-out for the responsive view

3 participants