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

Devtools UI blocks mantine Notification #3210

Open
marthacryan opened this issue Mar 11, 2025 · 0 comments
Open

Devtools UI blocks mantine Notification #3210

marthacryan opened this issue Mar 11, 2025 · 0 comments
Labels
bug something broken P1 needed for current cycle

Comments

@marthacryan
Copy link
Contributor

This is the app that I used to test this:

from dash import Dash, html, Input, Output, dcc
import dash_mantine_components as dmc
from dash_iconify import DashIconify

# external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = Dash(__name__)
import dash_mantine_components as dmc
from dash import Output, Input, html, callback

"""
Add Notifications to your app layout.
"""

app.layout = dmc.MantineProvider(
    [
        dmc.NotificationProvider(),
        html.Div(id="notifications-container"),
        dmc.Button("Show Notification", id="notify"),
    ]
)

@callback(
    Output("notifications-container", "children"),
    Input("notify", "n_clicks"),
    prevent_initial_call=True,
)
def show(n_clicks):
    return dmc.Notification(
        title="Hey there!",
        id="simple-notify",
        action="show",
        autoClose=False,
        position="bottom-right",
        message="Notifications in Dash, Awesome!",
        icon=DashIconify(icon="ic:round-celebration"),
    )



if __name__ == '__main__':
    app.run(debug=True)

I tried changing the z-index for the devtools, but it appears that the dmc Notification component uses position static, which means that it ignores z-index. Not sure what the solution is for that! If we switch to a footer for the devtools then this issue can be closed

@gvwilson gvwilson added bug something broken P1 needed for current cycle labels Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P1 needed for current cycle
Projects
None yet
Development

No branches or pull requests

2 participants