Skip to content

Conversation

@pedro93
Copy link
Collaborator

@pedro93 pedro93 commented Jan 12, 2026

Summary

  • Add useRoleSelector hook with pagination (infinite scroll) and search capability for role dropdowns
  • Migrate UserList, GroupList, and ViewInviteTokenModal to use the new centralized hook
  • Remove dead code from ViewInviteTokenModal (unused location/query parsing)
  • Add comprehensive tests for useRoleSelector hook

This addresses scalability issues when organizations have many roles (>10), where the previous implementation only fetched the first 10 roles.

Test plan

  • Verify role dropdown shows all roles with infinite scroll
  • Verify search filters roles correctly
  • Verify role selection works in user list, group list, and invite modal
  • Run tests: yarn test src/app/identity/user/__tests__/useRoleSelector.test.ts --run
  • Run type-check: yarn type-check
  • Run lint on all changed files

Add useRoleSelector hook with pagination (infinite scroll) and search
capability for role dropdowns. Migrate UserList, GroupList, and
ViewInviteTokenModal to use the new centralized hook.

This addresses scalability issues when organizations have many roles (>10),
where the previous implementation only fetched the first 10 roles.

Changes:
- Add useRoleSelector hook with infinite scroll and search capability
- Migrate GroupList, UserList, and ViewInviteTokenModal to use new hook
- Add comprehensive tests for useRoleSelector

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Jan 12, 2026
@alwaysmeticulous
Copy link

alwaysmeticulous bot commented Jan 12, 2026

✅ Meticulous spotted 0 visual differences across 952 screens tested: view results.

Meticulous evaluated ~8 hours of user flows against your PR.

Expected differences? Click here. Last updated for commit 54a1dbd. This comment will update as new commits are pushed.

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

❌ Patch coverage is 86.20690% with 12 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...web-react/src/app/identity/user/useRoleSelector.ts 86.20% 12 Missing ⚠️

📢 Thoughts on this report? Let us know!

@codecov
Copy link

codecov bot commented Jan 12, 2026

Bundle Report

Changes will increase total bundle size by 2.21kB (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
datahub-react-web-esm 29.45MB 2.21kB (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: datahub-react-web-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 2.21kB 19.28MB 0.01%

Files in assets/index-*.js:

  • ./src/app/identity/user/ViewInviteTokenModal.tsx → Total Size: 5.83kB

  • ./src/app/identity/group/GroupListItem.tsx → Total Size: 3.15kB

  • ./src/app/identity/group/SelectRoleGroup.tsx → Total Size: 3.53kB

  • ./src/app/identity/user/SelectRole.tsx → Total Size: 3.48kB

  • ./src/app/identity/user/UserList.tsx → Total Size: 5.01kB

  • ./src/app/identity/group/GroupList.tsx → Total Size: 4.26kB

  • ./src/app/identity/user/useRoleSelector.ts → Total Size: 2.41kB

  • ./src/app/identity/user/UserListItem.tsx → Total Size: 5.0kB

Connect useRoleSelector hook's pagination and search capabilities to
SelectRole and SelectRoleGroup components. The dropdowns now support:
- Server-side search filtering with debounce
- Infinite scroll for large role lists
- Loading states during fetch

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@pedro93 pedro93 merged commit 616efda into master Jan 12, 2026
26 checks passed
@pedro93 pedro93 deleted the feature/role-selector-pagination branch January 12, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-submitter-merge product PR or Issue related to the DataHub UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants