OCPBUGS-74156: Prevent pod log viewer from shifting page layout when searching#16193
OCPBUGS-74156: Prevent pod log viewer from shifting page layout when searching#16193sg00dwin wants to merge 1 commit intoopenshift:mainfrom
Conversation
Workaround for upstream PF LogViewer bug where scrollIntoView propagates to ancestor scroll containers when wrap lines is disabled Assisted by Claude code
|
@sg00dwin: This pull request references Jira Issue OCPBUGS-74156, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@sg00dwin: This pull request references Jira Issue OCPBUGS-74156, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (1)**⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThis change introduces a targeted CSS override in ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@sg00dwin: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhamilto, sg00dwin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |


Description:
When viewing pod logs with "Wrap lines" disabled, searching for a string causes the entire page content to shift left, and to be partially hidden behind the sidebar navigation.
Root Cause
This is an upstream PatternFly bug (react-log-viewer#106). PF LogViewer calls
scrollIntoView({ inline: 'center' })on search matches, which per the CSSOM View spec scrolls all scrollable ancestors — not just the log viewer's own container. PF Drawer setsoverflow: hiddenon.pf-v6-c-drawer__main, which still acts as a scroll container for programmatic scrolling, causing the entire page to shift.Fix
Override
overflow: hiddentooverflow: clipon.pf-v6-c-drawer__main, scoped within the parent#contentdiv. Theclipvalue has identical visual clipping but removes the element from being a scroll container entirely, soscrollIntoViewskips it. This prevents the page shift without affecting the log viewer's own horizontal scrolling.Verification
Assisted by Claude code
Before

After

Summary by CodeRabbit