Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color picker keep show up #23

Open
kamazheng opened this issue Mar 26, 2024 · 12 comments
Open

Color picker keep show up #23

kamazheng opened this issue Mar 26, 2024 · 12 comments

Comments

@kamazheng
Copy link

The color picker not hidden after color selected: (.Net 8)

@using MudBlazor.ThemeManager
@inherits LayoutComponentBase

<MudThemeProvider Theme="_themeManager.Theme" />
<MudDialogProvider />
<MudSnackbarProvider />
<MudThemeManagerButton OnClick="@((e) => OpenThemeManager(true))" />
<MudThemeManager Open="_themeManagerOpen" OpenChanged="OpenThemeManager" Theme="_themeManager" ThemeChanged="UpdateTheme" />
<MudDrawer @bind-Open="_themeManagerOpen" ClipMode="_themeManager.DrawerClipMode" Elevation="_themeManager.DrawerElevation"></MudDrawer>

<MudLayout>
    <MudAppBar Elevation="_themeManager.AppBarElevation">
        <MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="@((e) => DrawerToggle())" />
        <MudText Typo="Typo.h5" Class="ml-3">Application</MudText>
        <MudSpacer />
        <MudIconButton Icon="@Icons.Material.Filled.MoreVert" Color="Color.Inherit" Edge="Edge.End"/>
    </MudAppBar>
    <MudDrawer @bind-Open="_drawerOpen" ClipMode="DrawerClipMode.Always" Elevation="2">
        <NavMenu />
    </MudDrawer>
    <MudMainContent Class="mt-16 pa-4">
        @Body
    </MudMainContent>
</MudLayout>



@code {

    private ThemeManagerTheme _themeManager = new ThemeManagerTheme();
    public bool _themeManagerOpen = false;

    void OpenThemeManager(bool value)
    {
        _themeManagerOpen = value;
    }

    void UpdateTheme(ThemeManagerTheme value)
    {
        _themeManager = value;
        StateHasChanged();
    }

    protected override void OnInitialized()
    {
        StateHasChanged();
    }

    private bool _drawerOpen = true;

    private void DrawerToggle()
    {
        _drawerOpen = !_drawerOpen;
    }
}

image

@ikingsbear
Copy link

same problem,did you solve that problem?

@Lonnewolf46
Copy link

Same issue here, Net .7 on WebAssembly project.

@ikingsbear

This comment was marked as off-topic.

@henon
Copy link
Collaborator

henon commented Apr 20, 2024

收到你的Email了

Please communicate in English, thanks.

@viniciusmiguel
Copy link

Same issue here, net 8, server side.

@viniciusmiguel
Copy link

I am looking into the code for a fix but it looks like this repository does not represent the nuget package being distributed anymore.

@ScarletKuro
Copy link
Member

ScarletKuro commented Jun 2, 2024

I am looking into the code for a fix but it looks like this repository does not represent the nuget package being distributed anymore.

I think the latest changes are in this branch: https://github.com/MudBlazor/ThemeManager/tree/hotfix. I'm not sure why, but I can see that the 1.0.9 version is present there. I don't think we have anyone currently maintaining this since it was previously handled by @Garderoben.

@ScarletKuro
Copy link
Member

ScarletKuro commented Jun 2, 2024

@henon maybe you want to merge the hotfix to main and remove the hotfix.
Also I can add same CI/CD as I did for https://github.com/MudBlazor/MudBlazor.Icons but I don't have access to the settings of this repo at all

upd: nvm about merging, it looks pretty de-sync and the code in main was suppose to be the "new" theme manager, but it's pretty unfinished, so i guess just swap hotfix to be main and old main rename to "wip"?

@MudBlazor MudBlazor deleted a comment from ikingsbear Jun 3, 2024
@henon
Copy link
Collaborator

henon commented Jun 3, 2024

so i guess just swap hotfix to be main and old main rename to "wip"?

ok

@ScarletKuro
Copy link
Member

upd: nvm about merging, it looks pretty de-sync and the code in main was suppose to be the "new" theme manager, but it's pretty unfinished, so i guess just swap hotfix to be main and old main rename to "wip"?

Swapped. Now the main code is located in the "main" branch, while the old main is renamed to "wip"

@henon
Copy link
Collaborator

henon commented Jun 5, 2024

Thanks a lot @ScarletKuro

@ScarletKuro
Copy link
Member

Ok, I set up CI/CD and released version 1.1.0 with small improvements, like replacing async void with async Task. If someone wants to contribute, feel free to do so as it will be easier to deliver the changes now. Previously, someone with access had to manually upload the package, which was always delayed with no ETA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants