Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/MeshWeaver.Blazor/Components/MenuItemView.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<!-- Icon-only mode with plain HTML dropdown -->
<div Style="@($"width: {Width}; {Style}; position: relative;")" class="icon-only-menu-container">
<FluentButton Appearance="@ButtonAppearance"
Class="@Class"
IconStart="@ButtonIcon"
Style="border-radius: 4px;"
OnClick="ToggleMenu" />
Expand All @@ -32,11 +33,13 @@
<!-- Has top-level action AND sub-menus: Split button with main action and expand arrow -->
<div Style="@($"display: flex; gap: 0; width: {Width}; {Style}; position: relative;")">
<FluentButton Appearance="@ButtonAppearance" OnClick="OnClick"
Class="@Class"
IconStart="@ButtonIcon"
Style="flex: 1; border-radius: 4px 0 0 4px; text-align: left; justify-content: flex-start; display: flex;">
@Title
</FluentButton>
<FluentButton Appearance="@ButtonAppearance"
Class="@Class"
IconEnd="@(new Microsoft.FluentUI.AspNetCore.Components.Icons.Regular.Size12.ChevronDown())"
Style="border-radius: 0 4px 4px 0; width: 32px; flex-shrink: 0;"
OnClick="ToggleMenu" />
Expand All @@ -59,6 +62,7 @@
<!-- No top-level action: Clicking button expands menu -->
<div Style="@($"width: {Width}; {Style}; position: relative;")">
<FluentButton Appearance="@ButtonAppearance"
Class="@Class"
IconStart="@ButtonIcon"
IconEnd="@(new Microsoft.FluentUI.AspNetCore.Components.Icons.Regular.Size12.ChevronDown())"
Style="width: 100%; text-align: left; justify-content: flex-start; display: flex;"
Expand All @@ -85,6 +89,7 @@ else
<!-- Regular menu item without sub-menus -->
<div Style="@($"width: {Width}; {Style}")">
<FluentButton OnClick="OnClick" Appearance="@ButtonAppearance"
Class="@Class"
IconStart="@ButtonIcon"
Style="width: 100%; text-align: left; justify-content: flex-start; display: flex;">
@Title
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
Name: Dropdown buttons keep the styling they were given
Category: Fix
Description: A button with a dropdown now honours the appearance its page asked for, instead of quietly falling back to the default look.
Icon: Sparkle
Order: -20260809
---
Comment thread
Copilot marked this conversation as resolved.
Resolved

# Dropdown buttons keep the styling they were given

A button that carries a dropdown menu ignored the styling its page had asked for and always
rendered in the default look. On pages that style their buttons deliberately — a product page whose
call to action uses the page's own colours, for instance — this showed up as one button suddenly
looking unlike the others next to it, and changing appearance depending on what state the page was
in.

Those buttons now look the way the page intended, in every one of their forms: with a dropdown
alone, with a main action plus a dropdown, and as a plain entry inside an open menu.
Loading