Skip to content

improvement: migrate org role modals to v3#7118

Merged
scott-ray-wilson merged 1 commit into
mainfrom
migrate-org-role-modals-to-v3
Jul 1, 2026
Merged

improvement: migrate org role modals to v3#7118
scott-ray-wilson merged 1 commit into
mainfrom
migrate-org-role-modals-to-v3

Conversation

@scott-ray-wilson

Copy link
Copy Markdown
Contributor

Context

Migrate the create org role and duplicate org role to v3 components

Screenshots

CleanShot 2026-07-01 at 14 20 22@2x CleanShot 2026-07-01 at 14 20 16@2x

Steps to verify the change

  • create role
  • duplicate role

Type

  • Fix
  • Feature
  • Improvement
  • Breaking
  • Docs
  • Chore

Checklist

  • Title follows the conventional commit format: type(scope): short description (scope is optional, e.g., fix: prevent crash on sync or fix(api): handle null response).
  • Tested locally
  • Updated docs (if needed)
  • Updated CLAUDE.md files (if needed)
  • Read the contributing guide

@infisical-review-police

Copy link
Copy Markdown

💬 Discussion in Slack: #pr-review-infisical-7118-improvement-migrate-org-role-modals-to-v3

Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR migrates the Create/Update Org Role and Duplicate Org Role modals from v2 component primitives (Modal, FormControl, Spinner) to their v3 equivalents (Dialog, Field/FieldGroup/FieldLabel/FieldError, PageLoader). It also updates button props (isLoadingisPending, colorSchemavariant) and labels the description field as "(optional)" for clarity.

  • DuplicateOrgRoleModal: replaces Spinner loading state with PageLoader, updates the error color class from text-red to text-danger, and uses DialogDescription for the subtitle.
  • RoleModal: wraps cancel button in DialogClose for proper dialog dismissal semantics, and drops the now-redundant manual onClick handler that called handlePopUpToggle.

Confidence Score: 5/5

Straightforward component library migration with no logic changes; safe to merge.

Both files only swap v2 UI primitives for v3 equivalents without touching any data-fetching, mutation, or validation logic. The Zod schema, react-hook-form wiring, and API calls are untouched. The FieldError component correctly returns null when error?.message is undefined, so no spurious error UI appears. The only behavioral delta is cosmetic: PageLoader replaces Spinner, text-danger replaces text-red, and DialogClose handles the cancel button instead of a manual toggle call.

No files require special attention.

Important Files Changed

Filename Overview
frontend/src/pages/organization/RoleByIDPage/components/DuplicateOrgRoleModal.tsx Migrates duplicate role modal from v2 (Modal/FormControl/Spinner) to v3 (Dialog/Field/PageLoader) components; changes loading indicator and error color class from text-red to text-danger.
frontend/src/pages/organization/RoleByIDPage/components/RoleModal.tsx Migrates create/update role modal from v2 to v3 components; swaps isLoading for isPending on the submit button and updates cancel button to use DialogClose.

Reviews (1): Last reviewed commit: "improvement: migrate org role modals to ..." | Re-trigger Greptile

@victorvhs017 victorvhs017 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@scott-ray-wilson scott-ray-wilson merged commit 7869029 into main Jul 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants