-
-
Notifications
You must be signed in to change notification settings - Fork 536
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
Alert pane: Allows providing contextual feedback messages for typical user actions #1181
Conversation
I've heard some hopeful things about eventually being able to remove the css prefixing but I doubt that'll happen in the near future. |
Thanks for the contribution though, very sensible addition. |
A small step for man :-) |
Apart from my minor two comments this is mergeable. Could you maybe also generate a thumbnail for the gallery and upload it here? That way I can add it to the CDN and it'll find it during the next doc build. |
One question @philippjfr is whether the And maybe even aligned with the Card I'm contributing. Maybe the card should have a |
Might be nice, maybe we should have a saturated=True/False option to toggle between the pastel and fully saturated colors? |
...hmmmm.... I'm not an expert on colors. Try to stay out of it but always gets to spend a lot of time on it. Any experts around? |
Merging for now, can add the saturated colors later. |
One of the things i use a lot and see other users using in their analytics app are Bootstrap inspired Alerts.
So I would like to contribute one.
The contributed code is ready for review by @philippjfr .
I've chosen
Alert
with analert_type
parameter instead of a collection ofPrimaryAlert
, ..InfoAlert
, ...,DarkAlert
to keep the api in line withButton
.alert_type
. Let me know if that is needed.pn.pane
instead ofpn.widget
orpn.components.bootstrap
. Those would be alternatives.alert-link
css class. Instead any<a>
link tag will just be styled.alert-dismissible
js functionality. Would be nice to have though.Alert notebook reference example
Server test example
python -m panel serve 'panel\tests\pane\test_alert.py' --dev --show
Additional Context
This is an example of where the
css_classes
parameter does not work that well in Panel @philippjfr . In order to get the proper styling you need to define.bk.alert-primary
instead of.alert-primary
to get specific enough. That means you can't copy-paste/ or include one of the many existing style sheets out there. This is friction. :-)