danheron / Heron.MudCalendar

Calendar component for MudBlazor
MIT License
174 stars 33 forks source link

View EnumSwitch styling discussion #150

Open digitaldirk opened 4 months ago

digitaldirk commented 4 months ago

Hi,

When changing the ButtonVariant property I expected the View EnumSwitch (month, week, day, work week) to also follow the selected variant. I was going to make a PR to do this, but wanted to discuss first as it's a little more complex than just adding a property (since the outlined and filled variants are used to display which view is selected). https://github.com/danheron/Heron.MudCalendar/blob/b1e7f901374564150a7e1a93feab73dc819285d5/Heron.MudCalendar/Components/EnumSwitch.razor#L10C33-L10C34

  1. Instead of using MudButtonGroup we could use: https://www.mudblazor.com/components/togglegroup. However this doesn't use Variants but instead has an outlined property and styles (that could emulate the variants). This is experimental so I understand if you don't want this risk.
  2. Instead of only using Outlined and Filled to represent which view is selected we could instead using some sort of styling or icon to represent which view is selected. For example, bolding the View Text or adding a checkmark next to the selected view while allowing the user to use any of the 3 variants.
  3. Leave as is or other suggestions?

Thank you

danheron commented 3 months ago

Changing to MudToggleGroup would be a good idea when it is released - it is still experimental at the moment.

I think the current version is fine for Filled and Outlined variants because it is kind of a mixture of both and so looks fine with either. Maybe some changes could be made for the Text variant, but I'm not sure what would look good.