Skip to content

refactor(ui): migrate Groups tab and CreateGroupModal to Alchemy components CAT-1546#16541

Merged
annadoesdesign merged 19 commits into
masterfrom
refactor/groups-tab-alchemy-migration
Mar 18, 2026
Merged

refactor(ui): migrate Groups tab and CreateGroupModal to Alchemy components CAT-1546#16541
annadoesdesign merged 19 commits into
masterfrom
refactor/groups-tab-alchemy-migration

Conversation

@annadoesdesign

@annadoesdesign annadoesdesign commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Before:
Screenshot 2026-03-11 at 4 52 44 PM
Screenshot 2026-03-11 at 4 52 51 PM

After:
Screenshot 2026-03-12 at 1 21 20 PM
Screenshot 2026-03-12 at 1 21 23 PM

Summary

  • Migrate Groups tab (GroupList.tsx) from antd/custom components to Alchemy equivalents: Table, SearchBar, Pagination, Avatar, Pill, Menu, SimpleSelectRole, and Button — preserving all existing functionality (CRUD, role assignment, search, onboarding tour)
  • Migrate CreateGroupModal from antd Form/Input/Collapse to Alchemy Input (with built-in labels), Label, and Button toggle for the Advanced section
  • Fix flex height chain through antd Tabs internals (ContentRoutedTabsStyleStyledTabsPrimary → tab pane → RouteContainer) so the table fills available space with pagination pinned at the bottom instead of overflowing off-screen
  • Replace hardcoded colors with semantic theme tokens (theme.colors.textSecondary, theme.colors.border, theme.colors.bg) across all touched files
  • Remove extra padding from ServiceAccountList containers for consistency

Checklist

  • PR conforms to DataHub's Contributing Guideline (PR Title Format)
  • No breaking changes — all existing functionality preserved
  • No new dependencies added
  • yarn lint (eslint + prettier + type-check) passes
  • Tests for the changes have been added/updated (no existing tests affected; CSS-only layout changes)
  • Docs related to the changes have been added/updated (not applicable — internal UI refactor)

Test plan

  • Verify Groups tab renders correctly: table, search, pagination, avatars, pills, role selector, actions menu
  • Verify Create Group modal opens, validates inputs, and creates groups successfully
  • Verify group deletion via actions menu works
  • Verify role assignment via inline select works with confirmation modal
  • Verify table scrolls internally with pagination pinned at the bottom (not pushed off-screen)
  • Verify Users and Service Accounts tabs are unaffected
  • Verify light and dark theme rendering (semantic color tokens)

Made with Cursor

…onents

Replace legacy antd and custom components in the Groups identity tab with
their Alchemy equivalents to align with the ongoing design system migration.

Groups tab (GroupList.tsx):
- Replace antd List with Alchemy Table (with inline cell components)
- Replace custom SearchBar with Alchemy SearchBar
- Replace antd Pagination with Alchemy Pagination
- Replace custom avatars/pills/menus with Alchemy Avatar, Pill, Menu
- Replace role selector with Alchemy SimpleSelectRole
- Add three-dot vertical actions menu (Phosphor DotsThreeVertical)
- Move "Create Group" button to page header (dynamic per active tab)
- Use semantic theme color tokens instead of hardcoded values

CreateGroupModal:
- Replace antd Form/Input with Alchemy Input (with built-in labels)
- Replace antd Collapse with Alchemy Button toggle for Advanced section
- Use Alchemy Label component for Description field
- Use semantic theme color tokens

Layout fixes:
- Fix flex height chain through antd Tabs internals so table content
  fills available space with pagination pinned at the bottom
- Remove conflicting overflow/sticky-header CSS that broke Alchemy
  Table's native scroll behavior
- Remove extra padding from ServiceAccountList containers

Made-with: Cursor
@github-actions github-actions Bot added the product PR or Issue related to the DataHub UI/UX label Mar 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Linear: CAT-1511

@alwaysmeticulous

alwaysmeticulous Bot commented Mar 11, 2026

Copy link
Copy Markdown

🔴 Meticulous spotted visual differences in 23 of 1515 screens tested: view and approve differences detected.

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

Last updated for commit e2af4c8. This comment will update as new commits are pushed.

@codecov

codecov Bot commented Mar 12, 2026

Copy link
Copy Markdown

Bundle Report

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

Detailed changes
Bundle name Size Change
datahub-react-web-esm 23.78MB 2.71kB (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.71kB 13.61MB 0.02%

Files in assets/index-*.js:

  • ./src/app/entity/user/UserProfile.tsx → Total Size: 3.84kB

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

  • ./src/app/entityV2/user/UserProfile.tsx → Total Size: 6.43kB

  • ./src/app/identity/serviceAccount/ServiceAccountList.components.tsx → Total Size: 9.75kB

  • ./src/app/identity/useRoleAssignment.ts → Total Size: 3.29kB

  • ./src/app/entityV2/shared/sidebarSection/UserGroupSidebarSection.tsx → Total Size: 1.45kB

  • ./src/app/identity/ManageUsersAndGroups.components.tsx → Total Size: 2.38kB

  • ./src/app/identity/group/CreateGroupModal.components.tsx → Total Size: 594 bytes

  • ./src/app/identity/ManageUsersAndGroups.tsx → Total Size: 3.97kB

  • ./src/app/entityV2/user/UserGroups.tsx → Total Size: 3.86kB

  • ./src/app/entity/user/UserGroups.tsx → Total Size: 3.73kB

  • ./src/app/entityV2/shared/EntitySearchSelect/ActorsSearchSelect.tsx → Total Size: 5.51kB

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

  • ./src/app/identity/group/CreateGroupModal.tsx → Total Size: 5.82kB

@codecov

codecov Bot commented Mar 12, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
...ub-web-react/src/app/identity/useRoleAssignment.ts 94.89% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

@maggiehays maggiehays added the needs-review Label for PRs that need review from a maintainer. label Mar 12, 2026
…and Cypress selectors

- Fix description not showing: use info.description and editableProperties.description
  instead of non-existent properties.description in listGroups query
- Add editableProperties.description to listGroups GraphQL query
- Replace Editor with TextArea in CreateGroupModal (rich text wasn't rendering on profile)
- Add table-layout: fixed and column width percentages to prevent content overflow
- Truncate long descriptions with ellipsis
- Change members pill to small gray outline
- Show empty cell instead of "-" when no description
- Apply flexbox layout chain (PR #16565 pattern) to AlchemyRoutedTabs and Content
- Update Cypress tests: fix remove group flow, description selector, button casing

Made-with: Cursor
annadoesdesign and others added 2 commits March 13, 2026 09:44
Use displayName instead of group.name in GroupActionsMenu data-testid
so the selector reflects edited group names. Wrap createGroup in V2
mode in dataset_ownership.js since the Create Group button now lives
in the V2 header. Update delete assertion in v2_managing_groups.js to
match the actual dynamic success message.

Made-with: Cursor
@annadoesdesign annadoesdesign force-pushed the refactor/groups-tab-alchemy-migration branch from dadaa97 to a36cd05 Compare March 17, 2026 18:25
@maggiehays maggiehays added needs-review Label for PRs that need review from a maintainer. and removed pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Mar 17, 2026
@annadoesdesign annadoesdesign changed the title refactor(ui): migrate Groups tab and CreateGroupModal to Alchemy components refactor(ui): migrate Groups tab and CreateGroupModal to Alchemy components CAT-1546 Mar 17, 2026
…-alchemy-migration

Made-with: Cursor

# Conflicts:
#	datahub-web-react/src/app/entityV2/user/UserProfile.tsx
Update Phosphor icon usage in group identity components to pass
direct component references instead of string literals, aligning
with the new Icon API from #16338.

Made-with: Cursor
const AdvancedButton = styled(Button)`
padding-left: 0;
padding-right: 0;
color: ${(props) => props.theme.colors.textSecondary};

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.

Ideally we should refactor styles into .components. file (especially for larger files).

{groups.length > 0 ? (
<>
<Table columns={columns} data={groups} isLoading={loading} isScrollable />
<div style={{ paddingTop: '8px', display: 'flex', justifyContent: 'center' }}>

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.

Nit: we should not be embedding styles inline (not until we switch to Tailwind!)

const isGroupsTab = activeTab === 'groups';

const renderActionButton = () => {
if (isServiceAccountsTab) {

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.

Nit: missed opportunity for a switch!


setTimeout(async () => {
clearRoleListCache(client);
await refetch();

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.

Technically refetch can fail too. We should probably try/catch (use .then() without async/await).

newRoleUrn === NO_ROLE_URN
? `Failed to remove role from ${entityLabel} ${roleAssignmentState.actorName}: ${e.message || ''}`
: `Failed to assign role ${roleToAssign?.name} to ${entityLabel} ${roleAssignmentState.actorName}: ${e.message || ''}`,
);

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.

Instead of repeating ternary logic in toasts we could precalculate the message e.g.

const isRemoval = newRoleUrn === NO_ROLE_URN;
const successMsg = isRemoval ? `Removed role from ...` : `Assigned role ...`;
const failureMsg = isRemoval ? `Failed to remove role from ...` : `Failed to assign role ...`;

@benjiaming

Copy link
Copy Markdown
Contributor

Thanks for migrating Groups!

- Extract CreateGroupModal styled components into .components.tsx file
- Replace inline styles with PaginationContainer styled component
- Use switch statement in ManageUsersAndGroups renderActionButton
- Handle refetch errors in useRoleAssignment with .then()/.catch()
- Precalculate isRemoval/success/failure toast messages

Made-with: Cursor
@annadoesdesign annadoesdesign merged commit 193bd21 into master Mar 18, 2026
43 of 44 checks passed
@annadoesdesign annadoesdesign deleted the refactor/groups-tab-alchemy-migration branch March 18, 2026 18:44
david-leifker pushed a commit that referenced this pull request May 27, 2026
…to Alchemy components CAT-1546 (#16541)

Conflicts resolved by Claude AI.

Merged from commit 193bd21
Original author: Anna Everhart <149417426+annadoesdesign@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Label for PRs that need review from a maintainer. product PR or Issue related to the DataHub UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants