Skip to content

refactor(ui): standardize all entity icons to Phosphor and fix sizing#16285

Open
annadoesdesign wants to merge 1 commit intomasterfrom
refactor/ui-standardize-phosphor-icons
Open

refactor(ui): standardize all entity icons to Phosphor and fix sizing#16285
annadoesdesign wants to merge 1 commit intomasterfrom
refactor/ui-standardize-phosphor-icons

Conversation

@annadoesdesign
Copy link
Contributor

@annadoesdesign annadoesdesign commented Feb 19, 2026

Summary

Standardize all V2 entity type icons from Ant Design (@ant-design/icons) and MUI (@mui/icons-material) to Phosphor (@phosphor-icons/react) for visual consistency and dark mode readiness. Fixes icon sizing inconsistencies across the UI where subtype icons rendered at 1em while entity type icons rendered at 20px.

Changes

Entity icons (28 entity types):

  • All V2 entity icon() methods now return Phosphor icons with consistent size, color="currentColor", and weight props
  • Removed all @ant-design/icons and @mui/icons-material imports from entity icon methods

Subtype icons (getSubTypeIcon):

  • Converted DatabaseOutlined, ApartmentOutlined, DeploymentUnitOutlined, FilterOutlined, LineChartOutlined to Phosphor equivalents
  • Added explicit size parameter (previously relied on CSS font-size which doesn't work on SVGs)

Icon sizing fixes:

  • ContextPath.tsx: Fixed root cause where subtypes got 1em size and entity types got 20px — now both use 14px
  • ContainerIcon.tsx: Replaced broken CSS font-size: 14px on .typeIcon (no effect on SVGs) with explicit size prop
  • getTypeIcon.tsx: Changed '1em' string to numeric 14 for Phosphor compatibility
  • ContextPathEntityIcon.tsx: Converted browse path folder icon from FolderOpenOutlined to Phosphor FolderOpen
  • Standardized all preview typeIcon calls from inconsistent 12px/14px to 14px

Preview file cleanup:

  • Replaced old Ant Design logoComponent icons with matching Phosphor icons in glossary, schema field, business attribute, and glossary node previews
  • Domain preview now uses entity registry icon instead of old DomainIcon with hardcoded color
  • DomainEntitiesSnippet: Converted entity count icons to Phosphor

Document mentions:

  • MentionsNodeView.tsx (both versions): Use semantic theme colors (textDisabled, text, icon) instead of hardcoded ANTD_GRAY
  • Added IconWrapper for consistent icon alignment in inline mentions

Before:

Screenshot 2026-02-19 at 2 24 16 PM Screenshot 2026-02-19 at 2 24 25 PM Screenshot 2026-02-19 at 2 24 21 PM

After:
Screenshot 2026-02-19 at 2 24 00 PM
Screenshot 2026-02-19 at 2 23 53 PM
Screenshot 2026-02-19 at 2 23 50 PM
Screenshot 2026-02-19 at 2 23 46 PM

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly PR Title Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable)

Made with Cursor

Migrate all V2 entity type icons from Ant Design/MUI to @phosphor-icons/react
for consistency and dark mode readiness. Fix icon sizing inconsistencies across
search results, entity profiles, browse paths, and document mentions.

- Convert all 28 entity type icon() methods to use Phosphor icons
- Convert getSubTypeIcon() from Ant Design to Phosphor (Database, Schema, etc.)
- Fix ContextPath icon sizing: subtypes got 1em while entity types got 20px
- Fix ContainerIcon CSS font-size override that didn't work on SVGs
- Fix getTypeIcon passing '1em' string to numeric fontSize parameter
- Standardize all preview typeIcon sizes to 14px
- Convert ContextPathEntityIcon browse path icon to Phosphor
- Update preview logoComponent props to use Phosphor with size prop
- Use semantic theme colors for document mention text (textDisabled, text, icon)
- Add IconWrapper for consistent mention icon alignment in documents

Co-authored-by: Cursor <cursoragent@cursor.com>
@alwaysmeticulous
Copy link

alwaysmeticulous bot commented Feb 19, 2026

🔴 Meticulous spotted visual differences in 1 of 1294 screens tested: view and approve differences detected.

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

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

@codecov
Copy link

codecov bot commented Feb 19, 2026

Bundle Report

Changes will decrease total bundle size by 10.39kB (-0.04%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
datahub-react-web-esm 29.57MB -10.39kB (-0.04%) ⬇️

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 -10.39kB 19.4MB -0.05%

Files in assets/index-*.js:

  • ./src/app/entityV2/group/Group.tsx → Total Size: 1.44kB

  • ./src/app/entityV2/dataJob/DataJobEntity.tsx → Total Size: 7.31kB

  • ./src/app/entityV2/dataPlatform/DataPlatformEntity.tsx → Total Size: 1.54kB

  • ./src/app/entityV2/application/ApplicationEntity.tsx → Total Size: 4.73kB

  • ./src/alchemy-components/components/Editor/extensions/mentions/MentionsNodeView.tsx → Total Size: 1.89kB

  • ./src/app/entityV2/domain/preview/DomainEntitiesSnippet.tsx → Total Size: 1.2kB

  • ./src/app/entityV2/dataset/DatasetEntity.tsx → Total Size: 13.35kB

  • ./src/app/entityV2/dashboard/DashboardEntity.tsx → Total Size: 8.59kB

  • ./src/app/entityV2/glossaryNode/GlossaryNodeEntity.tsx → Total Size: 3.8kB

  • ./src/app/entityV2/glossaryNode/preview/Preview.tsx → Total Size: 588 bytes

  • ./src/app/entityV2/dataProduct/preview/Preview.tsx → Total Size: 849 bytes

  • ./src/app/entityV2/dataContract/DataContractEntity.tsx → Total Size: 1.39kB

  • ./src/app/entityV2/domain/preview/Preview.tsx → Total Size: 919 bytes

  • ./src/app/entityV2/businessAttribute/preview/Preview.tsx → Total Size: 803 bytes

  • ./src/app/entityV2/glossaryTerm/preview/Preview.tsx → Total Size: 939 bytes

  • ./src/app/entity/shared/tabs/Documentation/components/editor/extensions/mentions/MentionsNodeView.tsx → Total Size: 1.84kB

  • ./src/app/entityV2/dataProcessInstance/DataProcessInstanceEntity.tsx → Total Size: 4.45kB

  • ./src/app/entityV2/businessAttribute/BusinessAttributeEntity.tsx → Total Size: 3.18kB

  • ./src/app/entityV2/document/DocumentEntity.tsx → Total Size: 3.87kB

  • ./src/app/entityV2/Access/RoleEntity.tsx → Total Size: 1.91kB

  • ./src/app/entityV2/dataFlow/DataFlowEntity.tsx → Total Size: 5.58kB

  • ./src/app/entityV2/document/preview/Preview.tsx → Total Size: 1.01kB

  • ./src/app/entityV2/glossaryTerm/GlossaryTermEntity.tsx → Total Size: 4.97kB

  • ./src/app/entityV2/application/preview/Preview.tsx → Total Size: 810 bytes

  • ./src/app/entityV2/container/ContainerEntity.tsx → Total Size: 6.68kB

  • ./src/app/entityV2/dataJob/preview/Preview.tsx → Total Size: 1.42kB

  • ./src/app/entityV2/chart/ChartEntity.tsx → Total Size: 8.24kB

  • ./src/app/entityV2/domain/DomainEntity.tsx → Total Size: 6.73kB

  • ./src/app/entityV2/dataProduct/DataProductEntity.tsx → Total Size: 5.84kB

  • ./src/app/entityV2/dataset/preview/Preview.tsx → Total Size: 1.73kB

@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Feb 19, 2026
@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

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

this seems pretty reasonable. will message IRL about a question i have

const InvalidEntityText = styled.span`
font-weight: 500;
color: ${ANTD_GRAY[7]};
text-decoration: line-through;
Copy link
Collaborator

Choose a reason for hiding this comment

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

so we want a line through invalid entities now?

margin-left: 4px;
word-break: break-all;
color: ${(props) => props.theme.styles['primary-color']};
color: ${(props) => props.theme.colors.text};
Copy link
Collaborator

Choose a reason for hiding this comment

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

is text different than the primary color?

<ShareAltOutlined
<ShareNetwork
className={TYPE_ICON_CLASS_NAME}
style={{ fontSize: fontSize || 'inherit', color: color || 'inherit' }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

the biggest change i'm seeing consistently here is we no longer default to inherit and instead default to 20 - is that intended? what changes here?

Comment on lines +39 to +43
<Database size={12} color="currentColor" /> {entityCount} {entityCount === 1 ? 'entity' : 'entities'}
<StyledDivider />
<DomainIcon /> {subDomainCount} {pluralize(subDomainCount, 'sub-domain')}
<Globe size={12} color="currentColor" /> {subDomainCount} {pluralize(subDomainCount, 'sub-domain')}
<StyledDivider />
<FileDoneOutlined /> {dataProductCount} {pluralize(dataProductCount, 'data product')}
<Package size={12} color="currentColor" /> {dataProductCount} {pluralize(dataProductCount, 'data product')}
Copy link
Collaborator

Choose a reason for hiding this comment

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

it might be nice to use entityRegistry to get the correct entity icons here for domain and data product at least

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-submitter-response Issue/request has been reviewed but requires a response from the submitter 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

Comments