-
Notifications
You must be signed in to change notification settings - Fork 667
OCPBUGS-65812: Layout issue on YAML editor settings popup window #15753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify responsive behavior on narrow viewports.
The
flexWrap: 'nowrap'inline style fixes the reported layout issue by preventing the icon and text from wrapping. However, on narrow viewports or small screens, this could cause horizontal overflow if the description text is lengthy.Please test the modal on various screen sizes (mobile, tablet) to ensure the content doesn't overflow or cause horizontal scrolling. Consider whether the modal needs a minimum width or if text truncation with ellipsis would be a better fallback for very narrow screens.
🏁 Script executed:
Length of output: 27
🏁 Script executed:
Length of output: 9266
🏁 Script executed:
Length of output: 57
🌐 Web query:
💡 Result:
Short answer: PatternFly's "small" modal is implemented as a responsive max-width, not a fixed pixel width. By default the modal box width is calc(100% - spacer) and each variant sets a max‑width; the small variant's max‑width is 35rem (so it will shrink on narrow viewports and center until it reaches that max). You can override with the Modal's width prop or by changing the --pf-c-modal-box--m-sm--sm--MaxWidth (or the general --pf-c-modal-box--MaxWidth) CSS variable. [1][2]
Sources:
🌐 Web query:
💡 Result:
Short answer — PatternFly supports responsive flex wrapping both in CSS classes and in the React Flex API.
CSS / utility approach: use the Flex layout classes and breakpoint modifiers (e.g. .pf-l-flex with modifier classes like .pf-m-column-on-lg, and related responsive modifiers) to control direction/wrapping at breakpoints. See the layout docs for examples and available breakpoint modifiers. [1]
React component approach: the Flex component exposes a flexWrap prop you can set responsively with breakpoint keys (default, sm, md, lg, xl, 2xl). Allowed values: 'wrap', 'wrapReverse', 'nowrap'. Example:
<Flex flexWrap={{ default: 'wrap', lg: 'nowrap' }}>...
This will apply wrap by default and switch to nowrap at the lg breakpoint. [2]
Sources:
[1] PatternFly Flex layout documentation (classes / responsive modifiers).
[2] PatternFly Flex component props (flexWrap API).
🌐 Web query:
💡 Result:
Short answer — Split doesn't automatically stack at narrow widths; use wrapping or a different layout.
References
Use PatternFly's responsive flexWrap API instead of inline style.
The
flexWrap: 'nowrap'inline style prevents responsive behavior. PatternFly Flex component supports responsive flexWrap through breakpoint keys (e.g.,flexWrap={{ default: 'wrap', lg: 'nowrap' }}), which would allow text to wrap on small screens and prevent wrapping only on larger viewports.Change:
To:
This ensures the modal content adapts properly on mobile devices while maintaining the horizontal layout on desktop screens.
🤖 Prompt for AI Agents