ironmansoftware / powershell-universal

Issue tracker for PowerShell Universal
https://powershelluniversal.com
35 stars 3 forks source link

UDSelect: Two issues: SelectGroup with Icons; Theme is not ideal #2092

Closed donlent closed 1 year ago

donlent commented 1 year ago

Steps to Reproduce

Hey Guys! 🤗

First of all take this fully functional recipe, and cook it into a new Dashboard 😁...

$Spice = @{
    dark = @{           
        overrides = @{
            MuiMenuItem = @{
                root = @{
                    '&.Mui-disabled' = @{
                        color           = "#A5C9F4 !important;"
                        backgroundColor = "#1E1E1E"
                        opacity         = 1
                    }
                }
            }
        }
    }
}

New-UDDashboard -Title 'PowerShell Universal' -Pages @(

    New-UDPage -Name 'Home' -Content {

        New-UDSelect -Multiple -Variant standard -Icon (New-UDIcon -Icon 'Filter') -Label "SelectGroup: Not working..." -FullWidth -Option {
            New-UDSelectGroup -Name 'Visualization' -Option {
                New-UDSelectOption -Icon (New-UDIcon -Icon 'list') -Name "Won't be shown when inside a UDSelectGroup" -Value "one"
            }

            New-UDSelectGroup -Name 'Other' -Option {
                New-UDSelectOption -Name 'Label is shown w/o Icon' -Value 2
                New-UDSelectOption -Name 'Here as well :-)' -Value 3
                New-UDSelectOption -Name 'etc. etc...' -Value 4
            }

        } -OnChange { 
            Show-UDToast -Message (ConvertTo-Json -InputObject $EventData)
        }
        New-UDElement -Tag "br"
        New-UDElement -Tag "br"
        New-UDSelect -Multiple -Variant standard -Icon (New-UDIcon -Icon 'Filter') -Label "Select (normal): Working..." -FullWidth -Option {
            New-UDSelectOption -Icon (New-UDIcon -Icon 'infocircle') -Name "Outside a SelectGroup both Icon and Label will show..." -Value "two"
        }

    }
)

The You will immediately see both issues: image


Now let's add a cooker's touch to the recipe by adding some additional flavor. Add some "spice" to the New-UDDashboard...

New-UDDashboard -Title 'PowerShell Universal' -Theme $Spice [...]

And voilà...

image

hmmm... much better now... 😁

... of course we can fix it by modding the Theme but maybe you want to harmonize it like when you've taken care of this issue here... 😉 https://github.com/ironmansoftware/issues/issues/1880

And as always: Thanks a lot for all your efforts!! Such a good product! I really love it!! 🤗

Expected behavior

See above...

Actual behavior

See above...

Environment data

3.7.9

Visuals

No response

donlent commented 1 year ago

Dear @adamdriscoll Sorry I have to reopen this... unfortunately this has not yet been fixed... image

=> when adding an Icon the Name Value is ovewritten and shows the Group Name instead of the UDSelectOption name... Thanks in advance!