Skip to content

[avatar] Make zero fallback delay default and immediate - #5147

Merged
atomiks merged 3 commits into
mui:masterfrom
chuganzy:avatar-fallback-delay
Jul 2, 2026
Merged

atomiks merged 3 commits into
mui:masterfrom
chuganzy:avatar-fallback-delay

Conversation

@chuganzy

@chuganzy chuganzy commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

This PR proposes to make Avatar.Fallback default delay to 0 and treat delay={0} as no delay, showing the fallback immediately.

Previously, only delay={undefined} skipped the timer. I expected this kind of conditional usage to disable the delay when delayEnabled is false:

delay={delayEnabled ? 300 : 0}

but it still went through the delayed path, so the working version had to be:

delay={delayEnabled ? 300 : undefined}

That was inconsistent with other Base UI delay APIs, where 0 means no delay/immediate behavior. This change aligns Avatar with that expectation and updates the generated API docs to show the 0 default.

Side note: although the documented default changes to 0, the behavior for an omitted delay is unchanged: the fallback still shows immediately.

@pkg-pr-new

pkg-pr-new Bot commented Jun 30, 2026 •

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

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

commit: 7a60b8a

@code-infra-dashboard

code-infra-dashboard Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react ▼-15B(0.00%) 🔺+9B(+0.01%)

Details of bundle changes

Performance

Total duration: 1,066.29 ms -48.70 ms(-4.4%) | Renders: 78 (+0)

No significant changes — details


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

@netlify

netlify Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 7a60b8a
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a45acd6d8f74400089110d4
😎 Deploy Preview https://deploy-preview-5147--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.

@atomiks atomiks added the component: avatar Changes related to the avatar component. label Jul 1, 2026
@atomiks
atomiks merged commit 195f00d into mui:master Jul 2, 2026
6 checks passed
@chuganzy
chuganzy deleted the avatar-fallback-delay branch July 2, 2026 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: avatar Changes related to the avatar component.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants