Skip to content

ATLAS-5376: Atlas UI: Relationship cards layout breaking, overlapping, and tooltip placement issues with long entity names (React & Classic UI) - #737

Open
Brijesh619 wants to merge 2 commits into
apache:masterfrom
Brijesh619:ATLAS-5376

Conversation

@Brijesh619

@Brijesh619 Brijesh619 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

ATLAS-5376: Atlas UI: Relationship cards layout breaking, overlapping, and tooltip placement issues with long entity names (React & Classic UI)

This patch addresses several layout and rendering issues on the Entity Detail "Relationships" tab when dealing with extremely long relationship item names (e.g., massive queries or Kafka topic names without spaces). These issues were present in both the modern React UI and the classic UI.

React UI Changes:

  • Tooltip Implementation: Wrapped the MUILink for relationship nodes in a <LightTooltip> component so that users can view the full name on hover.
  • Max Width Adjustments: Reduced the max-width of the React UI relationship container to 350px to prevent overlap with the main graph canvas.
  • Text Truncation: Inherited CSS ellipsis text-truncation from the .relationship-node-link class to ensure long names truncate cleanly with ... instead of stretching the container.
  • Color Consistency: Introduced explicit .text-active (#1976d2) and .text-deleted (#BB5838) utility classes in detailPage.scss to guarantee visual consistency between the modern React interface and the legacy Backbone interface (replacing the generic .text-blue which mismatched the hex code).

Classic UI Changes:

  • Flexbox Blowout Fix: Added min-width: 0 to flex-column containers in relationship.scss to allow relationship items to shrink properly below their flex-basis content size.
  • Text Truncation: Applied white-space: nowrap; overflow: hidden; text-overflow: ellipsis; to .entity-list-item and .relationship-card-link in graph.scss and relationship.scss.
  • Tooltip Lifecycle & Layout:
    • Standardized .tooltip-inner in theme.scss with a max-width: 300px and word-wrap: break-word (preventing global typography issues) to ensure tooltip content wraps correctly rather than extending horizontally off-screen.
    • Dynamically initialized Bootstrap tooltips inside RelationshipLayoutView.js and RelationshipCardsLayoutView.js ($.fn.tooltip) using container: 'body' to ensure tooltips are not clipped by parent containers.
    • Memory Leak Prevention: Explicitly destroyed tooltips prior to DOM re-renders via .html() and within the onDestroy lifecycle hooks to prevent accumulating orphaned div.tooltip elements in the DOM.
    • Duplicate Tooltips Fix: Removed redundant title attributes on parent wrapper tags (like <li>) to prevent overlapping, double-rendering tooltips on hover.

How was this patch tested?

  • Manual Testing:
    • Created test entities with exceptionally long relationship names (over 300+ characters with no spaces).
    • Navigated to the "Relationships" tab in both the React UI and the Classic UI.
    • Verified that the relationship side-panel list now properly truncates the long names with ... and does not bleed out of its layout boundary or overlap the center graph.
    • Hovered over the truncated items and verified that the tooltips (MUI Tooltip in React; Bootstrap Tooltip in Classic) appear successfully without overlapping duplicates.
    • Verified that the tooltip itself cleanly wraps the extremely long text onto multiple lines within a 300px box, staying visible on the screen without splitting normal words in half.
    • Toggled between views and closed panels to verify tooltip DOM nodes were successfully destroyed without causing memory leaks.
  • Automated Testing:
    • Ran npm run test against RelationshipLineage.test.tsx to verify standard component rendering and the new <LightTooltip> interaction.
    • Validated build via npx tsc --noEmit to ensure type safety around the new React implementations.

@Brijesh619
Brijesh619 force-pushed the ATLAS-5376 branch 2 times, most recently from 209457a to 6f6b52b Compare August 20, 2026 05:31
@Brijesh619

Copy link
Copy Markdown
Contributor Author
Screenshot from 2026-08-20 10-54-26 Screenshot from 2026-08-20 10-54-20 Screenshot from 2026-08-20 10-53-05 Screenshot from 2026-08-20 10-33-48 Screenshot from 2026-08-20 10-31-18

…, and tooltip placement issues with long entity names (React & Classic UI)
@Brijesh619 Brijesh619 changed the title Atlas UI: Relationship cards layout breaking, overlapping, and tooltip placement issues with long entity names (React & Classic UI) ATLAS-5376: Atlas UI: Relationship cards layout breaking, overlapping, and tooltip placement issues with long entity names (React & Classic UI) Aug 26, 2026
@Brijesh619

Copy link
Copy Markdown
Contributor Author
Screenshot from 2026-08-26 10-32-13 Screenshot from 2026-08-26 10-32-13

@Brijesh619

Copy link
Copy Markdown
Contributor Author
Screenshot from 2026-08-26 10-35-35

…, and tooltip placement issues with long entity names (React & Classic UI)
margin-bottom: 5px;
text-align: left;

&.entity-list-item {

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.

Ellipsis is applied to ul > li.entity-list-item, but buildListItem() in RelationshipLayoutView.js (~lines 359–361) puts long text inside . Ellipsis on

  • does not reliably truncate nested inline text.

    Consider moving truncation to .entity-list-item .entity-type-name (with display: inline-block; max-width: 100%) — same pattern used for .relationship-card-link in relationship.scss. Truncation on

  • alone may not clip anchor content.

    confirm this, and update

  • expect(screen.getByTestId('relationshipSVG')).toBeInTheDocument();
    });

    it('should apply deleted-relation class for deleted entities', () => {

    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.

    This test name implies class verification but only checks SVG rendering. Please assert text-deleted on the link and/or deleted-relation on the

  • after opening the drawer with a DELETED entity.

  • });

    describe('Tooltip Rendering', () => {
    it('should render LightTooltip for relationship nodes in drawer', async () => {

    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.

    Please add negative/edge cases: deleted status styling, missing typeName label, and at least one assertion that tooltip title matches full untruncated text. Classic UI tooltip lifecycle has zero automated coverage.

    interface CustomLinkProps {
    href: string;
    status: string;
    guid: string;

    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.

    guid is declared in the interface and destructured but never used.
    Remove unused guid from CustomLinkProps and destructuring, or use it (e.g. as key / data-testid).

    verify and update

    * limitations under the License.
    */

    // @ts-nocheck

    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.

    If adding types, consider removing @ts-nocheck incrementally — otherwise the type improvements provide limited value.


    .tooltip-inner {
    max-width: none;
    max-width: 300px;

    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.

    Global Classic UI tooltip width change — possible regression
    .tooltip-inner { max-width: 300px } is global. Other Classic UI tooltips that relied on max-width: none may now wrap/truncate unexpectedly.

    Scope tooltip max-width to relationship views (e.g. .relationship-node-details .tooltip-inner) instead of changing the global .tooltip-inner rule.

    }.bind(this),
    getdefault = function(options) {
    return "<pre class='entity-type-name' style='color:" + options.color + "'>" + options.name + "</pre>";
    getdefault = function (options) {

    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.

    Dead code
    (~lines 274–336)

    getdefault, getWithButton, getEntityTypelist, and getElement are defined but getElement is never called. The list uses buildListItem() (~lines 352–387). Refactored color-class logic in the unused path adds review noise without effect.

    getElement/getEntityTypelist appear unused in searchNode. Consider removing dead code or clarifying if another code path uses it. Also, pre-existing return entityTypeHtml + ""; (~line 328) looks like a bug.

    return { nodes: nodes, links: links };
    },
    onRender: function() {
    onRender: function () {

    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.

    Large formatting-only diff
    ~160 lines are whitespace/function() → function () changes unrelated to the fix. Makes review harder.
    update this in the changed files

    >
    {name} ({typeName})
    </MUILink>
    <LightTooltip title={displayLabel}>

    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.

    (~lines 71–84, 541–549)

    MUI Tooltip expects a child that holds a ref. MUILink + RouterLink can trigger console warnings. Wrapping in <span style={{ display: 'block', overflow: 'hidden' }}> is safer.

    .tooltip-inner {
    max-width: none;
    max-width: 300px;
    word-wrap: break-word;

    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.

    Deprecated CSS property
    word-wrap: break-word is legacy; prefer overflow-wrap: break-word.

    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