Skip to content

Comments

ROX-31773: Fix network graph selectors and layout for PF6#19165

Draft
sachaudh wants to merge 5 commits intodv/ROX-28622-pf-6from
sc/ROX-31773
Draft

ROX-31773: Fix network graph selectors and layout for PF6#19165
sachaudh wants to merge 5 commits intodv/ROX-28622-pf-6from
sc/ROX-31773

Conversation

@sachaudh
Copy link
Contributor

@sachaudh sachaudh commented Feb 24, 2026

Description

Fixes several PF6 migration issues on the Network Graph page:

  • Migrate selectors from nested Menu to PF6 Select: DeploymentSelector and NamespaceSelector were using the PF5 pattern of nesting a Menu component inside Select. Replaced Menu/MenuItem/MenuGroup/MenuList with PF6's SelectOption/SelectGroup/SelectList and moved onSelect/selected props to the Select component.
  • Fix display options dropdown closing on click: Added appendTo: 'inline' to keep the dropdown in the toolbar's stacking context, preventing the blur handler from closing it immediately.
  • Fix page layout and toolbar spacing: Used pf-v6-u-pb-0 instead of noPadding for toolbar sections, added isFilled to the graph section so it fills the viewport, vertically centered the display options toggle, and offset the topology control bar to prevent clipping.
  • Remove stale PF5 CSS import: Removed DisplayOptionsSelect.css which targeted PF5 class names.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a
    feature flag
  • CI results are inspected

Automated testing

  • no automated tests added - PF6 component migration with no behavioral changes

How I validated my change

  • Manually tested namespace/deployment selectors with search, multi-select, and clear
  • Verified display options dropdown stays open on checkbox click
  • Confirmed topology graph fills viewport and control bar is visible
  • TypeScript and ESLint pass
Screen.Recording.2026-02-24.at.12.47.01.PM.mov

Replace the anti-pattern of nesting a Menu component inside a Select
with proper PF6 Select children (SelectList, SelectOption, SelectGroup).
This resolves click-handling and rendering issues caused by having two
competing menu components managing state.

Both DeploymentSelector and NamespaceSelector follow the same migration:
- Menu/MenuItem/MenuList -> Select/SelectOption/SelectList
- MenuGroup -> SelectGroup
- Search input wrapped in MenuSearch/MenuSearchInput
- onSelect and selected props moved from Menu to Select

Partially generated by AI

Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>
Remove unused CSS import and add appendTo: 'inline' to prevent the
dropdown from closing when clicking options. The CSS override is no
longer needed since PF6 handles icon alignment natively.

Partially generated by AI

Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>
Address several PF6 layout regressions on the network graph page:
- Use isFilled on the graph PageSection so it expands to fill the
  remaining viewport height
- Replace padding={{ default: 'noPadding' }} with pf-v6-u-pb-0 on
  toolbar sections to restore balanced spacing
- Vertically center the display options toggle with align-self-center
- Offset the topology control bar with a bottom spacer to prevent
  clipping by the visualization surface overflow

Partially generated by AI

Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Feb 24, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@sachaudh sachaudh changed the title Sc/rox 31773 ROX-31773: Fix network graph selectors and layout for PF6 Feb 24, 2026
Add explicit types to onSelect handlers, replace .filter(Boolean) with
a proper type guard, remove redundant .toString() calls, drop inline
styles for text alignment, delete orphaned PF5 CSS file, and
standardize PageSection padding to use utility classes.

AI-assisted

Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>
Align DeploymentSelector with NamespaceSelector by using PF6
MenuSearch/MenuSearchInput instead of a plain div wrapper.

AI-assisted

Signed-off-by: Saif Chaudhry <schaudhr@redhat.com>
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.52%. Comparing base (de1e05a) to head (b16db1d).
⚠️ Report is 1 commits behind head on dv/ROX-28622-pf-6.

Additional details and impacted files
@@                Coverage Diff                 @@
##           dv/ROX-28622-pf-6   #19165   +/-   ##
==================================================
  Coverage              49.52%   49.52%           
==================================================
  Files                   2666     2666           
  Lines                 201181   201181           
==================================================
  Hits                   99632    99632           
+ Misses                 94113    94112    -1     
- Partials                7436     7437    +1     
Flag Coverage Δ
go-unit-tests 49.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant