Skip to content

tooltip#96

Open
karamba228 wants to merge 3 commits into
mainfrom
tooltip
Open

tooltip#96
karamba228 wants to merge 3 commits into
mainfrom
tooltip

Conversation

@karamba228

Copy link
Copy Markdown
Contributor

Reference Issues or PRs

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Documentation

Access-centered content checklist

Text styling

  • The content is written with plain language (where relevant).
  • If there are headers, they use the proper header tags (with only one level-one header: H1 or # in markdown).
  • All links describe where they link to (for example, check the Nebari website).
  • This content adheres to the Nebari style guides.

Non-text content

  • All content is represented as text (for example, images need alt text, and videos need captions or descriptive transcripts).
  • If there are emojis, there are not more than three in a row.
  • Don't use flashing GIFs or videos.
  • If the content were to be read as plain text, it still makes sense, and no information is missing.

Any other comments?

@karamba228 karamba228 requested a review from smeragoel July 1, 2026 15:03
@karamba228 karamba228 linked an issue Jul 1, 2026 that may be closed by this pull request
8 tasks

@smeragoel smeragoel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @karamba228, looks great!! I've added a few comments in the code, also additionally:

  1. I'm seeing a drifting issue on zoom that we saw in radio / checkboxes as well (sorry for the low quality gif 😓)
Image
  1. The arrow uses rounded corners, so even the edges that should sit flush against the tooltip border have a rounded border (blue highlight). Also, the pointer end overlaps with the border of the button (red highlight)
Image

Comment on lines +97 to +122
<div className="grid grid-cols-2 items-center justify-items-center gap-6 sm:grid-cols-4">
<Tooltip>
<TooltipTrigger render={<Button variant="outline" />}>
Top
</TooltipTrigger>
<TooltipContent side="top">Top Tooltip</TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger render={<Button variant="outline" />}>
Right
</TooltipTrigger>
<TooltipContent side="right">Right Tooltip</TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger render={<Button variant="outline" />}>
Bottom
</TooltipTrigger>
<TooltipContent side="bottom">Bottom Tooltip</TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger render={<Button variant="outline" />}>
Left
</TooltipTrigger>
<TooltipContent side="left">Left Tooltip</TooltipContent>
</Tooltip>
</div>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: I'd rearrange these to show tooltips in the order left - top - bottom - right so that the buttons are not hidden by tooltips of the adjacent button.

Comment thread stories/tooltip.stories.tsx Outdated
Comment on lines +126 to +138
export const Left: Story = {
name: 'Left hover',
render: () => (
<Tooltip>
<TooltipTrigger render={<Button variant="outline" />}>
Hover left
</TooltipTrigger>
<TooltipContent side="left">
Tooltip content displayed on the left.
</TooltipContent>
</Tooltip>
),
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is redundant because of the previous story and can be removed.

Comment thread stories/tooltip.stories.tsx Outdated
Comment on lines +192 to +201
export const Disabled: Story = {
render: () => (
<Tooltip disabled>
<TooltipTrigger render={<Button disabled variant="outline" />}>
Disabled
</TooltipTrigger>
<TooltipContent>This tooltip is disabled.</TooltipContent>
</Tooltip>
),
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a complicated story, since disabled buttons cannot have tooltips triggered. We can remove it altogether.

Comment thread registry.json Outdated
"name": "tooltip",
"type": "registry:ui",
"title": "Tooltip",
"description": "Compact supplemental information shown on hover or keyboard focus, with anchored positioning and optional arrow.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"description": "Compact supplemental information shown on hover or keyboard focus, with anchored positioning and optional arrow.",
"description": "Compact supplemental information shown on hover or keyboard focus, with anchored positioning and optional arrow. Touch devices don't trigger tooltips so critical information shouldn't live only in a tooltip.",

@karamba228 karamba228 requested a review from smeragoel July 3, 2026 15:00
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.

Add the Tooltip Component

2 participants