Skip to content

[toast] Re-use getElementTransform function and remove local implementation#4749

Merged
sai6855 merged 4 commits into
mui:masterfrom
sai6855:element-toast
May 6, 2026
Merged

[toast] Re-use getElementTransform function and remove local implementation#4749
sai6855 merged 4 commits into
mui:masterfrom
sai6855:element-toast

Conversation

@sai6855
Copy link
Copy Markdown
Member

@sai6855 sai6855 commented May 5, 2026

PR changes are similar to #4748. I should have included this change in that PR, I forgot to apply it.

@sai6855 sai6855 changed the title Element toast [toast] Re-use getElementTransform function and remove local implementation May 5, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 5, 2026

commit: df9b7e5

@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented May 5, 2026

Bundle size

Bundle Parsed size Gzip size
@base-ui/react ▼-305B(-0.07%) ▼-155B(-0.11%)

Details of bundle changes

Performance

Total duration: 1,297.46 ms -28.62 ms(-2.2%) | Renders: 53 (+0) | Paint: 2,007.74 ms -38.81 ms(-1.9%)

Test Duration Renders
Dialog mount (300 instances) 88.89 ms 🔺+7.93 ms(+9.8%) 2 (+0)
Tabs mount (200 instances) 248.38 ms 🔺+6.58 ms(+2.7%) 4 (+0)
Popover mount (300 instances) 103.28 ms 🔺+5.48 ms(+5.6%) 2 (+0)
Scroll Area mount (300 instances) 93.74 ms 🔺+4.22 ms(+4.7%) 3 (+0)
Slider mount (300 instances) 142.06 ms 🔺+3.59 ms(+2.6%) 3 (+0)

…and 7 more — details


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

@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

Deploy Preview for base-ui ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit df9b7e5
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69f9cde70d66f4000810b32a
😎 Deploy Preview https://deploy-preview-4749--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@sai6855 sai6855 added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. component: toast Changes related to the toast component. labels May 5, 2026
@sai6855 sai6855 marked this pull request as ready for review May 5, 2026 11:06
Copilot AI review requested due to automatic review settings May 5, 2026 11:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes a Toast-specific getElementTransform implementation and reuses the shared utility from utils/useSwipeDismiss, aligning Toast with the approach used elsewhere (similar to #4748).

Changes:

  • Import getElementTransform from ../../utils/useSwipeDismiss in ToastRoot.
  • Remove the local getElementTransform helper and the now-unused ownerWindow import.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sai6855 sai6855 merged commit c9b859e into mui:master May 6, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: toast Changes related to the toast 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.

3 participants