Skip to content

ATLAS-5373: Atlas React UI: Extremely long entity names break layout in Latest Entities Created widget - #728

Open
Brijesh619 wants to merge 4 commits into
apache:masterfrom
Brijesh619:ATLAS-5373
Open

ATLAS-5373: Atlas React UI: Extremely long entity names break layout in Latest Entities Created widget#728
Brijesh619 wants to merge 4 commits into
apache:masterfrom
Brijesh619:ATLAS-5373

Conversation

@Brijesh619

@Brijesh619 Brijesh619 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

ATLAS-5373: Atlas React UI: Refactor and stabilize layout in Latest Entities Created widget

This PR fixes styling, layout, and type-safety bugs in the "Latest Entities Created" widget and its underlying shared components. It migrates away from inline sx objects to strict, maintainable SCSS classes, and drastically improves the performance and strictness of shared UI components.

  • Strict SCSS Migration: Removed inline sx styles across the LatestEntitiesList component and migrated them to LatestEntitiesList.scss, ensuring strict separation of concerns and eliminating React render overhead for styles.
  • Intelligent Truncation: Implemented the OverflowTooltip component to elegantly handle long entity and type names. The flex layout was hardened so that the entity name shrinks responsively while keeping the type name visible, with tooltips automatically appearing on hover if truncation occurs.
  • Tooltip Enhancements: Upgraded the underlying OverflowTooltip component in muiComponents.tsx to use ResizeObserver (combined with an onMouseEnter fallback) for accurate, highly-performant DOM boundary detection that successfully handles subpixel truncation quirks.
  • Global Type-Safety Refactor: Completely refactored CustomButton to rigorously enforce native @mui/material/ButtonProps, eliminating legacy any escape hatches. Proactively cleaned up invalid props and event handlers across 6 downstream consumers (like Modal, AdvancedSearch, and ShowMoreDrawer) to guarantee 100% type safety.
  • UX Consistency: Restored the "Created " prefix on relative timestamps to maintain UX expectations.

How was this patch tested?

  • Manual UI Testing: Verified in the dashboard that extremely long entity names cleanly truncate with an ellipsis ..., the type name remains appropriately visible, and the tooltip appears precisely when fractional overflow occurs.
  • Unit Tests:
    • Updated over 10 assertions in LatestEntitiesList.test.tsx to validate the restored "Created " string prefix and fallback rendering.
    • All tests run successfully via npm run test.
  • TypeScript Validation: Passed rigorous strict type checking (npm run typecheck) across the entire dashboard with zero errors.

@Brijesh619

Copy link
Copy Markdown
Contributor Author
Screenshot from 2026-08-17 12-11-36 Screenshot from 2026-08-17 12-08-37 Screenshot from 2026-08-17 12-08-25

Comment thread dashboard/src/views/DashboardOverview/LatestEntitiesList.tsx Outdated
Comment thread dashboard/src/components/muiComponents.tsx Outdated
Comment thread dashboard/src/components/muiComponents.tsx Outdated
Comment thread dashboard/src/components/muiComponents.tsx Outdated
Comment thread dashboard/src/components/__tests__/muiComponents.test.tsx
Comment thread dashboard/src/views/DashboardOverview/LatestEntitiesList.scss Outdated
Comment thread dashboard/src/views/DashboardOverview/LatestEntitiesList.tsx Outdated
Comment thread dashboard/src/components/muiComponents.tsx Outdated
Comment thread dashboard/src/components/muiComponents.tsx Outdated
@Brijesh619

Copy link
Copy Markdown
Contributor Author
Screenshot from 2026-08-21 14-50-14

Comment thread dashboard/src/views/DashboardOverview/LatestEntitiesList.tsx Outdated
Comment thread dashboard/src/views/DashboardOverview/LatestEntitiesList.scss
Comment thread dashboard/src/views/DashboardOverview/LatestEntitiesList.tsx Outdated
@Brijesh619

Copy link
Copy Markdown
Contributor Author
Screenshot from 2026-08-24 15-22-47

@Brijesh619

Copy link
Copy Markdown
Contributor Author
Screenshot from 2026-08-24 15-24-49

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