Skip to content

feat(table): add base tooltip for error and image cells#210

Merged
CammilleCC merged 4 commits into
mainfrom
feat/base-tooltip
Jun 30, 2026
Merged

feat(table): add base tooltip for error and image cells#210
CammilleCC merged 4 commits into
mainfrom
feat/base-tooltip

Conversation

@CammilleCC

@CammilleCC CammilleCC commented Jun 29, 2026

Copy link
Copy Markdown
Member

Follow up of #208: This swaps the previous error tooltip for a shared TableTooltip that works for both error and image cells.

Image previews needed almost the same hover, positioning, delay, and dismiss behavior as error cells, so instead of building another near-duplicate tooltip, this puts that logic in one place. A small CellTooltip union (error | image) handles the bits that differ: what gets rendered and how each tooltip is compared.

The main benefit is that the tooltip behavior stays consistent. Error cells should behave the same as before, image cells get the same polish, and adding another tooltip type later should be a small change instead of another component.

chrome_D8S8YOQmEk.mp4

import { assertNever } from '../../../utils/helpers'

import { type VariableError } from '../../../types'
const DELAY = { open: 250, switch: 80, close: 400 }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@tmichela Please feel free to play around on the values here to see what's best for both use case.

@CammilleCC CammilleCC mentioned this pull request Jun 29, 2026
Comment thread frontend/packages/ui/src/features/table/hooks/use-table-tooltip.tsx Outdated
@CammilleCC

Copy link
Copy Markdown
Member Author

I'll merge this now. Thanks for having a look!

@CammilleCC CammilleCC merged commit 4dffffd into main Jun 30, 2026
@CammilleCC CammilleCC deleted the feat/base-tooltip branch June 30, 2026 09:52
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