Skip to content

[tooltip][popover] Refactor popup auto resize logic - #3652

Merged
atomiks merged 1 commit into
mui:masterfrom
atomiks:refactor/tooltip-popover-viewport
Jan 9, 2026
Merged

atomiks merged 1 commit into
mui:masterfrom
atomiks:refactor/tooltip-popover-viewport

Conversation

@atomiks

@atomiks atomiks commented Dec 31, 2025 •

Copy link
Copy Markdown
Contributor
  • Moves usePopupAutoResize() into Viewport part for treeshaking when it's not being used.
  • Ensures translate() positioning is used instead of top/left if the Viewport part is missing. This should solve things like this https://x.com/sajadevo_/status/2004063902636945842 (I have no way to verify though) because it rounds to the device's subpixel grid instead of being totally unrounded. This also ensures you can use detached triggers without needing to specify --popup-width/--positioner-width etc. variables as it's explicitly opt-in.

@atomiks atomiks added component: tooltip Changes related to the tooltip component. component: popover Changes related to the popover component. labels Dec 31, 2025
@pkg-pr-new

pkg-pr-new Bot commented Dec 31, 2025 •

Copy link
Copy Markdown
  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@3652
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@3652
    

commit: b6316ec

@mui-bot

mui-bot commented Dec 31, 2025 •

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react ▼-701B(-0.17%) ▼-216B(-0.16%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Dec 31, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit b6316ec
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/696081727c7e260008e0cf70
😎 Deploy Preview https://deploy-preview-3652--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@atomiks
atomiks force-pushed the refactor/tooltip-popover-viewport branch 2 times, most recently from 2286519 to 43ca79a Compare December 31, 2025 11:45
@atomiks
atomiks marked this pull request as ready for review December 31, 2025 11:57
@LukasTy LukasTy added the type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. label Jan 7, 2026

@LukasTy LukasTy 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.

LGTM, couldn't find or spot any issues.

@atomiks
atomiks force-pushed the refactor/tooltip-popover-viewport branch from 43ca79a to b6316ec Compare January 9, 2026 04:17
@atomiks
atomiks merged commit 9f13346 into mui:master Jan 9, 2026
@atomiks
atomiks deleted the refactor/tooltip-popover-viewport branch January 9, 2026 04:38
michaldudak added a commit to michaldudak/base-ui that referenced this pull request Jan 13, 2026
michaldudak added a commit to michaldudak/base-ui that referenced this pull request Jan 13, 2026
atomiks added a commit to atomiks/base-ui that referenced this pull request Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: popover Changes related to the popover component. component: tooltip Changes related to the tooltip component. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants