Skip to content

MGMT-21745: Remove deprecated PF5 components from OCM code#3213

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift-assisted:masterfrom
jgyselov:pf6_upgrade_modal_component
Oct 13, 2025
Merged

MGMT-21745: Remove deprecated PF5 components from OCM code#3213
openshift-merge-bot[bot] merged 1 commit intoopenshift-assisted:masterfrom
jgyselov:pf6_upgrade_modal_component

Conversation

@jgyselov
Copy link
Contributor

@jgyselov jgyselov commented Oct 13, 2025

https://issues.redhat.com/browse/MGMT-21745

Upgraded the Modal components in /common and /ocm. (We will do another PR for /cim once we can test PF6 in there.)

Summary by CodeRabbit

  • Refactor

    • Modernized modal structure across the app for consistent header/body/footer layout.
  • Style

    • More uniform titles, icons, and action placement for improved visual consistency and accessibility.
  • Bug Fixes

    • Standardized close, disabled, and loading behaviors to reduce dialog inconsistencies.
  • Chores

    • Updated dialogs to align with current design system patterns while preserving existing behavior.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 13, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 13, 2025

@jgyselov: This pull request references MGMT-21745 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

Details

In response to this:

https://issues.redhat.com/browse/MGMT-21745

Upgraded the Modal components in /common and /ocm. (We will do another PR for /cim once we can test PF6 in there.)

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.

@openshift-ci openshift-ci bot requested review from ammont82 and batzionb October 13, 2025 08:03
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 13, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 13, 2025

Walkthrough

PatternFly modal usages were migrated from deprecated APIs to the composed ModalHeader/ModalBody/ModalFooter pattern across many components; titles moved into ModalHeader, some modals disable built-in close via onClose={undefined}, and a small fragment removal occurred.

Changes

Cohort / File(s) Summary of changes
Cluster configuration modals
libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx, libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.tsx, libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIpxeScript.tsx, libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIso.tsx, libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIsoModal.tsx, libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx, libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx, libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/DeleteCustomManifestModal.tsx
Replaced deprecated PatternFly modal API (ModalBoxBody/ModalBoxFooter or old Modal props) with composed ModalHeader/ModalBody/ModalFooter; updated imports; moved titles into headers; minor layout tweaks (Flex in OCM form); preserved logic.
Hosts modals and dialogs
libs/ui-lib/lib/common/components/hosts/AdditionalNTPSourcesDialog.tsx, libs/ui-lib/lib/common/components/hosts/EditHostForm.tsx, libs/ui-lib/lib/common/components/hosts/EditHostModal.tsx, libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx, libs/ui-lib/lib/common/components/hosts/MassDeleteHostModal.tsx, libs/ui-lib/lib/ocm/components/hosts/DeleteHostModal.tsx, libs/ui-lib/lib/ocm/components/hosts/ResetHostModal.tsx, libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipForm.tsx, libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipModal.tsx, libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/BondsConfirmationModal.tsx
Migrated to ModalHeader/ModalBody/ModalFooter; removed deprecated ModalBox* and deprecated Modal props; moved title rendering to header; kept handlers and validation unchanged.
Cluster detail and cluster-level modals
libs/ui-lib/lib/common/components/clusterDetail/ConsoleModal.tsx, libs/ui-lib/lib/ocm/components/clusterDetail/CancelInstallationModal.tsx, libs/ui-lib/lib/ocm/components/clusterDetail/ClusterPollingErrorModal.tsx, libs/ui-lib/lib/ocm/components/clusterDetail/ClusterUpdateErrorModal.tsx, libs/ui-lib/lib/ocm/components/clusterDetail/ResetClusterModal.tsx, libs/ui-lib/lib/ocm/components/clusters/DeleteClusterModal.tsx
Replaced deprecated modal usage with composed header/body/footer; removed actions arrays and title props; some modals set onClose={undefined} to retain previous close behavior; content and button behavior preserved.
UI generic components
libs/ui-lib/lib/common/components/ui/ConfirmationModal.tsx, libs/ui-lib/lib/common/components/ui/OpenShiftVersionModal.tsx, libs/ui-lib/lib/common/components/ui/eventsModal.tsx, libs/ui-lib/lib/ocm/components/ui/InfoLinkWithModal.tsx, libs/ui-lib/lib/common/components/ui/formik/AlertFormikError.tsx
General modal refactor to ModalHeader/ModalBody/ModalFooter; ConfirmationModal updated prop types and gained onClose/onConfirm; dropped actions arrays; removed unnecessary fragment in AlertFormikError.
Day2 wizard container
libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2Wizard.tsx
Consolidated imports (WizardHeader from core), removed showClose/hasNoBodyWrapper, and set Modal onClose={undefined} while keeping header close handling.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Comp as React Component
  participant Modal as PatternFly Modal
  participant Header as ModalHeader
  participant Body as ModalBody
  participant Footer as ModalFooter

  User->>Comp: trigger open
  Comp->>Modal: render (isOpen=true, onClose may be set or undefined)
  Modal->>Header: render title/icon
  Modal->>Body: render content/form
  Modal->>Footer: render action buttons

  User->>Header: click close
  alt Header has onClose
    Header->>Comp: onClose() -> Comp handles close
  else
    Header--xUser: close disabled (onClose undefined)
  end

  User->>Footer: click action
  Footer->>Comp: run handler (confirm/cancel) -> Comp may set isOpen=false
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

lgtm, size/XXL

Suggested reviewers

  • ammont82
  • batzionb

Poem

I hopped through headers, bodies, too,
Swapped old boxes for a clearer view.
Footers cradled buttons, titles found their spot,
Code neat and tidy — a rabbit says, "Hot!" 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title includes the JIRA reference and correctly highlights the removal of deprecated PF5 components, which is a central theme of the PR. It does, however, limit the scope to OCM code even though common components are also updated. Despite this minor scope mismatch, it still accurately describes a key aspect of the changes.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@jgyselov
Copy link
Contributor Author

/cherry-pick releases/v2.46

@openshift-cherrypick-robot
Copy link
Contributor

@jgyselov: once the present PR merges, I will cherry-pick it on top of releases/v2.46 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick releases/v2.46

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 kubernetes-sigs/prow repository.

@openshift-ci openshift-ci bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 13, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 13, 2025

@jgyselov: This pull request references MGMT-21745 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

Details

In response to this:

https://issues.redhat.com/browse/MGMT-21745

Upgraded the Modal components in /common and /ocm. (We will do another PR for /cim once we can test PF6 in there.)

Summary by CodeRabbit

  • New Features
  • More consistent modal headers, bodies, and footers across the app for a clearer, unified experience.
  • Refactor
  • Migrated all dialogs to the latest PatternFly modal structure, replacing deprecated components without changing behavior.
  • Style
  • Improved visual consistency and accessibility of modals, with clearer titles and action placement.
  • Bug Fixes
  • Standardized close and loading controls within modals to reduce UI inconsistencies.
  • Chores
  • Updated internal modal implementations to align with current design system guidance.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (4)
libs/ui-lib/lib/ocm/components/hosts/DeleteHostModal.tsx (1)

24-24: Remove the deprecated title prop from Modal.

The title prop on line 24 is redundant with the ModalHeader title at line 29. In PatternFly 6, the title should only be specified in ModalHeader, not on the Modal component itself.

Apply this diff to remove the deprecated prop:

     <Modal
-      title={t('ai:Remove host?')}
       isOpen={isOpen}
       onClose={onClose}
       variant={ModalVariant.small}
libs/ui-lib/lib/ocm/components/ui/InfoLinkWithModal.tsx (1)

52-58: Remove the deprecated title prop from Modal.

In PatternFly 6, the title prop on the Modal component is deprecated. The title should only be specified in ModalHeader (line 59), not on the Modal itself (line 53).

Apply this diff to remove the deprecated prop:

 <Modal
-  title={modalTitle}
   id={modalId}
   isOpen={isModalOpen}
   onClose={handleModalClose}
   variant={modalVariant}
 >
libs/ui-lib/lib/common/components/ui/OpenShiftVersionModal.tsx (1)

31-31: Remove or translate Spanish comment.

The comment // Cambiar el tipo según lo que esperes aquí ("Change the type according to what you expect here") should be removed if no longer relevant, or translated to English for consistency with the codebase.

Apply this diff to remove the comment:

-  const [customOpenshiftSelect, setCustomOpenshiftSelect] = useState<OpenshiftVersionOptionType>(); // Cambiar el tipo según lo que esperes aquí
+  const [customOpenshiftSelect, setCustomOpenshiftSelect] = useState<OpenshiftVersionOptionType>();
libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipForm.tsx (1)

93-104: Migrate all remaining deprecated PF5 modal components
Multiple files under libs/ui-lib/lib/cim/components/... still import and use ModalBoxBody and ModalBoxFooter from @patternfly/react-core/deprecated. Replace these with the new ModalBody and ModalFooter components (and ensure no ModalBoxHeader usages remain) to complete the Modal upgrade.

🧹 Nitpick comments (7)
libs/ui-lib/lib/ocm/components/ui/InfoLinkWithModal.tsx (1)

59-59: Consider adding onClose to ModalHeader for the header close button.

The typical PatternFly 6 modal pattern includes the onClose prop on ModalHeader to render the X button in the header. Currently, only the footer Close button is available.

Apply this diff to add the header close button:

-<ModalHeader title={modalTitle} />
+<ModalHeader title={modalTitle} onClose={handleModalClose} />
libs/ui-lib/lib/ocm/components/clusterDetail/CancelInstallationModal.tsx (2)

54-59: Consider simplifying the nested Content components.

The outer Content wrapper is redundant since it only wraps a single Content component="p". You can simplify this to just the inner element.

Apply this diff:

-    return (
-      <Content>
-        <Content component="p">
-          This will abort cluster installation. Are you sure you want to proceed?
-        </Content>
-      </Content>
-    );
+    return (
+      <Content component="p">
+        This will abort cluster installation. Are you sure you want to proceed?
+      </Content>
+    );

67-84: Optional: Remove unnecessary key props from buttons.

The key props on the Button components (lines 68 and 78) were useful when buttons were passed in an actions array in the old PF5 pattern. Since the buttons are now standalone JSX elements in the ModalFooter, the keys are no longer necessary and can be removed.

Apply this diff:

       <Button
-        key="submit"
         variant={ButtonVariant.danger}
         onClick={() => {
           void handleSubmit();
         }}
         isDisabled={isSubmitting}
       >
         Abort installation
       </Button>
       <Button
-        key="cancel"
         variant={ButtonVariant.link}
         onClick={onClose}
         isDisabled={isSubmitting}
       >
         Cancel
       </Button>
libs/ui-lib/lib/ocm/components/hosts/ResetHostModal.tsx (1)

22-22: Consider improving the hostname interpolation for better UX.

The current pattern produces a double space when hostname is empty: "Are you sure you want to reset host ?". Consider refactoring for cleaner output.

-    <ModalBody>Are you sure you want to reset host{` ${hostname || ''}`} ?</ModalBody>
+    <ModalBody>
+      Are you sure you want to reset {hostname ? `host ${hostname}` : 'this host'}?
+    </ModalBody>
libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx (2)

105-118: Use ModalBody and avoid duplicate labeling; consider dropping tabIndex

With ModalHeader present, prefer wrapping content in ModalBody for correct spacing/scroll behavior. Also, aria-label is redundant when a title is provided (can cause double-announcement). tabIndex={0} on the container is typically unnecessary with PatternFly’s focus trap.

Suggested update:

  • Remove aria-label and tabIndex.
  • Wrap content in ModalBody.

Based on learnings

   return (
     <Modal
-      aria-label="Add hosts dialog"
       isOpen={isOpen}
       onClose={close}
       variant={ModalVariant.small}
       id="generate-discovery-iso-modal"
       ouiaId="discovery-image-modal"
-      tabIndex={0}
     >
       <ModalHeader
         data-testid="discovery-modal-title"
         title={`Add ${pluralize(+isSNOCluster, 'host')}`}
       />
-      {(isoDownloadError || ipxeDownloadError) && <ErrorState />}
-      {isoDownloadUrl ? (
-        <DownloadIso
-          fileName={`discovery_image_${cluster.name || ''}.iso`}
-          downloadUrl={isoDownloadUrl}
-          isSNO={isSNOCluster}
-          onReset={onReset}
-          onClose={close}
-          updateTagsForCiscoIntersight={() => void updateTagsForCiscoIntersight(cluster)}
-        />
-      ) : ipxeDownloadUrl ? (
-        <DownloadIpxeScript
-          fileName={`discovery_ipxe_script_${cluster.name || ''}.txt`}
-          downloadUrl={ipxeDownloadUrl}
-          isSNO={isSNOCluster}
-          onReset={onResetIpxe}
-          onClose={close}
-        />
-      ) : (
-        <DiscoveryImageForm
-          cluster={cluster}
-          onCancel={close}
-          onSuccess={onImageReady}
-          cpuArchitecture={CpuArchitecture.USE_DAY1_ARCHITECTURE}
-          onSuccessIpxe={onImageIpxeReady}
-          isIpxeSelected={isIpxeSelected}
-        />
-      )}
+      <ModalBody>
+        {(isoDownloadError || ipxeDownloadError) && <ErrorState />}
+        {isoDownloadUrl ? (
+          <DownloadIso
+            fileName={`discovery_image_${cluster.name || ''}.iso`}
+            downloadUrl={isoDownloadUrl}
+            isSNO={isSNOCluster}
+            onReset={onReset}
+            onClose={close}
+            updateTagsForCiscoIntersight={() => void updateTagsForCiscoIntersight(cluster)}
+          />
+        ) : ipxeDownloadUrl ? (
+          <DownloadIpxeScript
+            fileName={`discovery_ipxe_script_${cluster.name || ''}.txt`}
+            downloadUrl={ipxeDownloadUrl}
+            isSNO={isSNOCluster}
+            onReset={onResetIpxe}
+            onClose={close}
+          />
+        ) : (
+          <DiscoveryImageForm
+            cluster={cluster}
+            onCancel={close}
+            onSuccess={onImageReady}
+            cpuArchitecture={CpuArchitecture.USE_DAY1_ARCHITECTURE}
+            onSuccessIpxe={onImageIpxeReady}
+            isIpxeSelected={isIpxeSelected}
+          />
+        )}
+      </ModalBody>
     </Modal>
   );

2-2: Import ModalBody if adopting composed body

Add ModalBody to the PatternFly import.

-import { Button, ButtonVariant, Modal, ModalHeader, ModalVariant } from '@patternfly/react-core';
+import { Button, ButtonVariant, Modal, ModalHeader, ModalBody, ModalVariant } from '@patternfly/react-core';
libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.tsx (1)

239-241: Remove unnecessary React key on single Button

key is only needed for lists.

-        <Button key="close" variant={ButtonVariant.primary} onClick={onClose}>
+        <Button variant={ButtonVariant.primary} onClick={onClose}>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8a9cd1f and 357ff74.

📒 Files selected for processing (30)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx (4 hunks)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIpxeScript.tsx (4 hunks)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIso.tsx (4 hunks)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIsoModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/clusterDetail/ConsoleModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/hosts/AdditionalNTPSourcesDialog.tsx (5 hunks)
  • libs/ui-lib/lib/common/components/hosts/EditHostForm.tsx (4 hunks)
  • libs/ui-lib/lib/common/components/hosts/EditHostModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx (5 hunks)
  • libs/ui-lib/lib/common/components/hosts/MassDeleteHostModal.tsx (3 hunks)
  • libs/ui-lib/lib/common/components/ui/ConfirmationModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/ui/OpenShiftVersionModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/ui/eventsModal.tsx (3 hunks)
  • libs/ui-lib/lib/common/components/ui/formik/AlertFormikError.tsx (1 hunks)
  • libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2Wizard.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx (3 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/DeleteCustomManifestModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/BondsConfirmationModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterDetail/CancelInstallationModal.tsx (3 hunks)
  • libs/ui-lib/lib/ocm/components/clusterDetail/ClusterPollingErrorModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterDetail/ClusterUpdateErrorModal.tsx (1 hunks)
  • libs/ui-lib/lib/ocm/components/clusterDetail/ResetClusterModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusters/DeleteClusterModal.tsx (3 hunks)
  • libs/ui-lib/lib/ocm/components/hosts/DeleteHostModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/hosts/ResetHostModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipForm.tsx (4 hunks)
  • libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/ui/InfoLinkWithModal.tsx (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
libs/ui-lib/lib/common/components/ui/OpenShiftVersionModal.tsx (1)
libs/ui-lib/lib/common/components/ui/OpenShiftSelectWithSearch.tsx (1)
  • OpenShiftSelectWithSearch (29-294)
libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx (1)
libs/ui-lib/lib/common/components/ui/formik/AlertFormikError.tsx (1)
  • AlertFormikError (10-26)
libs/ui-lib/lib/common/components/ui/formik/AlertFormikError.tsx (1)
libs/ui-lib-tests/cypress/views/reusableComponents/Alert.ts (1)
  • Alert (1-20)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: tests
  • GitHub Check: translation-files
  • GitHub Check: unit-tests
  • GitHub Check: circular-deps
  • GitHub Check: format
  • GitHub Check: lint
🔇 Additional comments (40)
libs/ui-lib/lib/common/components/ui/formik/AlertFormikError.tsx (1)

17-24: LGTM! Clean simplification.

Removing the unnecessary fragment wrapper is a good improvement. The Alert component can be returned directly without affecting functionality.

libs/ui-lib/lib/ocm/components/hosts/DeleteHostModal.tsx (2)

2-10: LGTM! Imports correctly updated for PF6 modal structure.

The addition of ModalBody, ModalFooter, ModalHeader, and ModalVariant aligns with the PatternFly 6 composed modal pattern.


29-45: LGTM! Modal structure correctly migrated to PF6 composition.

The use of ModalHeader, ModalBody, and ModalFooter follows PatternFly 6 best practices. The titleIconVariant="warning" is appropriate for a destructive action, and all handlers and translations are preserved correctly.

libs/ui-lib/lib/ocm/components/clusterDetail/ResetClusterModal.tsx (2)

3-12: LGTM! Correct imports for PatternFly 6 modal composition.

The new imports for ModalBody, ModalFooter, and ModalHeader are necessary for the PF6 modal structure.


121-125: LGTM! Modal successfully migrated to PatternFly 6 composed structure.

The modal correctly uses the new composed structure with ModalHeader, ModalBody, and ModalFooter subcomponents. The title is properly moved to ModalHeader, content wrapped in ModalBody, and actions in ModalFooter. The onClose handler remains at the Modal level as expected.

libs/ui-lib/lib/ocm/components/ui/InfoLinkWithModal.tsx (1)

2-11: LGTM! Well-structured PatternFly 6 modal migration.

The migration from PatternFly 5 to the new composed modal structure is well-executed. The use of ModalHeader, ModalBody, and ModalFooter follows PatternFly 6 best practices for modal composition.

Also applies to: 59-71

libs/ui-lib/lib/common/components/ui/OpenShiftVersionModal.tsx (2)

2-11: LGTM! Correct PF6 imports.

The addition of ModalBody, ModalFooter, and ModalHeader imports aligns with the PatternFly 6 modal composition pattern, replacing the deprecated props-based approach.


41-70: LGTM! Correct PF6 modal composition.

The modal structure correctly implements the PatternFly 6 composition pattern:

  • ModalHeader with title replaces the deprecated title prop
  • ModalBody wraps the form content
  • ModalFooter wraps the action buttons
  • Core modal behavior (isOpen, onClose, variant) remains on the Modal component

The migration preserves all functionality while following PF6 best practices.

libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2Wizard.tsx (2)

2-2: LGTM: Clean import consolidation.

Consolidating the WizardHeader import with Modal and ModalVariant improves code organization.


42-42: Verify that disabling default Modal close behaviors is intentional.

Setting onClose={undefined} disables the Modal's built-in close mechanisms (ESC key and backdrop click). Users can now only close the wizard via the header's close button (line 49).

For a multi-step wizard with potentially unsaved state, this might be an intentional UX choice to prevent accidental closure mid-flow. However, this deviates from standard modal patterns and may frustrate users expecting ESC-key or backdrop-click to work.

Please confirm:

  1. Is this UX behavior intentional for wizard modals?
  2. Are there any in-progress state checks or unsaved work warnings that justify removing these standard close mechanisms?
  3. Does this align with the application's accessibility and UX guidelines?
libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/BondsConfirmationModal.tsx (2)

2-11: LGTM! Clean import migration to PF6 Modal components.

The imports are correctly updated to include the PatternFly 6 composed Modal components (ModalBody, ModalFooter, ModalHeader), which replace the deprecated PF5 pattern.


32-45: LGTM! Proper migration to PF6 composed Modal structure.

The Modal structure correctly migrates to PatternFly 6's composition pattern:

  • Title moved from Modal prop to ModalHeader component
  • Warning icon added via titleIconVariant="warning"
  • Content properly wrapped in ModalBody
  • Actions properly wrapped in ModalFooter
  • Accessibility preserved with existing aria-label

If you haven't already, please verify that the warning icon displays correctly with the titleIconVariant="warning" prop in the running application, as this confirms the API is correctly used for PF6.

libs/ui-lib/lib/ocm/components/clusterDetail/CancelInstallationModal.tsx (2)

3-12: LGTM! Imports correctly updated for PF6 Modal composition.

The addition of ModalBody, ModalFooter, and ModalHeader imports aligns with the PatternFly 6 composed Modal pattern, replacing the deprecated title and actions props from PF5.

Based on learnings


63-86: LGTM! Modal structure correctly migrated to PF6 pattern.

The migration from the deprecated PF5 Modal API to the composed PF6 pattern is done correctly:

  • ModalHeader with title prop provides the modal title with proper accessibility
  • ModalBody wraps the dynamic content (loading, error, or confirmation states)
  • ModalFooter contains the action buttons (previously in the actions array)
  • onClose handler remains properly wired to the Modal component

Based on learnings

libs/ui-lib/lib/ocm/components/hosts/ResetHostModal.tsx (1)

2-10: LGTM! Modal migration to PF6 correctly implemented.

The migration from PF5 deprecated Modal API to PF6 composed Modal structure is correct:

  • Imports include ModalBody, ModalFooter, and ModalHeader
  • Title moved to ModalHeader
  • Body content in ModalBody
  • Actions properly placed in ModalFooter
  • Destructive action (Reset) correctly uses ButtonVariant.danger

Also applies to: 20-36

libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx (1)

300-347: Modal composition migration looks solid

Line 307: Using ModalHeader/ModalBody/ModalFooter keeps the form actions and focus flow intact while aligning with PF6 APIs. ✅

libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx (3)

3-14: LGTM! Imports aligned with PatternFly 6 migration.

The addition of ModalBody, ModalFooter, Flex, and FlexItem imports correctly supports the migration from deprecated PF5 modal components to the new PF6 composition pattern.

Based on learnings


146-171: LGTM! Proper use of ModalBody component.

The migration from ModalBoxBody to ModalBody correctly follows PatternFly 6's modal composition pattern.

Based on learnings


186-207: LGTM! Footer actions properly structured.

The Flex-based layout correctly arranges the action buttons, with appropriate loading states, event handlers, and accessibility attributes.

libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipForm.tsx (2)

3-10: LGTM! Imports correctly updated for PatternFly 6.

The import statement has been properly updated to use the new ModalBody and ModalFooter components, which are the PatternFly 6 equivalents of the deprecated ModalBoxBody and ModalBoxFooter.


78-92: Correctly migrated to ModalBody.

The form content is properly wrapped with the new ModalBody component. The structure and content remain unchanged, ensuring backward compatibility.

libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipModal.tsx (1)

3-3: LGTM! Modal migration to PF6 composition.

The migration correctly moves the title from the Modal prop to a dedicated ModalHeader component, following the PatternFly 6 pattern.

Also applies to: 20-20

libs/ui-lib/lib/common/components/hosts/EditHostModal.tsx (1)

5-5: LGTM! Consistent modal migration.

The migration correctly updates the modal structure to use ModalHeader with the translated title, maintaining the existing functionality.

Also applies to: 40-40

libs/ui-lib/lib/common/components/hosts/EditHostForm.tsx (1)

10-11: LGTM! Deprecated components replaced correctly.

The migration from ModalBoxBody/ModalBoxFooter to ModalBody/ModalFooter is correct. The form structure and submission logic remain unchanged.

Also applies to: 108-158

libs/ui-lib/lib/common/components/ui/eventsModal.tsx (1)

2-11: LGTM! Complete modal restructuring to PF6.

The migration correctly transforms the modal from using an actions array to the composed ModalHeader/ModalBody/ModalFooter structure. The loading spinner remains visible in the header, and the close functionality is preserved in the footer.

Also applies to: 100-135

libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIpxeScript.tsx (1)

9-10: LGTM! Modal body and footer structure updated.

The migration correctly wraps the content in ModalBody and the action buttons in ModalFooter, maintaining all existing functionality.

Also applies to: 36-95

libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIso.tsx (1)

9-10: LGTM! Consistent modal structure migration.

The migration correctly restructures the modal with ModalBody and ModalFooter, preserving all alerts, instructions, and action buttons.

Also applies to: 52-136

libs/ui-lib/lib/ocm/components/clusterDetail/ClusterUpdateErrorModal.tsx (1)

13-27: LGTM! Intentional close prevention for error state.

The migration correctly uses onClose={undefined} to disable the close button, ensuring users must refresh the page when the service is unavailable. The danger icon variant appropriately signals the error state.

libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/DeleteCustomManifestModal.tsx (1)

2-10: LGTM! Complete modal restructuring with cleaner button label.

The migration correctly implements the ModalHeader/ModalBody/ModalFooter structure. The button label simplification from <>Remove</> to "Remove" is a minor improvement that maintains the same functionality.

Also applies to: 21-42

libs/ui-lib/lib/common/components/clusterDetail/ConsoleModal.tsx (1)

2-12: LGTM! Modal migration follows PF6 pattern correctly.

The migration from deprecated PatternFly 5 Modal to PF6 composition is implemented correctly:

  • Proper imports of ModalHeader, ModalBody, ModalFooter
  • Title moved to ModalHeader component
  • Content wrapped in ModalBody
  • Actions properly placed in ModalFooter
  • onClose behavior preserved

Also applies to: 186-192

libs/ui-lib/lib/common/components/hosts/MassDeleteHostModal.tsx (1)

2-11: LGTM! Modal migration is correct.

The migration properly:

  • Imports all necessary Modal subcomponents
  • Uses ModalHeader with warning icon variant (appropriate for destructive action)
  • Wraps content in ModalBody with existing Stack layout
  • Places action buttons in ModalFooter

Also applies to: 67-88

libs/ui-lib/lib/ocm/components/clusters/DeleteClusterModal.tsx (1)

2-9: LGTM! Modal migration with proper delete-in-progress handling.

The migration correctly:

  • Uses PF6 Modal composition pattern
  • Implements conditional onClose to prevent closing during delete operation
  • Disables both buttons appropriately when isDeleteInProgress is true
  • Applies loading state to the delete button

Also applies to: 26-49

libs/ui-lib/lib/common/components/hosts/AdditionalNTPSourcesDialog.tsx (1)

5-13: LGTM! Formik-based modal migration is correct.

The migration properly handles the Formik integration:

  • ModalBody and ModalFooter placed inside Formik's render props for access to form state
  • ModalHeader correctly positioned in the outer Modal wrapper
  • Form submission flow and validation preserved

Also applies to: 79-109, 127-139

libs/ui-lib/lib/ocm/components/clusterDetail/ClusterPollingErrorModal.tsx (1)

27-37: LGTM! Modal body and footer structure is correct.

The ModalBody and ModalFooter components are properly structured with:

  • Error content in ModalBody
  • Refresh action in ModalFooter
  • onClose={undefined} correctly prevents closing the error modal
libs/ui-lib/lib/common/components/ui/ConfirmationModal.tsx (2)

2-11: LGTM! Type correction for titleIconVariant is important.

The migration includes a necessary type update:

  • titleIconVariant changed from ModalProps['titleIconVariant'] to ModalHeaderProps['titleIconVariant']
  • This reflects PF6's API where title-related props belong to ModalHeader, not Modal
  • Imports properly updated to include ModalHeaderProps

Also applies to: 16-16


35-51: LGTM! Generic confirmation modal structure is correct.

The ConfirmationModal correctly implements the PF6 pattern:

  • ModalHeader with title and optional icon variant
  • ModalBody for content
  • ModalFooter with configurable confirmation button variant and cancel button
libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIsoModal.tsx (1)

4-4: LGTM! Wrapper modal structure is correct.

The DownloadIsoModal correctly wraps the DownloadIso component:

  • ModalHeader added at the wrapper level
  • DownloadIso component (line 21) likely contains ModalBody/ModalFooter internally
  • This pattern is appropriate for composed modal content

Also applies to: 13-23

libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx (1)

3-12: LGTM! Form component modal structure is correct.

The DiscoveryImageConfigForm properly implements PF6 modal composition:

  • ModalBody wraps the form content (lines 117-142)
  • ModalFooter contains action buttons (lines 143-159)
  • Both placed inside Formik render props for access to form state
  • ModalHeader is handled by the parent modal wrapper (DownloadIsoModal, DownloadIpxeScript, etc.)

Also applies to: 117-159

libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx (1)

114-117: Header migration looks good

Correct use of ModalHeader and test id. Title logic preserved.

libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.tsx (1)

233-243: Solid PF6 modal composition

Header/Body/Footer usage is correct; close handling intact.

@jgyselov jgyselov force-pushed the pf6_upgrade_modal_component branch from 357ff74 to 9d0e98e Compare October 13, 2025 08:39
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 13, 2025

@jgyselov: This pull request references MGMT-21745 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

Details

In response to this:

https://issues.redhat.com/browse/MGMT-21745

Upgraded the Modal components in /common and /ocm. (We will do another PR for /cim once we can test PF6 in there.)

Summary by CodeRabbit

  • New Features

  • More consistent modal headers, bodies, and footers across the app for a clearer, unified experience.

  • Refactor

  • Migrated dialogs to a modern modal composition to standardize structure while preserving behavior.

  • Style

  • Improved visual consistency and accessibility of modals, with clearer titles, icons, and action placement.

  • Bug Fixes

  • Standardized close, disabled and loading states in dialogs to reduce UI inconsistencies.

  • Chores

  • Updated modal implementations to align with current design system patterns.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

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

⚠️ Outside diff range comments (1)
libs/ui-lib/lib/ocm/components/ui/InfoLinkWithModal.tsx (1)

52-71: Remove redundant title prop from Modal component.

The title prop on line 53 is redundant since the title is already specified in the ModalHeader component on line 59. In PatternFly 6, the title should only be declared in the ModalHeader, not on the Modal component itself.

Apply this diff to remove the redundant prop:

     <Modal
-      title={modalTitle}
       id={modalId}
       isOpen={isModalOpen}
       onClose={handleModalClose}
       variant={modalVariant}
     >

Otherwise, the migration to the PF6 modal composition pattern (ModalHeader, ModalBody, ModalFooter) looks correct. The onClose handler is properly wired, and the variant is correctly placed on the Modal component.

🧹 Nitpick comments (3)
libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/BondsConfirmationModal.tsx (1)

25-46: LGTM: Modal successfully migrated to PatternFly 6 composition pattern.

The migration correctly:

  • Moves the title and titleIconVariant to ModalHeader
  • Wraps content in ModalBody
  • Wraps action buttons in ModalFooter
  • Preserves the onClose handler, ensuring the built-in close button and ESC key work as expected

Optional simplification:

Since the Stack contains only a single StackItem, you could simplify lines 34-36:

-      <ModalBody>
-        <Stack hasGutter>
-          <StackItem>{t('ai:The bond associated with the host will be removed.')}</StackItem>
-        </Stack>
-      </ModalBody>
+      <ModalBody>
+        {t('ai:The bond associated with the host will be removed.')}
+      </ModalBody>

However, keeping the Stack may be intentional for consistency with other modals or for future extensibility.

libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx (2)

181-268: Modal body and footer structure looks good.

The ModalBody and ModalFooter components are correctly wrapping the form content and action buttons. The Form component wrapping both sections ensures proper form submission behavior, though the more idiomatic PF6 pattern would place the Form inside ModalBody and use the form attribute on the submit button to associate it with the form. The current implementation is functional and acceptable.


301-301: Consider removing redundant aria-label.

The Modal's aria-label is redundant since the ModalHeader's title prop automatically provides the accessible name for the dialog. You can safely remove the aria-label attribute.

Apply this diff:

     <Modal
-      aria-label={t('ai:Change hostnames dialog')}
       isOpen={isOpen}
       onClose={onClose}
       id="mass-change-hostname-modal"
       variant="small"
     >
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 357ff74 and 9d0e98e.

📒 Files selected for processing (30)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx (4 hunks)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIpxeScript.tsx (4 hunks)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIso.tsx (4 hunks)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIsoModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/clusterDetail/ConsoleModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/hosts/AdditionalNTPSourcesDialog.tsx (5 hunks)
  • libs/ui-lib/lib/common/components/hosts/EditHostForm.tsx (4 hunks)
  • libs/ui-lib/lib/common/components/hosts/EditHostModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx (5 hunks)
  • libs/ui-lib/lib/common/components/hosts/MassDeleteHostModal.tsx (3 hunks)
  • libs/ui-lib/lib/common/components/ui/ConfirmationModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/ui/OpenShiftVersionModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/ui/eventsModal.tsx (3 hunks)
  • libs/ui-lib/lib/common/components/ui/formik/AlertFormikError.tsx (1 hunks)
  • libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2Wizard.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx (3 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/DeleteCustomManifestModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/BondsConfirmationModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterDetail/CancelInstallationModal.tsx (3 hunks)
  • libs/ui-lib/lib/ocm/components/clusterDetail/ClusterPollingErrorModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterDetail/ClusterUpdateErrorModal.tsx (1 hunks)
  • libs/ui-lib/lib/ocm/components/clusterDetail/ResetClusterModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusters/DeleteClusterModal.tsx (3 hunks)
  • libs/ui-lib/lib/ocm/components/hosts/DeleteHostModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/hosts/ResetHostModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipForm.tsx (4 hunks)
  • libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/ui/InfoLinkWithModal.tsx (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • libs/ui-lib/lib/common/components/ui/formik/AlertFormikError.tsx
🚧 Files skipped from review as they are similar to previous changes (13)
  • libs/ui-lib/lib/ocm/components/hosts/DeleteHostModal.tsx
  • libs/ui-lib/lib/ocm/components/hosts/ResetHostModal.tsx
  • libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2Wizard.tsx
  • libs/ui-lib/lib/common/components/hosts/EditHostForm.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx
  • libs/ui-lib/lib/ocm/components/clusters/DeleteClusterModal.tsx
  • libs/ui-lib/lib/ocm/components/clusterDetail/CancelInstallationModal.tsx
  • libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIpxeScript.tsx
  • libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIso.tsx
  • libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipForm.tsx
  • libs/ui-lib/lib/common/components/hosts/EditHostModal.tsx
  • libs/ui-lib/lib/common/components/ui/eventsModal.tsx
  • libs/ui-lib/lib/common/components/ui/OpenShiftVersionModal.tsx
🧰 Additional context used
🧬 Code graph analysis (2)
libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx (1)
libs/ui-lib/lib/common/components/ui/formik/AlertFormikError.tsx (1)
  • AlertFormikError (10-26)
libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.tsx (1)
libs/ui-lib/lib/common/hooks/index.ts (1)
  • useTranslation (3-3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: circular-deps
  • GitHub Check: translation-files
  • GitHub Check: unit-tests
  • GitHub Check: tests
  • GitHub Check: format
  • GitHub Check: lint
🔇 Additional comments (17)
libs/ui-lib/lib/ocm/components/ui/InfoLinkWithModal.tsx (1)

2-11: LGTM! Imports align with PF6 modal composition.

The added imports (ModalBody, ModalFooter, ModalHeader, ModalProps) are correct for the PatternFly 6 modal composition pattern.

libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/BondsConfirmationModal.tsx (1)

2-11: LGTM: Imports correctly updated for PatternFly 6 modal composition.

The imports now include ModalBody, ModalFooter, and ModalHeader, which are required for the new composition pattern.

libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipModal.tsx (1)

3-3: LGTM! Modal migration follows PF6 pattern correctly.

The modal structure correctly uses ModalHeader for the title, moving away from the deprecated title prop on Modal. The UpdateDay2ApiVipForm component appears to handle ModalBody/ModalFooter internally, which is a valid composition pattern.

Also applies to: 20-20

libs/ui-lib/lib/common/components/hosts/AdditionalNTPSourcesDialog.tsx (1)

5-13: LGTM! Complete modal composition implemented correctly.

The modal has been properly restructured with explicit ModalHeader, ModalBody, and ModalFooter components. The form logic, validation, and submission flow remain unchanged, with only the structural organization updated to align with PatternFly 6's composed modal API.

Also applies to: 79-109, 133-133

libs/ui-lib/lib/common/components/clusterDetail/ConsoleModal.tsx (1)

2-12: LGTM! Modal composition follows PF6 pattern.

The modal correctly uses ModalHeader, ModalBody, and ModalFooter. The actions array is properly integrated into the ModalFooter, maintaining the same functionality while adopting the new composed structure.

Also applies to: 186-192

libs/ui-lib/lib/ocm/components/clusterDetail/ClusterUpdateErrorModal.tsx (1)

2-10: LGTM! Error modal correctly structured with appropriate controls.

The modal properly implements the ModalHeader/ModalBody/ModalFooter composition. The onClose={undefined} is intentionally used to prevent users from dismissing this critical error modal, forcing them to use the "Refresh page" action. The danger title icon variant appropriately signals the error state.

Also applies to: 13-27

libs/ui-lib/lib/ocm/components/clusterDetail/ClusterPollingErrorModal.tsx (1)

2-10: LGTM! Modal correctly composed and previous issue addressed.

The modal properly uses ModalHeader/ModalBody/ModalFooter composition. The previous review concern about a redundant title prop has been resolved—the title is now correctly specified only in ModalHeader. The onClose={undefined} appropriately prevents dismissal of this polling error modal.

Also applies to: 25-37

libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.tsx (1)

12-16: LGTM! Troubleshooting modal correctly refactored to PF6 structure.

The modal has been properly restructured with ModalHeader, ModalBody containing the troubleshooting content, and ModalFooter with the close action. The translation hook usage and close callback are correctly implemented. The migration maintains all functionality while adopting the new PatternFly 6 composed modal API.

Also applies to: 226-244

libs/ui-lib/lib/common/components/ui/ConfirmationModal.tsx (1)

2-11: LGTM! Confirmation modal correctly migrated with proper type updates.

The modal properly implements the ModalHeader/ModalBody/ModalFooter composition. The type change for titleIconVariant from ModalProps to ModalHeaderProps is appropriate since the icon variant now belongs to the ModalHeader in PatternFly 6. The confirmation and cancel actions are correctly placed in the ModalFooter.

Also applies to: 16-16, 35-52

libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIsoModal.tsx (1)

4-4: LGTM! Download ISO modal correctly updated to PF6 pattern.

The modal correctly adds ModalHeader for the title, following the PatternFly 6 composed modal structure. The DownloadIso component appears to handle ModalBody/ModalFooter internally, which is a valid composition pattern. All modal props including accessibility attributes are properly maintained.

Also applies to: 20-20

libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx (1)

117-159: LGTM! Clean migration to PatternFly 6 modal components.

The replacement of deprecated ModalBoxBody and ModalBoxFooter with ModalBody and ModalFooter correctly follows the PatternFly 6 migration pattern. The structure and functionality remain intact.

libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/DeleteCustomManifestModal.tsx (1)

21-42: LGTM! Proper PatternFly 6 modal composition.

The migration correctly restructures the modal using the composed pattern:

  • Title moved from prop to ModalHeader
  • Content wrapped in ModalBody with appropriate Content component
  • Actions relocated from array prop to ModalFooter children
  • All event handlers properly preserved
libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx (1)

146-204: LGTM! Modal migration completed correctly, and past review concern resolved.

The migration to PatternFly 6 modal components is properly implemented:

  • ModalBody and ModalFooter correctly replace deprecated components
  • The AlertFormikError now receives the actual status (lines 177-178) instead of the hardcoded error object flagged in the previous review
  • Conditional rendering ensures the error alert only displays when status.error exists (line 174)
  • The Flex/FlexItem layout for action buttons provides appropriate spacing
libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx (2)

9-12: LGTM! Correct PF6 modal imports.

The import changes properly replace the deprecated PF5 modal components with the new composed modal structure (Modal, ModalHeader, ModalBody, ModalFooter).


307-307: LGTM! Correct ModalHeader usage.

The ModalHeader component with the title prop correctly implements the PF6 pattern for rendering modal titles. Since the parent Modal has an onClose prop, the ModalHeader will automatically render a close button.

libs/ui-lib/lib/ocm/components/clusterDetail/ResetClusterModal.tsx (2)

3-12: LGTM! Imports correctly updated for PatternFly 6 modal composition.

The added imports for ModalHeader, ModalBody, and ModalFooter are necessary for the new composed modal pattern and align with PatternFly 6 best practices.

Based on learnings


121-125: Correct PatternFly 6 modal migration

No deprecated title or actions props remain; all OCM modals now use ModalHeader, ModalBody, and ModalFooter. Confirm the close button appears in the header, footer actions render correctly, and modal interactions (open/close, reset, cancel) work as expected.

@jgyselov jgyselov force-pushed the pf6_upgrade_modal_component branch from 9d0e98e to c113823 Compare October 13, 2025 08:49
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 13, 2025

@jgyselov: This pull request references MGMT-21745 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

Details

In response to this:

https://issues.redhat.com/browse/MGMT-21745

Upgraded the Modal components in /common and /ocm. (We will do another PR for /cim once we can test PF6 in there.)

Summary by CodeRabbit

  • Refactor

  • Modernized modal structure across the app for consistent header/body/footer layout.

  • Style

  • More uniform titles, icons, and action placement for improved visual consistency and accessibility.

  • Bug Fixes

  • Standardized close, disabled, and loading behaviors to reduce dialog inconsistencies.

  • Chores

  • Updated dialogs to align with current design system patterns while preserving existing behavior.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx (1)

125-156: Enable keyboard submit: wire form onSubmit and use type="submit"

Currently only onClick triggers submit; Enter key won’t submit. Wire PF Form’s onSubmit to Formik and use a submit button.

-                <StackItem>
-                  <Form>
+                <StackItem>
+                  <Form
+                    onSubmit={(e) => {
+                      e.preventDefault();
+                      void submitForm();
+                    }}
+                  >
@@
-              <Button
-                // eslint-disable-next-line @typescript-eslint/no-misused-promises
-                onClick={submitForm}
+              <Button
+                type="submit"
                 isDisabled={isSubmitting}
                 isLoading={isSubmitting}
               >

Based on learnings

libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIsoModal.tsx (1)

4-4: Wrap content in ModalBody for correct spacing/semantics

Follow PF6 composition by wrapping body content in ModalBody.

-import { Modal, ModalHeader, ModalVariant } from '@patternfly/react-core';
+import { Modal, ModalHeader, ModalBody, ModalVariant } from '@patternfly/react-core';
@@
-      <ModalHeader title={t('ai:Add host')} />
-      <DownloadIso {...props} />
+      <ModalHeader title={t('ai:Add host')} />
+      <ModalBody>
+        <DownloadIso {...props} />
+      </ModalBody>

Based on learnings

Also applies to: 20-22

libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx (1)

2-2: Add ModalBody; reconsider tabIndex on Modal

  • Wrap the modal content in ModalBody for proper spacing/ARIA semantics.
  • tabIndex={0} is typically unnecessary and may interfere with focus trap; remove unless required for a known focus use case.
-import { Button, ButtonVariant, Modal, ModalHeader, ModalVariant } from '@patternfly/react-core';
+import { Button, ButtonVariant, Modal, ModalHeader, ModalBody, ModalVariant } from '@patternfly/react-core';
@@
-      tabIndex={0}
+      {/* Let PF manage focus trap */}
@@
-      {(isoDownloadError || ipxeDownloadError) && <ErrorState />}
-      {isoDownloadUrl ? (
-        <DownloadIso
-          fileName={`discovery_image_${cluster.name || ''}.iso`}
-          downloadUrl={isoDownloadUrl}
-          isSNO={isSNOCluster}
-          onReset={onReset}
-          onClose={close}
-          updateTagsForCiscoIntersight={() => void updateTagsForCiscoIntersight(cluster)}
-        />
-      ) : ipxeDownloadUrl ? (
-        <DownloadIpxeScript
-          fileName={`discovery_ipxe_script_${cluster.name || ''}.txt`}
-          downloadUrl={ipxeDownloadUrl}
-          isSNO={isSNOCluster}
-          onReset={onResetIpxe}
-          onClose={close}
-        />
-      ) : (
-        <DiscoveryImageForm
-          cluster={cluster}
-          onCancel={close}
-          onSuccess={onImageReady}
-          cpuArchitecture={CpuArchitecture.USE_DAY1_ARCHITECTURE}
-          onSuccessIpxe={onImageIpxeReady}
-          isIpxeSelected={isIpxeSelected}
-        />
-      )}
+      <ModalBody>
+        {(isoDownloadError || ipxeDownloadError) && <ErrorState />}
+        {isoDownloadUrl ? (
+          <DownloadIso
+            fileName={`discovery_image_${cluster.name || ''}.iso`}
+            downloadUrl={isoDownloadUrl}
+            isSNO={isSNOCluster}
+            onReset={onReset}
+            onClose={close}
+            updateTagsForCiscoIntersight={() => void updateTagsForCiscoIntersight(cluster)}
+          />
+        ) : ipxeDownloadUrl ? (
+          <DownloadIpxeScript
+            fileName={`discovery_ipxe_script_${cluster.name || ''}.txt`}
+            downloadUrl={ipxeDownloadUrl}
+            isSNO={isSNOCluster}
+            onReset={onResetIpxe}
+            onClose={close}
+          />
+        ) : (
+          <DiscoveryImageForm
+            cluster={cluster}
+            onCancel={close}
+            onSuccess={onImageReady}
+            cpuArchitecture={CpuArchitecture.USE_DAY1_ARCHITECTURE}
+            onSuccessIpxe={onImageIpxeReady}
+            isIpxeSelected={isIpxeSelected}
+          />
+        )}
+      </ModalBody>

Based on learnings

Also applies to: 112-146

libs/ui-lib/lib/ocm/components/clusters/DeleteClusterModal.tsx (1)

28-33: Destructive affordance + minor cleanup

  • Add a danger icon to the header for destructive context.
  • Pass onClose directly (no wrapper needed).
-    onClose={isDeleteInProgress ? undefined : () => onClose()}
+    onClose={isDeleteInProgress ? undefined : onClose}
@@
-    <ModalHeader title="Delete cluster" />
+    <ModalHeader title="Delete cluster" titleIconVariant="danger" />

Based on learnings

libs/ui-lib/lib/common/components/ui/ConfirmationModal.tsx (1)

28-32: Localize default confirmation button text

Use a translated default for the confirmation button.

-  confirmationButtonText = 'Yes',
+  confirmationButtonText,
@@
-  const { t } = useTranslation();
+  const { t } = useTranslation();
+  const confirmText = confirmationButtonText ?? t('ai:Yes');
@@
-          {confirmationButtonText}
+          {confirmText}

Based on learnings

Also applies to: 45-46

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9d0e98e and c113823.

📒 Files selected for processing (30)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx (4 hunks)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIpxeScript.tsx (4 hunks)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIso.tsx (4 hunks)
  • libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIsoModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/clusterDetail/ConsoleModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/hosts/AdditionalNTPSourcesDialog.tsx (5 hunks)
  • libs/ui-lib/lib/common/components/hosts/EditHostForm.tsx (4 hunks)
  • libs/ui-lib/lib/common/components/hosts/EditHostModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx (5 hunks)
  • libs/ui-lib/lib/common/components/hosts/MassDeleteHostModal.tsx (3 hunks)
  • libs/ui-lib/lib/common/components/ui/ConfirmationModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/ui/OpenShiftVersionModal.tsx (2 hunks)
  • libs/ui-lib/lib/common/components/ui/eventsModal.tsx (3 hunks)
  • libs/ui-lib/lib/common/components/ui/formik/AlertFormikError.tsx (1 hunks)
  • libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2Wizard.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx (3 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/DeleteCustomManifestModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/BondsConfirmationModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterDetail/CancelInstallationModal.tsx (3 hunks)
  • libs/ui-lib/lib/ocm/components/clusterDetail/ClusterPollingErrorModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusterDetail/ClusterUpdateErrorModal.tsx (1 hunks)
  • libs/ui-lib/lib/ocm/components/clusterDetail/ResetClusterModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/clusters/DeleteClusterModal.tsx (3 hunks)
  • libs/ui-lib/lib/ocm/components/hosts/DeleteHostModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/hosts/ResetHostModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipForm.tsx (4 hunks)
  • libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipModal.tsx (2 hunks)
  • libs/ui-lib/lib/ocm/components/ui/InfoLinkWithModal.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (10)
  • libs/ui-lib/lib/common/components/hosts/AdditionalNTPSourcesDialog.tsx
  • libs/ui-lib/lib/ocm/components/hosts/DeleteHostModal.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/manifestsConfiguration/DeleteCustomManifestModal.tsx
  • libs/ui-lib/lib/common/components/hosts/EditHostForm.tsx
  • libs/ui-lib/lib/ocm/components/AddHosts/day2Wizard/Day2Wizard.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewHosts/BondsConfirmationModal.tsx
  • libs/ui-lib/lib/ocm/components/hosts/ResetHostModal.tsx
  • libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIso.tsx
  • libs/ui-lib/lib/common/components/hosts/EditHostModal.tsx
  • libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx
🧰 Additional context used
🧬 Code graph analysis (3)
libs/ui-lib/lib/common/components/ui/formik/AlertFormikError.tsx (1)
libs/ui-lib-tests/cypress/views/reusableComponents/Alert.ts (1)
  • Alert (1-20)
libs/ui-lib/lib/common/components/ui/OpenShiftVersionModal.tsx (1)
libs/ui-lib/lib/common/components/ui/OpenShiftSelectWithSearch.tsx (1)
  • OpenShiftSelectWithSearch (29-294)
libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.tsx (1)
libs/ui-lib/lib/common/hooks/index.ts (1)
  • useTranslation (3-3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: lint
  • GitHub Check: translation-files
  • GitHub Check: format
  • GitHub Check: tests
  • GitHub Check: circular-deps
  • GitHub Check: unit-tests
🔇 Additional comments (21)
libs/ui-lib/lib/common/components/hosts/MassDeleteHostModal.tsx (1)

2-11: LGTM! Clean migration to PF6 modal structure.

The modal has been correctly migrated to PatternFly 6's composed structure:

  • ModalHeader with title and warning icon
  • ModalBody wrapping the content
  • ModalFooter containing the action buttons

The implementation follows PF6 best practices and maintains all existing functionality.

Based on learnings

Also applies to: 67-89

libs/ui-lib/lib/ocm/components/clusterDetail/CancelInstallationModal.tsx (2)

3-12: LGTM! Imports correctly updated for PF6 modal composition.

The addition of ModalBody, ModalFooter, and ModalHeader aligns with the PatternFly 6 composed modal pattern, removing reliance on deprecated PF5 APIs.


63-86: LGTM! Modal structure correctly migrated to PF6 composed pattern.

The migration follows PatternFly 6 best practices:

  • ModalHeader now contains the title
  • ModalBody wraps dynamic content (error, loading, or confirmation text)
  • ModalFooter contains action buttons
  • onClose handler enables the default close button

The error handling, loading states, and button disabling logic remain intact.

Verify the modal's visual appearance and keyboard navigation in the UI to ensure the migration didn't introduce any UX regressions.

Based on learnings.

libs/ui-lib/lib/common/components/clusterDetail/ConsoleModal.tsx (2)

2-12: LGTM! Clean PF6 modal imports.

The import additions for ModalBody, ModalFooter, and ModalHeader are correct for the PF6 composed modal pattern. All necessary components are present.


186-192: Excellent PF6 modal migration.

The refactor correctly adopts the composed modal structure:

  • ModalHeader for the title (improves semantic structure and accessibility)
  • ModalBody wrapping the hint content
  • ModalFooter housing the action buttons

The onClose callback is preserved, ensuring the modal close button remains functional. The actions array renders correctly as ModalFooter children.

libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipForm.tsx (3)

3-10: LGTM! Clean migration to PF6 modal components.

The import changes correctly replace deprecated ModalBoxBody and ModalBoxFooter with the PatternFly 6 equivalents ModalBody and ModalFooter.


78-92: LGTM! ModalBody wrapper updated correctly.

The ModalBoxBody to ModalBody migration is correct, with all child components preserved.


93-104: Approve ModalFooter change: Parent UpdateDay2ApiVipModal already includes <ModalHeader title="Update cluster hostname" />.

libs/ui-lib/lib/common/components/ui/formik/AlertFormikError.tsx (1)

17-24: LGTM! Clean simplification.

Removing the fragment wrapper is appropriate since the component returns a single root element. This simplifies the JSX without changing behavior or breaking the public API.

libs/ui-lib/lib/ocm/components/hosts/UpdateDay2ApiVipModal.tsx (1)

3-3: LGTM! Clean migration to PF6 modal composition.

The modal has been correctly migrated to use the PatternFly 6 composed modal structure. The title is properly moved from the Modal's title prop to a dedicated ModalHeader component, and all existing props (aria-label, isOpen, variant, onClose) are preserved.

Also applies to: 20-20

libs/ui-lib/lib/common/components/ui/eventsModal.tsx (1)

100-136: LGTM! Excellent migration to PF6 modal composition.

The modal has been properly restructured to use PatternFly 6's composed modal pattern:

  • Title and loading spinner moved to ModalHeader
  • Event content wrapped in ModalBody
  • Close button relocated to ModalFooter

All functionality is preserved, and the structure follows PF6 best practices.

libs/ui-lib/lib/common/components/hosts/MassChangeHostnameModal.tsx (1)

181-268: LGTM! Well-executed modal migration with form content.

The modal has been successfully migrated to the PatternFly 6 composition pattern:

  • Form content properly wrapped in ModalBody
  • Action buttons (Change, Cancel) moved to ModalFooter
  • Title relocated to ModalHeader

The complex form validation and hostname preview functionality is preserved correctly.

Also applies to: 307-307

libs/ui-lib/lib/common/components/clusterConfiguration/DownloadIpxeScript.tsx (1)

9-10: LGTM! Proper migration from deprecated ModalBox components.

The component has been correctly updated to use the current PatternFly modal components:

  • Replaced deprecated ModalBoxBody with ModalBody
  • Replaced deprecated ModalBoxFooter with ModalFooter

All download functionality and action buttons are preserved.

Also applies to: 36-95

libs/ui-lib/lib/ocm/components/clusterDetail/ResetClusterModal.tsx (1)

121-125: LGTM! Clean migration with state-driven content.

The modal has been successfully migrated to PatternFly 6's composed structure:

  • Title moved to ModalHeader
  • Dynamic content (loading/error/default states) wrapped in ModalBody
  • Action buttons relocated to ModalFooter

The state management and cluster reset functionality remain intact.

libs/ui-lib/lib/common/components/ui/OpenShiftVersionModal.tsx (1)

44-70: LGTM! Successful migration with form integration.

The modal has been properly restructured to use PatternFly 6's composition pattern:

  • Title moved to ModalHeader
  • FormGroup with OpenShiftSelectWithSearch wrapped in ModalBody
  • Select and Cancel buttons relocated to ModalFooter

The version selection functionality and form behavior are preserved.

libs/ui-lib/lib/ocm/components/ui/InfoLinkWithModal.tsx (1)

52-65: LGTM! Clean migration of reusable modal component.

The modal has been correctly migrated to PatternFly 6's composed structure:

  • Title moved to ModalHeader
  • Children content wrapped in ModalBody
  • Close button relocated to ModalFooter

The component's reusability and flexibility are preserved.

libs/ui-lib/lib/ocm/components/clusterDetail/ClusterPollingErrorModal.tsx (1)

25-37: LGTM! Migration complete and past issue resolved.

The modal has been successfully migrated to PatternFly 6's composed structure:

  • Title correctly placed only in ModalHeader (line 26) with danger icon variant
  • Content wrapped in ModalBody
  • Refresh button relocated to ModalFooter
  • onClose={undefined} properly disables the header close button

The redundant title prop mentioned in the previous review has been removed, and the modal now follows the correct PF6 pattern.

libs/ui-lib/lib/ocm/components/clusterDetail/ClusterUpdateErrorModal.tsx (1)

13-26: PF6 modal composition looks good; confirm intentional non-dismissible behavior

Migration to ModalHeader/Body/Footer is correct. onClose={undefined} makes the modal non-dismissible (no ESC/backdrop close, no X). Verify this is intended UX.

Based on learnings

libs/ui-lib/lib/common/components/clusterConfiguration/DiscoveryTroubleshootingModal.tsx (3)

12-16: LGTM! Correct PF6 modal imports.

The import additions for Modal, ModalVariant, ModalHeader, ModalFooter, and ModalBody are correct and follow the PatternFly 6 composed modal pattern.

Based on learnings


226-226: LGTM! Correct translation hook usage.

Adding useTranslation here is necessary for the modal title and button text translations in the new PF6 structure.


233-243: LGTM! Correct PF6 modal composition.

The modal structure has been properly migrated to the PatternFly 6 composed pattern:

  • Title correctly moved to ModalHeader
  • Content properly wrapped in ModalBody
  • Actions correctly placed in ModalFooter
  • Modal behavior preserved with isOpen, onClose, and variant props

Based on learnings

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2025
@openshift-ci
Copy link

openshift-ci bot commented Oct 13, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ammont82, jgyselov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit cf3e4ce into openshift-assisted:master Oct 13, 2025
11 checks passed
@openshift-cherrypick-robot
Copy link
Contributor

@jgyselov: new pull request created: #3214

Details

In response to this:

/cherry-pick releases/v2.46

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 kubernetes-sigs/prow repository.

openshift-merge-bot bot pushed a commit that referenced this pull request Dec 18, 2025
* Remove preview badge from bundles card (#3169)

* Migration to PF6 (#3168)

* pf6 deps and codemods updates

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

get emptystate pf6 issues building

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

fix chip/label changes

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

fix icon type

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

fix a prop type that codemods missed

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

update pf5 classnames

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

fix tokens, some cleanup

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

fix tests and remaining v5->v6

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

yarn lock

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

work on some cy tests

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

fix tests for pf6 changes

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

fix some tests

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

fix build error

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

* Change version of package.json to 2.0.0 for testing

* MGMT-20974: Rremove unnecessary hyphens in helper text operators

* MGMT-20968: align 'learn more about openshift releases' link in the first page of the cluster creation wizard

* MGMT-20965: Put the same min-width in the dropdowns of the first page of the cluster creation wizard

* MGMT-20966: improving the readibility of text on Troubleshooter Modal

* MGMT-20972: Cluster summary section is not collapsable

* MGMT-20964: Detached Warning Message for TMPv2 selection

* Changes in PrismCode to use the correct color

* MGMT-20969: hostname column header is truncated and unredeable

* MGMT-20967: errors beneath text boxes dissapears but icon remains in place

* fix (20975): make bundle selected operators show in count

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

* MGMT-21103: change size of Provisioning type droodown in Add hosts modal

* MGMT-21105: Networking page-machine network dropdown truncate values

* add layout with gutter around cluster progress/buttons

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

* MGMT-21147: R&C page - missing vertical spacing between kubeconfig warning and buttons

* MGMT-21151: inconsistend icon and text alignment in preflight checks in R&C page

* Add data-test-id to MenuToggle components

* Add data-testid to HelperTextItem components

* Add data-testid to BreadCrumb component

* Add data-testid to Spinner component

* Add data-testid to Wizard components

* Add data-testid to Host's network configuration group

* Add data-testid to Use bond option

* Add data-testid to Add hosts modal

* Add more data-testids for tests

* Solving problem with operators count

* Remove duplicated scrollbars

* Solving errors in Networking page

* Add data-testid to close button in Events modal

* Migration of TextContent component

* Solving problems with some old components

* Solving lint issues

* Solving problems with unit tests

* Solving format issues

* Remove unnecessary test

* Solving problems with tests

---------

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>
Co-authored-by: gitdallas <5322142+gitdallas@users.noreply.github.com>

* Use masthead (#3173)

* Button text (#3174)

* OCPBUGS-61953: Update dependency sourcing to remote (#3155)

* Bump axios from 1.6.8 to 1.12.2 (#3180)

Bumps [axios](https://github.com/axios/axios) from 1.6.8 to 1.12.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.6.8...v1.12.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.12.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Updating assisted-installer-ui-container image to be consistent with ART for 4.21 (#3179)

Reconciling with https://github.com/openshift/ocp-build-data/tree/4fbe3fab45239dc4be6f5d9d98a0bf36e0274ec9/images/agent-installer-ui.yml

Co-authored-by: AOS Automation Release Team <noreply@redhat.com>

* OCPBUGS-61787: Change NMstate operator docs link (#3182)

* MGMT-21862: Add message about vSphere limitations (#3181)

* OCPBUGS-62680: Include assisted disconnected UI image in release payload (#3188)

* Fixing errors when creating cluster from Assisted Migration (#3191)

* MGMT-21025: installing Two Node OpenShift with Arbiter (TNA) (#3170)

* Clean up ClusterDetailsFormFields

* Allow TNA arbiter in CIM

* Remove unused component (#3193)

* Add unique data-testid to dualstack subnet dropdowns (#3199)

* Tweak spacing between advanced network fields (#3198)

* Tweak host status spacing (#3200)

* Improve alert spacing (#3201)

* MGMT-21825: Textarea field should show both error and helper text (#3202)

* Improve alert spacing

* Show both error and helper text under textarea fields

* Add border to table headers (#3197)

* Remove border from rich input field (#3208)

* Bump happy-dom from 15.10.2 to 20.0.0 (#3211)

Bumps [happy-dom](https://github.com/capricorn86/happy-dom) from 15.10.2 to 20.0.0.
- [Release notes](https://github.com/capricorn86/happy-dom/releases)
- [Commits](capricorn86/happy-dom@v15.10.2...v20.0.0)

---
updated-dependencies:
- dependency-name: happy-dom
  dependency-version: 20.0.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove nested 'Content' components (#3196)

* Upgrade the PF modal component in /common and /ocm (#3213)

* Bump happy-dom from 20.0.0 to 20.0.2 (#3218)

Bumps [happy-dom](https://github.com/capricorn86/happy-dom) from 20.0.0 to 20.0.2.
- [Release notes](https://github.com/capricorn86/happy-dom/releases)
- [Commits](capricorn86/happy-dom@v20.0.0...v20.0.2)

---
updated-dependencies:
- dependency-name: happy-dom
  dependency-version: 20.0.2
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Consistent ISO Download behavior (#3221)

* Add 'noopener noreferrer' to ISO download button (#3222)

* Fix preflight check collapsed styling (#3215)

* Remove unnecessary custom manifest field (#3217)

* Bump vite from 5.4.20 to 5.4.21 (#3223)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.20 to 5.4.21.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.21/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.21/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 5.4.21
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MGMT-21625: Add Dual-Stack with Primary IPv6 Support (#3190)

This PR adds support for IPv6-primary dual-stack clusters, enabling users to create dual-stack clusters where IPv6 is the primary IP stack (version-aware for OpenShift 4.12+)

* sort OCP versions in create infra (#3171)

Signed-off-by: Lior Soffer <liorsoffer1@gmail.com>

* Update types/parsing for latest lightspeed API (#3226)

* Update release job to use trusted-publishers flow (#3228)

* Update setup-node config (#3232)

* - MGMT-22057:Primary IPv6 should be Tech Preview (#3231)

- MGMT-22045: Change style of Dualstack - IPv4 / IPv6 section headers in subnet dropdown
- When we change the primary machine network IP to ipv6 we have to select the seconday machine network IP to ipv4

* MGMT-22080: Allow users to install Openshift AI as standalone operator in SNO clusters (#3234)

* Release job: Configure Yarn for npm registry (#3235)

* configure yarn before publish (#3239)

* Pass OIDC token to yarn config (#3241)

* MGMT-22047: Add apiVIP and ingressVIP for dual-stack ipv4 and ipv6 (#3246)

* Add apiVIP and ingressVIP for dual-stack ipv4 and ipv6

* Add validations to ensure that users add primary and secondary apiVips and ingressVips when using dual-stack

* Updating tests to dual-stack changes

* Prevent InfraEnv creation on ABI to support OVE Late-Binding workflow (#3244)

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* MGMT-22116: Add info about apiVIPs and ingressVIPs for dual-stack in Review and Create page (#3250)

* Add info about apiVIPs and ingressVIPs for dual-stack in Review and Create page

* Fixing review comments

* MGMT-22119: Solving errors with SNO dual-stack (#3249)

* Solving errors with SNO dual-stack

* Solving errors when change between dual-stack and single-stack

* MGMT-22165: Remove what's new link until the info appear in the chatbot (#3253)

* Update logic to extract the tool response (#3255)

* MGMT-17220: dual-stack with second machine network not populates (#3256)

* MGMT-17220: dual-stack with second machine network not populates

* Improving the code

* Make the parsing compatible with new & old API (#3260)

* MGMT-22047: solving errors with dual-stack (#3263)

* MGMT-22047: solving errors with dual-stack
1. Changes in AvailableSubnetsControl.tsx so our corrective setFieldValue calls don’t validate immediately. This avoids heavy, repeated validations the moment you pick the first IPv6 option and should stop the freeze when secondary VIPs are IPv6 and empty.
Specifically, set the third arg to false for:
- Auto-select initialization of machineNetworks
- Duplicate-primary fix that updates machineNetworks.1.cidr
2. Changes in AdvancesNetworkFields.tsx:
-I found the infinite loop in AdvancedNetworkFields.tsx: when the primary machine network flips to IPv6, the effect was swapping clusterNetworks/serviceNetworks even when both entries had the same IP family, causing continuous reorders and a freeze.
-I added guards so we only swap when both entries exist and have opposite families, and the first one mismatches the primary machine family. Lint is clean.

* Solving issues in code

* MGMT-21837: in YAML view in Static Network Configuration we add the radio buttons to change the form to another view (#3268)

* late binding hosts to cluster in ABI (#3259)

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* AGENT-1373: Rename feature gate to NoRegistryClusterInstall (#3267)

Update the feature gate name from NoRegistryClusterOperations to
NoRegistryClusterInstall.

* AGENT-1352: Handle cluster reset with late binding (#3270)

* late binding hosts to cluster in ABI

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* Handle cluster reset on ABI

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

---------

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* MGMT-22281: Dual stack seconday vips fields not mandatory (#3275)

* Show TechPreview badge only in Primary Machine network when user chooses ipV6 IP (#3276)

* add new fields to above sea level ABI (#3274)

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* Revert "Handle cluster reset on ABI" (#3281)

This reverts commit d35b70a.

* add loki and logging operators (#3285)

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* OCPBUGS-65657: Display OpenShift AI GPU validation message from API (#3279)

Fix UI to show the friendly label and detailed message from the API
instead of displaying the technical validation ID when OpenShift AI
operator is selected without GPU support.

* Bug fix: OVE Agent Installer UI: Red Hat OCP logo not displaying correctly (#3289)

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* Adding TechPreview Budge for Assisted installer and agent (#3293)

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* MGMT-20138 : Show 'Add hosts' tab for all cases (#3297)

* Edit OWNERS file (#3172)

* Bump js-yaml from 4.1.0 to 4.1.1 (#3264)

Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](nodeca/js-yaml@4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump zx from 7.2.3 to 8.8.5 (#3273)

Bumps [zx](https://github.com/google/zx) from 7.2.3 to 8.8.5.
- [Release notes](https://github.com/google/zx/releases)
- [Commits](google/zx@7.2.3...8.8.5)

---
updated-dependencies:
- dependency-name: zx
  dependency-version: 8.8.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump mdast-util-to-hast from 13.2.0 to 13.2.1 (#3287)

Bumps [mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast) from 13.2.0 to 13.2.1.
- [Release notes](https://github.com/syntax-tree/mdast-util-to-hast/releases)
- [Commits](syntax-tree/mdast-util-to-hast@13.2.0...13.2.1)

---
updated-dependencies:
- dependency-name: mdast-util-to-hast
  dependency-version: 13.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* provides parameters for the GET /v2/operators/bundles route (#3306)

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* Bump js-yaml from 4.1.0 to 4.1.1 (#3310)

Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](nodeca/js-yaml@4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix Cluster summary styling (#3216)

* remove external platforms field from below sea level UI (#3316)

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* Openshift AI Bundle on SNO enables ODF and LVM which are uncompatible (#3320)

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* change ABI above sea level iso size (#3322)

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* MGMT-22465: Merge the contents of releases/v2.17-cim into master (#3319)

* Fix patches when there were 0 nodes in hypershift nodepool (#3177)

* Make OVN the default network type if the version is invalid (#3183)

* MGMT-20076: Support external platform in Assisted-installer Kube API (#3151)

* Add External platforms field

* Restructure files related to CIM cluster deployment wizard

* Create SelectFieldWithSearch component

* Update '@openshift-console/dynamic-plugin-sdk'

* CIM custom manifest step

* CIM custom manifests review

* Make 'Baremetal' the default external platform

* Translations for 2.16-cim (#3225)

* MGMT-21025: installing Two Node OpenShift with Arbiter (TNA)  (#3224)

* Clean up ClusterDetailsFormFields

* Allow TNA arbiter in CIM

* Set 'userManagedNetworking' as true with 'external' platform (#3245)

* Tweak TNA-related strings in CIM (#3248)

* Restrict platform options for SNO clusters (#3262)

Signed-off-by: Lior Soffer <liorsoffer1@gmail.com>

* Fix: Undefined OpenShift version producing an incorrect documentation link (#3271)

Signed-off-by: Lior Soffer <liorsoffer1@gmail.com>

* Fix bug - the option to remove host from the cluster disabled while the host is installing (#3219)

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* Implement user interface for the multiple SSH keys (#3292)

Signed-off-by: Lior Soffer <liorsoffer1@gmail.com>

* Edit OWNERS file (#3303)

Co-authored-by: jgyselov <jgyselov@redhat.com>

* Fix arbiter translation (#3304)

Co-authored-by: jgyselov <jgyselov@redhat.com>

* [releases/v2.17-cim] MGMT-22264: Add 'Labels' and 'GPU' columns to infra env host table (#3307)

* Add GPUs column to infra agent table

* Add labels column and filtering to infra agent table

---------

Co-authored-by: jgyselov <jgyselov@redhat.com>

* Prevent mass approve crash when hosts are still discovering (#3305)

Co-authored-by: jgyselov <jgyselov@redhat.com>

* Fix 'Required' translations (#3308)

Co-authored-by: jgyselov <jgyselov@redhat.com>

* Do not exclude hosts with SpecSyncError status from host selection during binding (#3309)

Co-authored-by: jgyselov <jgyselov@redhat.com>

* MGMT-22438: Handle empty labels in infra env host table (#3314)

* Handle empty labels in infra env host table

Signed-off-by: Lior Soffer <liorsoffer1@gmail.com>

* format fix

Signed-off-by: Lior Soffer <liorsoffer1@gmail.com>

---------

Signed-off-by: Lior Soffer <liorsoffer1@gmail.com>

* MGMT-19743: Icon from agent status available is confusing (#3220)

* Fix bug - the option to remove host from the cluster disabled while the host is installing

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

* icon from agent status Available is confusing

Signed-off-by: Elay Aharoni <elayaha@gmail.com>

---------

Signed-off-by: Elay Aharoni <elayaha@gmail.com>
Co-authored-by: Julie Gyselova <jgyselov@redhat.com>

---------

Signed-off-by: Lior Soffer <liorsoffer1@gmail.com>
Signed-off-by: Elay Aharoni <elayaha@gmail.com>
Co-authored-by: Lior Soffer <liorsoffer1@gmail.com>
Co-authored-by: Elay Aharoni <elayaha@gmail.com>
Co-authored-by: OpenShift Cherrypick Robot <openshift-cherrypick-robot@redhat.com>

---------

Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Lior Soffer <liorsoffer1@gmail.com>
Signed-off-by: Elay Aharoni <elayaha@gmail.com>
Co-authored-by: Montse Ortega Gallart <ammont82@users.noreply.github.com>
Co-authored-by: gitdallas <5322142+gitdallas@users.noreply.github.com>
Co-authored-by: Pawan Pinjarkar <ppinjark@redhat.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: OpenShift Bot <openshift-bot@redhat.com>
Co-authored-by: AOS Automation Release Team <noreply@redhat.com>
Co-authored-by: Linoy Hadad <Linoyaslan@gmail.com>
Co-authored-by: Lior Soffer <liorsoffer1@gmail.com>
Co-authored-by: Rastislav Wagner <rawagner@redhat.com>
Co-authored-by: Elay Aharoni <elayaha@gmail.com>
Co-authored-by: Richard Su <rwsu@redhat.com>
Co-authored-by: Yoav Schwammenthal <33420608+yoavsc0302@users.noreply.github.com>
Co-authored-by: OpenShift Cherrypick Robot <openshift-cherrypick-robot@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants