[WIP] Migrate legacy PatternFly Modals to PatternFly v6#16054
[WIP] Migrate legacy PatternFly Modals to PatternFly v6#16054rhamilto wants to merge 5 commits intoopenshift:mainfrom
Conversation
Update Cancel button variants from "secondary" to "link" in modern PatternFly modals to follow PatternFly standards. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
… wrapper - Migrate useCopyCodeModal, FavoriteButton, and TourStepComponent from deprecated Modal wrapper to modern PatternFly Modal components - Remove deprecated Modal wrapper (packages/console-shared/src/components/modal/) - Migrate CatalogDetailsModal and operator-hub-items from deprecated PatternFly Modal to modern Modal components - Preserve ocs-modal CSS class for catalog modal positioning - Fix FavoriteButton form submission bug by adding preventDefault - Fix Guided Tour accessibility warning by closing Help dropdown and blurring focus before starting tour Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Migrate DeleteModal from deprecated factory/modal components to modern PatternFly v6 Modal components - Create reusable ModalFooterWithAlerts component for alert display - Update configure-count-modal and configure-machine-autoscaler-modal to use modern Modal components and ModalFooterWithAlerts Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
… components This commit updates multiple modal components to use modern PatternFly v6 patterns and replaces deprecated error display components with the new ModalFooterWithAlerts component. Changes: - Replace ModalErrorContent with ModalFooterWithAlerts in: - clone-pvc-modal.tsx - modify-vac-modal.tsx - ResourceLimitsModal.tsx - restore-pvc-modal.tsx - ConfigureUnschedulableModal.tsx - DeletePDBModal.tsx - Remove onSubmit handlers from Form elements - Move form submission to onClick handlers on submit buttons - Add form attribute to submit buttons to associate with form id - Fix Formik type compatibility in ResourceLimitsModal by wrapping handleSubmit in arrow function - Delete unused SCSS files: - packages/console-app/src/components/modals/clone/_clone-pvc-modal.scss - packages/console-app/src/components/modals/restore-pvc/restore-pvc-modal.scss All modals now follow the PatternFly "with form" pattern with consistent error/alert display using ModalFooterWithAlerts.
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhamilto The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
d0e15f3 to
cc37c78
Compare
cc37c78 to
16f726c
Compare
Migrate the following modals from deprecated PatternFly Modal to v6: - CreateProjectModal: Updated to use ModalHeader, ModalBody, ModalFooterWithAlerts with Form, FormGroup, TextInput, and TextArea components - CreateNamespaceModal: Similar updates with additional Select component for network policy - VSphereConnectionModal: Updated with Formik integration and conditional rendering - ReplaceCodeModal: Simple modal migration with three action buttons and close button test - TestFunctionModal: Remove position prop so the modal uses default center positioning All modals now use: - PatternFly 6 Modal structure (ModalHeader, ModalBody, ModalFooter) - Modern form components (Form, FormGroup, TextInput, TextArea) - ModalFooterWithAlerts for error handling where applicable - Proper form/button association using id and form attributes Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
16f726c to
04f33f7
Compare
|
@rhamilto: The following test 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. |
Summary
This PR migrates several modals from deprecated PatternFly Modal to PatternFly v6, building upon #16015.
Note: This PR includes changes from #16015 and is dependent upon it.
Modals migrated:
CreateProjectModal- Updated to use modern Form, FormGroup, TextInput, TextArea components with ModalFooterWithAlertsCreateNamespaceModal- Similar updates with Select component for network policyVSphereConnectionModal- Updated with Formik integration and conditional renderingReplaceCodeModal- Simple modal with three action buttons and close buttonTestFunctionModal- Removed deprecated position prop from legacy Modal (still using deprecated Modal for now due to custom header/footer). Note: choosing not to do the full migration due to complexity of the existing modal and challenges testing.Key changes:
ModalHeader,ModalBody,ModalFooter(for CreateProject, CreateNamespace, VSphereConnection, ReplaceCode)Form,FormGroup,TextInput,TextAreaModalFooterWithAlertsfor standardized error handlingidandformattributes(_event, value) => setValue(value)onClosepropTest plan
🤖 Generated with Claude Code