fix(admin): add skeleton loader to invite-user Org select#1735
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughTwo invite-user forms and one client invite dialog now use ChangesInvite users form UX refactor
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
web/sdk/admin/views/organizations/details/layout/invite-users-dialog.tsx (1)
111-129: 📐 Maintainability & Code Quality | 🔵 TrivialDuplicate email-parsing / disable logic across both invite dialogs.
This
isDisabledcomputation (parse emails, check role, submitting, errors) is duplicated almost verbatim inweb/sdk/admin/views/users/list/invite-users.tsx. Consider extracting a shared hook (e.g.useInviteFormDisabled(values, isSubmitting, errors)) to avoid divergence when validation rules change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1b195017-2b13-4e58-a43b-dbe15e9b8041
📒 Files selected for processing (3)
web/sdk/admin/views/organizations/details/layout/invite-users-dialog.tsxweb/sdk/admin/views/users/list/invite-users.module.cssweb/sdk/admin/views/users/list/invite-users.tsx
💤 Files with no reviewable changes (1)
- web/sdk/admin/views/users/list/invite-users.module.css
Coverage Report for CI Build 28848510466Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage remained the same at 44.865%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
web/sdk/client/views/members/components/invite-member-dialog.tsx (1)
34-46: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low valueMinor: schema re-instantiated per validation call.
yup.string().email()is created fresh on every email in the list during.test; hoisting it outside the test callback avoids redundant object construction on each keystroke/submit.♻️ Suggested tweak
+const emailValidator = yup.string().email(); + const inviteSchema = yup.object({ ... .test('emails', 'Enter valid email address(es)', value => { ... return ( emailList.length > 0 && - emailList.every(email => yup.string().email().isValidSync(email)) + emailList.every(email => emailValidator.isValidSync(email)) ); }) });
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3802b7be-3d7f-4f7d-9169-c71410692f5c
📒 Files selected for processing (3)
web/sdk/admin/views/organizations/details/layout/invite-users-dialog.tsxweb/sdk/admin/views/users/list/invite-users.tsxweb/sdk/client/views/members/components/invite-member-dialog.tsx
Summary
The Organization select in the Users-list "Invite user" dialog did not render a skeleton loader while its data was loading. This PR adds the skeleton (driven by the real query loading state) and applies a set of consistency cleanups across the admin invite dialogs and the client SDK invite dialog.
Following the review discussion, the previous "disable the submit button" pattern has been replaced with schema-level validation and visible field-level error messages. The submit button no longer silently disables; instead, missing required fields and malformed emails surface inline messages through the Field component.
Changes
Technical Details
Test Plan
SQL Safety (if your PR touches
*_repository.goorgoqu.*)N/A