Skip to content

fix: FluentOverflow initially paints and then repaints if an overflow is detected, leading to a flash in FluentOverflow #2224

@adamint

Description

@adamint

🐛 Bug Report

As mentioned in title, this is caused by FluentOverflow components initially painting and then re-painting, leading to the flash you mention. This can also be seen on initial page load in any FluentOverflow component, including the example component here if you make the browser width small enough.

FluentOverflow should not visibly paint and then repaint on first component render. Perhaps it could paint but have visibility: hidden, calculate whether overflow should be applied, and then make itself visible.

💻 Repro or Code Sample

Make screen width on this page small enough such that component will have the overflow button appear immediately after component load. Notice a flash.
 

🔦 Context

Appears in dotnet/aspire#4417

🌍 Your Environment

Windows, Edge (latest stable), v4.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions