Skip to content

fix(apollo-react): show node label fallback tooltips#822

Open
KodudulaAshishUiPath wants to merge 1 commit into
mainfrom
fix/MST-10975
Open

fix(apollo-react): show node label fallback tooltips#822
KodudulaAshishUiPath wants to merge 1 commit into
mainfrom
fix/MST-10975

Conversation

@KodudulaAshishUiPath

@KodudulaAshishUiPath KodudulaAshishUiPath commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Wrap node label header and subheader text in independent conditional tooltips.
  • Use the visible label/subLabel as fallback tooltip content when no labelTooltip override is provided.
  • Preserve tooltip trigger props and refs on the underlying label DOM nodes so hover and smart truncation checks work.
  • Extend smart tooltip truncation detection to recognize line-clamped multiline overflow.
  • Add a BaseNode Storybook story with deliberately long labels and sublabels for visual verification.

Demo

Screen.Recording.2026-06-15.at.16.26.03.mov

Validation

  • pnpm --filter @uipath/apollo-react exec vitest --run src/canvas/components/BaseNode/NodeLabel.test.tsx src/material/components/ap-tooltip/ApTooltip.test.tsx
  • pnpm exec biome check src/canvas/components/BaseNode/NodeLabel.tsx src/canvas/components/BaseNode/NodeLabel.test.tsx src/canvas/components/BaseNode/BaseNode.stories.tsx src/material/components/ap-tooltip/useTruncationDetection.ts src/material/components/ap-tooltip/ApTooltip.test.tsx

Copilot AI review requested due to automatic review settings June 15, 2026 11:05
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-design 🟢 Ready Preview, Logs Jun 22, 2026, 10:51:37 PM
apollo-docs 🟢 Ready Preview, Logs Jun 22, 2026, 10:51:37 PM
apollo-landing 🟢 Ready Preview, Logs Jun 22, 2026, 10:51:37 PM
apollo-vertex 🟢 Ready Preview, Logs Jun 22, 2026, 10:51:37 PM

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1942 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1712
ISC 89
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

@KodudulaAshishUiPath KodudulaAshishUiPath changed the title [codex] Show node label fallback tooltips fix(apollo-react): show node label fallback tooltips Jun 15, 2026
@KodudulaAshishUiPath KodudulaAshishUiPath marked this pull request as ready for review June 15, 2026 11:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Comment thread packages/apollo-react/src/canvas/components/BaseNode/NodeLabel.tsx Outdated
Comment thread packages/apollo-react/src/material/components/ap-tooltip/ApTooltip.test.tsx Outdated
Comment thread packages/apollo-react/src/canvas/components/BaseNode/NodeLabel.tsx
Comment thread packages/apollo-react/src/canvas/components/BaseNode/NodeLabel.tsx
@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core 9.0% 43.82 MB 57.31 MB ±0
@uipath/apollo-react 35.1% 48.4% (15/31) 7.27 MB 27.56 MB +466 B
@uipath/apollo-wind 38.6% 324.5 KB 2.23 MB +95 B
@uipath/ap-chat 85.8% 43.36 MB 55.69 MB ±0

"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.

@SreedharAvvari

Copy link
Copy Markdown
Contributor
image

the tooltip overlaps the node itself

import { render, screen, type UserEvent, userEvent } from '../../utils/testing';
import { NodeLabel, type NodeLabelProps } from './NodeLabel';

vi.mock('../CanvasTooltip', 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.

[medium] The tooltip coverage stops at the mock boundary. These NodeLabel tests replace CanvasTooltip with a test double, so they prove the mock clones trigger props but do not exercise the real integration this PR relies on: CanvasTooltip ref composition, TooltipTrigger asChild, and smart truncation checking the actual label element. That leaves the fallback tooltip behavior unprotected.

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.

Suggested change:
Add one integration-style test that uses the real CanvasTooltip path, or a focused CanvasTooltip + NodeLabel harness, and verifies a line-clamped NodeLabel opens only when the actual label element is truncated. Keep this mock for unit-level content assertions if it is still useful.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-react size:L 100-499 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants