Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip rework #156

Merged
merged 5 commits into from
Apr 15, 2024
Merged

Tooltip rework #156

merged 5 commits into from
Apr 15, 2024

Conversation

florianduros
Copy link
Member

@florianduros florianduros commented Apr 9, 2024

Closes element-hq/compound#298

Migrate the current tooltip implementation from radix to floating-ui.

The tooltip props has changed, the next release should be a major release:

  • side, align & placement
    • radix-ui is using two different props for positioning: side and align
    • floating-ui is using one prop: placement which is basically side and align merged in one props
  • onEscapeKeyDown & onPointerDownOutside are partially replaced by onOpenChange. Currently they are not used in the react-sdk.

Copy link

cloudflare-workers-and-pages bot commented Apr 9, 2024

Deploying compound-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: a94c9fc
Status: ✅  Deploy successful!
Preview URL: https://f34b9ccf.compound-web.pages.dev
Branch Preview URL: https://florianduros-tooltip-floatin.compound-web.pages.dev

View logs

@florianduros florianduros force-pushed the florianduros/tooltip-floating-ui branch 4 times, most recently from a690f4f to dc6e18a Compare April 9, 2024 14:32
@florianduros florianduros force-pushed the florianduros/tooltip-floating-ui branch from dc6e18a to d894dfb Compare April 9, 2024 14:33
@florianduros florianduros force-pushed the florianduros/tooltip-floating-ui branch 2 times, most recently from 63733b8 to e7a1ee8 Compare April 9, 2024 15:04
Copy link
Member Author

Choose a reason for hiding this comment

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

The focus (blue circle) is on the eye button, so the tooltip should appear, right ?

Copy link
Member

Choose a reason for hiding this comment

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

Seems reasonable, yeah

@florianduros florianduros force-pushed the florianduros/tooltip-floating-ui branch from 4669b05 to 15bf312 Compare April 12, 2024 14:15
@florianduros florianduros force-pushed the florianduros/tooltip-floating-ui branch from 15bf312 to a94c9fc Compare April 12, 2024 14:24
@florianduros florianduros marked this pull request as ready for review April 12, 2024 14:45
@florianduros florianduros requested a review from a team as a code owner April 12, 2024 14:45
@florianduros florianduros requested review from dbkr and t3chguy and removed request for a team April 12, 2024 14:45
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

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

Phew, thanks for doing this - certainly looks like an improvement at least: nice that it doesn't <TooltipProvider>s everywhwere. Lets hope it works out better too.

Copy link
Member

Choose a reason for hiding this comment

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

Seems reasonable, yeah

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.

Investigation: Switch to a non-Radix solution for tooltips?
2 participants