CONSOLE-5049: Migrate cluster and toleration modals to useOverlay hook#15997
CONSOLE-5049: Migrate cluster and toleration modals to useOverlay hook#15997sg00dwin wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
@sg00dwin: This pull request references CONSOLE-5049 which is a valid jira issue. 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. |
|
@sg00dwin: This pull request references CONSOLE-5049 which is a valid jira issue. 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. |
📝 WalkthroughWalkthroughThis pull request refactors the modal launching architecture across OpenShift Console's cluster settings and tolerations features. The change replaces the 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
eb29656 to
72c5716
Compare
72c5716 to
c3d5f2b
Compare
|
/assign @yanpzhan Tech debt, so assigning labels |
| ).then((m) => ({ default: m.ClonePVCModalOverlay })), | ||
| ); | ||
|
|
||
| // Lazy-loaded OverlayComponent for Cluster Channel Modal |
There was a problem hiding this comment.
Nit: keep the changes on the same line to make the diff easier to read.
Updates cluster-channel-modal, cluster-more-updates-modal, cluster-update-modal, and tolerations-modal from createModalLauncher to the modern useOverlay pattern. Assisted by: Claude Code
c3d5f2b to
c6b1f47
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sg00dwin The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@sg00dwin: The following tests failed, say
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. |
|
We need to remove |
|
PR needs rebase. 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. |
Migrates cluster settings and toleration modals from the deprecated
createModalLauncherpattern to the modernOverlayComponentpattern. This is part of CONSOLE-5012 to modernize modal handling across the console.Changes
Modals Migrated (4 total)
All modals now follow the
OverlayComponentpattern with consistent implementation:ClusterChannelModal (
public/components/modals/cluster-channel-modal.tsx)ClusterChannelModalOverlay: OverlayComponentcreateModalLauncherusageTFunctionfrom propsClusterMoreUpdatesModal (
public/components/modals/cluster-more-updates-modal.tsx)ClusterMoreUpdatesModalOverlay: OverlayComponentcreateModalLauncherusageClusterUpdateModal (
public/components/modals/cluster-update-modal.tsx)ClusterUpdateModalOverlay: OverlayComponentcreateModalLauncherusageTolerationsModal (
public/components/modals/tolerations-modal.tsx)TolerationsModalOverlay: OverlayComponentcreateModalLauncherusagemodalClassNameprop support for modal sizingUpdated to Use New Overlay Modals
Replaced direct modal function calls with
useOverlay():cluster-settings.tsx: Updated 5 call sitesCurrentChannelcomponent: Changed fromclusterChannelModal({ cv })tolaunchModal(ClusterChannelModalOverlay, { cv })UpdateLinkcomponent: Changed fromclusterUpdateModal({ cv })tolaunchModal(ClusterUpdateModalOverlay, { cv })UpdatesGraphcomponent: Changed fromclusterMoreUpdatesModal({ cv })tolaunchModal(ClusterMoreUpdatesModalOverlay, { cv })ClusterVersionDetailsTablecomponent: Converted URL query parameter handling from promise-based touseEffectwith immediate cleanupuseCommonActions.ts: Updated 1 call sitetolerationsModal({ ... })tolaunchModal(TolerationsModalOverlay, { ... })tolerationsModalreferenceReact Hooks Dependency Array Updates
Added
launchModalto dependency arrays where used:cluster-settings.tsx: AddedlaunchModalandcvtouseEffectdependency array for URL query parameter handlingNote: While
launchModalfromuseOverlay()is referentially stable, it's included in dependency arrays for correctness and to satisfy exhaustive-deps linting rules.Barrel Exports Removed
Removed deprecated modal function exports from
public/components/modals/index.ts:clusterChannelModalexportclusterMoreUpdatesModalexportclusterUpdateModalexporttolerationsModalexportNaming Convention
All modal components use named exports following team standards:
ClusterChannelModalOverlay,ClusterMoreUpdatesModalOverlay,ClusterUpdateModalOverlay,TolerationsModalOverlayRelated
Assisted-by: Claude Code
Summary by CodeRabbit