microsoft / fluentui-blazor

Microsoft Fluent UI Blazor components library. For use with ASP.NET Core Blazor applications
https://www.fluentui-blazor.net
MIT License
3.23k stars 294 forks source link

fix: [Nested Tree View Styling] in [FluentDialog] #1988

Closed beowulf29a closed 5 days ago

beowulf29a commented 2 weeks ago

🐛 Bug Report

The root items of a TreeView do not align when nested within a FluentDialog

💻 Repro or Code Sample


<FluentDialog>
    <FluentTreeView>
        <FluentTreeItem Text="Root item 1">
            <FluentTreeItem Text="Flowers">
                <FluentTreeItem Disabled="true" Text="Daisy" />
                <FluentTreeItem Text="Sunflower" />
                <FluentTreeItem Text="Rose" />
            </FluentTreeItem>
            <FluentTreeItem Text="Nested item 2" />
            <FluentTreeItem Text="Nested item 3" />
        </FluentTreeItem>
        <FluentTreeItem Text="Root item 2" />
        <FluentTreeItem Text="Root item 3" />
        <FluentTreeItem Text="Root item 4">
            <FluentDivider></FluentDivider>
            <FluentTreeItem Text="Flowers">
                <FluentTreeItem Disabled="true" Text="Daisy" />
                <FluentTreeItem Text="Sunflower" />
                <FluentTreeItem Text="Rose" />
            </FluentTreeItem>
            <FluentTreeItem Text="Nested item 2" />
            <FluentTreeItem Text="Nested item 3" />
        </FluentTreeItem>
        <FluentTreeItem Text="Root item 5 - Leaf Erikson" />
    </FluentTreeView>
</FluentDialog>

🤔 Expected Behavior

Should look like the TreeView when not rendered within a FluentDialog image

😯 Current Behavior

Align the items with no children with the items with children image

💁 Possible Solution

Could manually update the styling

🔦 Context

Would like to embed a treeview within a dialog control.

🌍 Your Environment

vnbaaij commented 2 weeks ago

It seem this is an Edge/Chromium bug. There is something weird going on as the page frequently crashes when I change things in DevTools. When viewing the example in Firefox everything looks like it should, I'll leave this open so we can track things, but I'm not expecting any changes from our side to solve this.

beowulf29a commented 2 weeks ago

Thanks for the update! Hopefully can get resolved in the future :)

vnbaaij commented 5 days ago

Closing this as it is not solvable from our side (browser issue).