Skip to content

[avatar] Remove fallback transition logic and premature image display - #4110

Merged
atomiks merged 2 commits into
mui:masterfrom
atomiks:codex/avatar-fallback-no-transition
Feb 16, 2026
Merged

atomiks merged 2 commits into
mui:masterfrom
atomiks:codex/avatar-fallback-no-transition

Conversation

@atomiks

@atomiks atomiks commented Feb 16, 2026 •

Copy link
Copy Markdown
Contributor

Setting visibility of the image to include imageLoadingStatus === 'loading' causes the image to show prematurely. Additionally, transitioning the fallback component out is not particularly useful and regresses layout cases where the expectation is that only one is mounted at a time.

Fixes #4109 (https://stackblitz.com/edit/sb1-urlzxstp?file=package.json,src%2FApp.tsx)

Image transition remains the same once it's loaded: https://deploy-preview-4110--base-ui.netlify.app/experiments/transition-attrs. If it hasn't been loaded yet (and not in the cache), it may not appear to play if its duration is short, as the image progressively loads in so it plays just before painting. For speed, this is likely preferable.

@atomiks atomiks added type: regression A bug, but worse, it used to behave as expected. component: avatar Changes related to the avatar component. labels Feb 16, 2026
@pkg-pr-new

pkg-pr-new Bot commented Feb 16, 2026 •

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

  • vite-css-base-ui-example

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

commit: d2263ce

@mui-bot

mui-bot commented Feb 16, 2026 •

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react ▼-220B(-0.05%) ▼-36B(-0.02%)

Details of bundle changes


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

@netlify

netlify Bot commented Feb 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit d2263ce
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/699321f75d70950008f5d79e
😎 Deploy Preview https://deploy-preview-4110--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 codex/avatar-fallback-no-transition branch 2 times, most recently from 5877c30 to 2379287 Compare February 16, 2026 12:36
Comment on lines -77 to -79
export interface AvatarFallbackState extends AvatarRoot.State {
transitionStatus: TransitionStatus;
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was undocumented (in 1.2.0), should be safe to revert.

@atomiks
atomiks marked this pull request as ready for review February 16, 2026 12:40
@greptile-apps

greptile-apps Bot commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Automatic reviews are disabled for this repository.

}, [timeout, delay]);

const state: AvatarFallback.State = {
const state: AvatarRoot.State = {

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
const state: AvatarRoot.State = {
const state: AvatarFallbackState = {

@atomiks
atomiks force-pushed the codex/avatar-fallback-no-transition branch from 2379287 to d681182 Compare February 16, 2026 12:49
@atomiks
atomiks force-pushed the codex/avatar-fallback-no-transition branch from d681182 to 1ef09fe Compare February 16, 2026 12:58
@atomiks atomiks changed the title [avatar] Remove fallback transition logic [avatar] Remove fallback transition logic and premature image display Feb 16, 2026
@atomiks
atomiks merged commit 4536074 into mui:master Feb 16, 2026
7 checks passed
@atomiks
atomiks deleted the codex/avatar-fallback-no-transition branch February 16, 2026 14:01
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. type: regression A bug, but worse, it used to behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[avatar] Incorrect Image/Fallback behaviour

3 participants