Skip to content

CONSOLE-4447: Additional modals switched to use ModalFooterWithAlerts for consistency#16171

Open
sg00dwin wants to merge 2 commits intoopenshift:mainfrom
sg00dwin:follow-on-modal-footer-fixes
Open

CONSOLE-4447: Additional modals switched to use ModalFooterWithAlerts for consistency#16171
sg00dwin wants to merge 2 commits intoopenshift:mainfrom
sg00dwin:follow-on-modal-footer-fixes

Conversation

@sg00dwin
Copy link
Member

@sg00dwin sg00dwin commented Mar 18, 2026

Migrates 4 modals to use ModalFooterWithAlerts for error display,
matching the pattern established in #16015:

  • delete-namespace-modal: Replace inline ErrorMessage with ModalFooterWithAlerts
  • add-group-users-modal: Move error Alert from body to ModalFooterWithAlerts in footer
  • TextInputModal: Move error Alert from form body to ModalFooterWithAlerts in footer
  • CreateServiceAccountModal: Move error Alert from form body to ModalFooterWithAlerts in footer

Also normalizes Cancel button variants to "link" where they were "secondary".

Summary by CodeRabbit

  • Bug Fixes

    • Improved error message display in modals by centralizing error presentation in the footer area for better visibility and consistency across the application.
  • Style

    • Updated cancel button styling in one modal for improved visual hierarchy.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 18, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 18, 2026

@sg00dwin: This pull request references CONSOLE-4447 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.22.0" version, but no target version was set.

Details

In response to this:

Migrates 4 modals to use ModalFooterWithAlerts for error display,
matching the pattern established in #16015:

  • delete-namespace-modal: Replace inline ErrorMessage with ModalFooterWithAlerts
  • add-group-users-modal: Move error Alert from body to ModalFooterWithAlerts in footer
  • TextInputModal: Move error Alert from form body to ModalFooterWithAlerts in footer
  • CreateServiceAccountModal: Move error Alert from form body to ModalFooterWithAlerts in footer

Also normalizes Cancel button variants to "link" where they were "secondary".

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 TheRealJon and rhamilto March 18, 2026 19:48
@openshift-ci openshift-ci bot added component/core Related to console core functionality component/olm Related to OLM component/shared Related to console-shared kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Mar 18, 2026
@sg00dwin
Copy link
Member Author

/verified by @sg00dwin

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 18, 2026
@openshift-ci-robot
Copy link
Contributor

@sg00dwin: This PR has been marked as verified by @sg00dwin.

Details

In response to this:

/verified by @sg00dwin

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@sg00dwin
Copy link
Member Author

Tech debt
/label docs-approved
/label px-approved

@openshift-ci openshift-ci bot added docs-approved Signifies that Docs has signed off on this PR px-approved Signifies that Product Support has signed off on this PR labels Mar 18, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 18, 2026

@sg00dwin: This pull request references CONSOLE-4447 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.22.0" version, but no target version was set.

Details

In response to this:

Migrates 4 modals to use ModalFooterWithAlerts for error display,
matching the pattern established in #16015:

  • delete-namespace-modal: Replace inline ErrorMessage with ModalFooterWithAlerts
  • add-group-users-modal: Move error Alert from body to ModalFooterWithAlerts in footer
  • TextInputModal: Move error Alert from form body to ModalFooterWithAlerts in footer
  • CreateServiceAccountModal: Move error Alert from form body to ModalFooterWithAlerts in footer

Also normalizes Cancel button variants to "link" where they were "secondary".

Summary by CodeRabbit

  • Bug Fixes

  • Improved error message display in modals by centralizing error presentation in the footer area for better visibility and consistency across the application.

  • Style

  • Updated cancel button styling in one modal for improved visual hierarchy.

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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 782e0933-44f3-4450-b5bf-585bc86d4ed3

📥 Commits

Reviewing files that changed from the base of the PR and between b13a1ad and 0049115.

📒 Files selected for processing (5)
  • frontend/packages/console-app/src/components/modals/add-group-users-modal.tsx
  • frontend/packages/console-shared/src/components/modals/TextInputModal.tsx
  • frontend/packages/operator-lifecycle-manager-v1/locales/en/olm-v1.json
  • frontend/packages/operator-lifecycle-manager-v1/src/components/cluster-extension/CreateServiceAccountModal.tsx
  • frontend/public/components/modals/delete-namespace-modal.tsx
💤 Files with no reviewable changes (1)
  • frontend/packages/operator-lifecycle-manager-v1/locales/en/olm-v1.json
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • frontend/public/components/modals/delete-namespace-modal.tsx
  • frontend/packages/operator-lifecycle-manager-v1/src/components/cluster-extension/CreateServiceAccountModal.tsx
  • frontend/packages/console-app/src/components/modals/add-group-users-modal.tsx
  • frontend/packages/console-shared/src/components/modals/TextInputModal.tsx
🧬 Code graph analysis (4)
frontend/public/components/modals/delete-namespace-modal.tsx (1)
frontend/packages/console-shared/src/components/modals/ModalFooterWithAlerts.tsx (1)
  • ModalFooterWithAlerts (5-25)
frontend/packages/operator-lifecycle-manager-v1/src/components/cluster-extension/CreateServiceAccountModal.tsx (1)
frontend/packages/console-shared/src/components/modals/ModalFooterWithAlerts.tsx (1)
  • ModalFooterWithAlerts (5-25)
frontend/packages/console-app/src/components/modals/add-group-users-modal.tsx (1)
frontend/packages/console-shared/src/components/modals/ModalFooterWithAlerts.tsx (1)
  • ModalFooterWithAlerts (5-25)
frontend/packages/console-shared/src/components/modals/TextInputModal.tsx (1)
frontend/packages/console-shared/src/components/modals/ModalFooterWithAlerts.tsx (1)
  • ModalFooterWithAlerts (5-25)
🔇 Additional comments (4)
frontend/public/components/modals/delete-namespace-modal.tsx (1)

27-27: Footer alert migration looks correct and behavior-preserving.

Using ModalFooterWithAlerts with errorMessage keeps the submit/cancel flow intact while standardizing error presentation in this modal.

Also applies to: 110-124

frontend/packages/console-app/src/components/modals/add-group-users-modal.tsx (1)

3-10: Good consolidation of modal error handling into the footer.

The updated footer wiring cleanly centralizes errorMessage display without changing submission/loading behavior.

Also applies to: 76-89

frontend/packages/console-shared/src/components/modals/TextInputModal.tsx (1)

17-17: This refactor is clean and consistent with the shared modal-footer alert pattern.

Error display is centralized via ModalFooterWithAlerts, and the action wiring remains intact.

Also applies to: 101-123

frontend/packages/operator-lifecycle-manager-v1/src/components/cluster-extension/CreateServiceAccountModal.tsx (1)

16-16: Nice improvement to footer consistency and action-state UX.

ModalFooterWithAlerts integration plus isLoading/isDisabled on actions keeps the flow clear while aligning this modal with the shared pattern.

Also applies to: 112-135


📝 Walkthrough

Walkthrough

This pull request refactors error handling UI across multiple modal components. It introduces a centralized ModalFooterWithAlerts component to replace inline error Alert elements and traditional ModalFooter usage. Five files are updated: four modal components in add-group-users-modal, TextInputModal, CreateServiceAccountModal, and delete-namespace-modal have their error presentation moved to the footer area, while one locale file removes an unused translation entry. The changes consolidate error display patterns while maintaining existing form validation and submission logic.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use OpenGrep to find security vulnerabilities and bugs across 17+ programming languages.

OpenGrep is compatible with Semgrep configurations. Add an opengrep.yml or semgrep.yml configuration file to your project to enable OpenGrep analysis.

Copy link
Member

@rhamilto rhamilto left a comment

Choose a reason for hiding this comment

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

Awesome. Thanks, @sg00dwin!

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 18, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 18, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhamilto, sg00dwin

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

The pull request process is described here

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-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 18, 2026
@sg00dwin sg00dwin force-pushed the follow-on-modal-footer-fixes branch from 0049115 to 70f8fc3 Compare March 19, 2026 16:27
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Mar 19, 2026
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 19, 2026

New changes are detected. LGTM label has been removed.

@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 19, 2026
@sg00dwin
Copy link
Member Author

/retest-required

@sg00dwin
Copy link
Member Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 20, 2026

@sg00dwin: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-console 59273a0 link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

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. component/core Related to console core functionality component/olm Related to OLM component/shared Related to console-shared docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated px-approved Signifies that Product Support has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants