Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
a1220ea
Add `show_notification` action
huong-li-nguyen Nov 18, 2025
f7370a2
Remove `Alert` model as not needed
huong-li-nguyen Nov 18, 2025
27cfc60
Add example app
huong-li-nguyen Nov 18, 2025
792a885
Add changelog
huong-li-nguyen Nov 18, 2025
d9e9e2a
Simplify action logic and style alerts
huong-li-nguyen Nov 18, 2025
a48f82c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 18, 2025
5037c9a
Add gaps between alerts
huong-li-nguyen Nov 18, 2025
8769d0c
Add default title per variant
huong-li-nguyen Nov 18, 2025
285032f
Merge branch 'feat/enable-alerts' of https://github.com/mckinsey/vizr…
huong-li-nguyen Nov 18, 2025
44be0d2
Fix tests
huong-li-nguyen Nov 18, 2025
cab9eae
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 18, 2025
018d5b5
Merge branch 'main' into feat/enable-alerts
huong-li-nguyen Nov 19, 2025
f1af42e
Add example how to update notifications
huong-li-nguyen Nov 19, 2025
2609421
Update app.py
huong-li-nguyen Nov 19, 2025
cdd5c92
Update _show_notification.py
huong-li-nguyen Nov 19, 2025
50c6619
Add comment
huong-li-nguyen Nov 19, 2025
6fc96c4
Tidy
huong-li-nguyen Nov 19, 2025
d252f6e
Update 0.1.49.dev0.json
huong-li-nguyen Nov 19, 2025
7978716
Tidy descriptions and types
huong-li-nguyen Nov 19, 2025
5d8ec82
Update 0.1.49.dev0.json
huong-li-nguyen Nov 19, 2025
1ee37bd
Enable notification on page load
huong-li-nguyen Nov 19, 2025
8aabe19
Add icon validator
huong-li-nguyen Nov 19, 2025
3dab164
Implement design feedback
huong-li-nguyen Nov 19, 2025
5e5b022
Optimise app
huong-li-nguyen Nov 19, 2025
2c801a9
Fix tests lower bound
huong-li-nguyen Nov 19, 2025
3f15d45
Get notification to properly show on page load
huong-li-nguyen Nov 20, 2025
9bd0321
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 20, 2025
ebb1946
Lint
huong-li-nguyen Nov 20, 2025
eeeeb2d
Merge branch 'feat/enable-alerts' of https://github.com/mckinsey/vizr…
huong-li-nguyen Nov 20, 2025
c47a592
Remove arguments and on-page-load notification
huong-li-nguyen Nov 20, 2025
33a21f6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 20, 2025
4eaa3bf
Lint
huong-li-nguyen Nov 20, 2025
4f19804
Merge branch 'feat/enable-alerts' of https://github.com/mckinsey/vizr…
huong-li-nguyen Nov 20, 2025
a1c5817
Tidy
huong-li-nguyen Nov 20, 2025
9f054b4
Merge branch 'main' into feat/enable-alerts
huong-li-nguyen Nov 20, 2025
e6ca132
Fix changelogs
huong-li-nguyen Nov 20, 2025
eec6122
Merge branch 'main' into feat/enable-alerts
huong-li-nguyen Nov 20, 2025
8623c00
Lint
huong-li-nguyen Nov 20, 2025
9de1c75
Make message a markdown field
huong-li-nguyen Nov 20, 2025
64c47eb
Move the dmc.NotificationContainer from Dashboard to the Page level (…
petar-qb Nov 22, 2025
fc9ce98
PR comments A
huong-li-nguyen Nov 24, 2025
6463bf5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 24, 2025
7aedcf5
Merge branch 'main' into feat/enable-alerts
huong-li-nguyen Nov 24, 2025
e58c3ab
Change `autoClose` default based on `variant`
huong-li-nguyen Nov 24, 2025
4be7ca0
Merge branch 'main' into feat/enable-alerts
huong-li-nguyen Nov 24, 2025
d80d48d
Lint
huong-li-nguyen Nov 24, 2025
23156de
Merge branch 'main' into feat/enable-alerts
huong-li-nguyen Nov 24, 2025
31b9efa
notifications dashboard and tests
l0uden Nov 24, 2025
9af59b0
Merge branch 'feat/enable-alerts' of https://github.com/mckinsey/vizr…
l0uden Nov 24, 2025
1c8d1d5
Update _show_notification.py
huong-li-nguyen Nov 24, 2025
2d28f0d
Update schema
huong-li-nguyen Nov 24, 2025
1be2a0c
Update _show_notification.py
huong-li-nguyen Nov 24, 2025
2f8a09f
Move below theme-switch
huong-li-nguyen Nov 25, 2025
b630605
Fix positioning
huong-li-nguyen Nov 25, 2025
1ba129c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 25, 2025
3cfa31c
Comment out last change
huong-li-nguyen Nov 25, 2025
c8f01b9
Add padding only to top-right notification-container
huong-li-nguyen Nov 25, 2025
31955a3
screenshots and limit tests
l0uden Nov 25, 2025
13a3175
Merge branch 'feat/enable-alerts' of https://github.com/mckinsey/vizr…
l0uden Nov 25, 2025
8873690
comments
l0uden Nov 25, 2025
326f507
new notifications
l0uden Nov 25, 2025
d9225a6
Merge branch 'main' into feat/enable-alerts
huong-li-nguyen Nov 26, 2025
dcfc95e
Add update_notification action and refactor notification defaults
antonymilne Dec 8, 2025
38f4f70
Rename _show_notification.py to _notifications.py and add validation
antonymilne Dec 8, 2025
2f9c918
Merge remote-tracking branch 'origin/main' into feat/enable-alerts
antonymilne Dec 8, 2025
709cda1
Update schema after merge from main
antonymilne Dec 8, 2025
de96be6
Restore schemas/0.1.49.json from main
antonymilne Dec 8, 2025
8e468a1
Update vizro-core/changelog.d/20251118_135209_90609403+huong-li-nguye…
antonymilne Dec 8, 2025
18f584a
Minor scratch example change
petar-qb Dec 9, 2025
39b29dc
Merge branch 'main' into feat/enable-alerts
antonymilne Dec 11, 2025
30105f7
Remove validate_default=True
antonymilne Dec 11, 2025
22b3a87
API docs
antonymilne Dec 11, 2025
818f40d
Fix API docs
antonymilne Dec 11, 2025
2b5b91d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 11, 2025
56578e4
Apply suggestion from @antonymilne
antonymilne Dec 11, 2025
16f455b
[Docs] Add docs and tests for notifications (#1498)
huong-li-nguyen Dec 16, 2025
e96b929
Merge branch 'main' into feat/enable-alerts
huong-li-nguyen Dec 17, 2025
8452e3f
Revert change on putting theme-switch above notifications
huong-li-nguyen Dec 17, 2025
483d152
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 17, 2025
49873cb
PR comments
huong-li-nguyen Dec 17, 2025
0f41e4f
Merge branch 'feat/enable-alerts' of https://github.com/mckinsey/vizr…
huong-li-nguyen Dec 17, 2025
e44d3c7
Update hatch.toml
huong-li-nguyen Dec 17, 2025
5d1ee45
Center text without title
huong-li-nguyen Dec 17, 2025
160cf5a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 17, 2025
4ab48b4
Update remaining pydantic lower bound
huong-li-nguyen Dec 17, 2025
7f74e29
Merge branch 'main' into feat/enable-alerts
huong-li-nguyen Dec 17, 2025
17de99b
Merge branch 'feat/enable-alerts' of https://github.com/mckinsey/vizr…
huong-li-nguyen Dec 17, 2025
96e66f3
Tidy docs
huong-li-nguyen Dec 17, 2025
9e56232
Revert to older pydantic version
huong-li-nguyen Dec 17, 2025
6154b86
Merge branch 'main' into feat/enable-alerts
huong-li-nguyen Dec 17, 2025
13b589d
Minor edits
huong-li-nguyen Dec 18, 2025
fc1df3e
Replace AfterValidator with model validator
huong-li-nguyen Dec 18, 2025
e328722
Update 0.1.50.dev0.json
huong-li-nguyen Dec 18, 2025
3c1e315
Tidy
huong-li-nguyen Dec 18, 2025
f21ff8a
Merge branch 'feat/enable-alerts' into qa/enable-alerts-tests
huong-li-nguyen Dec 18, 2025
24ce798
Merge branch 'main' into qa/enable-alerts-tests
huong-li-nguyen Dec 18, 2025
b0c08ad
Update syntax based on changes
huong-li-nguyen Dec 18, 2025
b68fa40
Tidy and rename `message` to `text`
huong-li-nguyen Dec 18, 2025
174a4df
Update layout.css
huong-li-nguyen Dec 18, 2025
c817eac
Improve position of notification-container
huong-li-nguyen Dec 18, 2025
1f3cad8
Update test_notifications.py
huong-li-nguyen Dec 18, 2025
01b934d
screenshots and changelog
l0uden Dec 18, 2025
084c800
dark theme test fix
l0uden Dec 18, 2025
bb9abe5
dark theme screenshots
l0uden Dec 18, 2025
bc6c74b
dark theme screenshots
l0uden Dec 18, 2025
cba9331
change warning to auto-close
l0uden Dec 18, 2025
8e0ea62
new screenshots
l0uden Dec 18, 2025
a87fb3d
new screenshots
l0uden Dec 18, 2025
4cd6f85
warning notification with delay
l0uden Dec 18, 2025
673e32b
new screenshots
l0uden Dec 18, 2025
b347782
new screenshots
l0uden Dec 18, 2025
3038cf7
new screenshots
l0uden Dec 18, 2025
3b66f7e
left only 1 notification
l0uden Dec 18, 2025
2f8cc9a
left only 1 notification
l0uden Dec 18, 2025
1b81663
new screenshots
l0uden Dec 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨

- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Removed

- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Added

- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Changed

- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Deprecated

- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Fixed

- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Security

- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX. ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
2 changes: 1 addition & 1 deletion vizro-core/examples/scratch_dev/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
],
)

dashboard = vm.Dashboard(pages=[page_1, page_two])
dashboard = vm.Dashboard(pages=[page_1, page_two], title="Test Dashboard")

if __name__ == "__main__":
Vizro().build(dashboard).run()
2 changes: 1 addition & 1 deletion vizro-core/src/vizro/actions/_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def set_variant_defaults(self):

@property
def outputs(self) -> _IdOrIdProperty: # type: ignore[override]
return "vizro_notifications.sendNotifications"
return "vizro-notifications.sendNotifications"

@_log_call
def function(self):
Expand Down
2 changes: 1 addition & 1 deletion vizro-core/src/vizro/models/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def build(self) -> _PageBuildType:
dcc.Location(id="vizro_url", refresh="callback-nav"),
dmc.NotificationContainer(
position="top-right",
id="vizro_notifications",
id="vizro-notifications",
),
]
)
Expand Down
2 changes: 1 addition & 1 deletion vizro-core/src/vizro/static/css/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Current logic:

#header,
#right-side,
#notification-container {
#vizro-notifications {
zoom: 80%;
}
}
Expand Down
7 changes: 6 additions & 1 deletion vizro-core/src/vizro/static/css/notifications.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#vizro-notifications > div:first-child {
display: flex;
flex-direction: column;
gap: 12px;
}

.alert-info, .alert-success, .alert-warning, .alert-error {
align-items: flex-start;
background: var(--surfaces-bg-card-inverted);
box-shadow: var(--bs-box-shadow);
display: flex;
margin-top: 12px;
padding: 12px 8px;
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions vizro-core/tests/e2e/vizro/dashboards/default/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
layout_flex_with_wrap_param_and_ag_grid,
layout_flex_without_params,
)
from pages.notifications_page import static_notifications_page
from pages.parameters_multi_page import parameters_multi_page
from pages.parameters_page import parameters_page
from pages.set_control_cross_filter_page import (
Expand Down Expand Up @@ -106,6 +107,7 @@
action_model_field_shortcut_page,
action_ag_grid_underlying_id_shortcut_page,
action_control_shortcut_page,
static_notifications_page,
],
navigation=vm.Navigation(
pages={
Expand Down Expand Up @@ -166,6 +168,7 @@
cnst.ACTION_MODEL_FIELD_SHORTCUT_PAGE,
cnst.ACTION_AG_GRID_UNDERLYING_ID_SHORTCUT_PAGE,
cnst.ACTION_CONTROL_SHORTCUT_PAGE,
cnst.STATIC_NOTIFICATIONS_PAGE,
],
}
),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import e2e.vizro.constants as cnst

import vizro.actions as va
import vizro.models as vm
import vizro.plotly.express as px

df = px.data.iris()

static_notifications_page = vm.Page(
title=cnst.STATIC_NOTIFICATIONS_PAGE,
layout=vm.Flex(),
components=[
vm.Button(
id=cnst.SUCCESS_NOTIFICATION_BUTTON,
icon=cnst.SUCCESS_NOTIFICATION_ICON,
text="Success Notification",
actions=[
va.show_notification(
id=cnst.SUCCESS_NOTIFICATION_ID,
text=cnst.SUCCESS_NOTIFICATION_MESSAGE,
variant="success",
auto_close=False,
)
],
),
vm.Button(
id=cnst.WARNING_NOTIFICATION_BUTTON,
icon=cnst.WARNING_NOTIFICATION_ICON,
text="Warning Notification",
actions=[
va.show_notification(
id=cnst.WARNING_NOTIFICATION_ID,
text=cnst.WARNING_NOTIFICATION_MESSAGE,
variant="warning",
auto_close=False,
)
],
),
vm.Button(
id=cnst.ERROR_NOTIFICATION_BUTTON,
icon=cnst.ERROR_NOTIFICATION_ICON,
text="Error Notification",
actions=[
va.show_notification(
id=cnst.ERROR_NOTIFICATION_ID,
text=cnst.ERROR_NOTIFICATION_MESSAGE,
variant="error",
auto_close=False,
)
],
),
vm.Button(
id=cnst.INFO_NOTIFICATION_BUTTON,
icon=cnst.INFO_NOTIFICATION_ICON,
text="Info Notification",
actions=[
va.show_notification(
id=cnst.INFO_NOTIFICATION_ID,
text=cnst.INFO_NOTIFICATION_MESSAGE,
variant="info",
auto_close=False,
)
],
),
vm.Button(
id=cnst.CUSTOM_NOTIFICATION_BUTTON,
icon=cnst.CUSTOM_NOTIFICATION_ICON,
text="Custom Notification",
actions=[
va.show_notification(
id=cnst.CUSTOM_NOTIFICATION_ID,
text=cnst.CUSTOM_NOTIFICATION_MESSAGE,
title=cnst.CUSTOM_NOTIFICATION_TITLE,
variant="success",
icon=cnst.CUSTOM_NOTIFICATION_ICON,
auto_close=False,
)
],
),
vm.Button(
id=cnst.PROGRESS_NOTIFICATION_BUTTON,
text="1. Show Loading",
icon="hourglass_empty",
actions=[
va.show_notification(
id=cnst.UPDATE_NOTIFICATION_ID,
text=cnst.PROGRESS_NOTIFICATION_MESSAGE,
title=cnst.PROGRESS_NOTIFICATION_TITLE,
variant="progress",
)
],
),
vm.Button(
id=cnst.UPDATE_NOTIFICATION_BUTTON,
text="2. Update to Complete",
icon="check_circle",
actions=[
va.update_notification(
notification=cnst.UPDATE_NOTIFICATION_ID,
text=cnst.UPDATE_NOTIFICATION_MESSAGE,
title=cnst.UPDATE_NOTIFICATION_TITLE,
variant="success",
auto_close=False,
)
],
),
vm.Button(
id=cnst.LINK_NOTIFICATION_BUTTON,
text="Markdown with Link",
icon="link",
actions=[
va.show_notification(
id=cnst.LINK_NOTIFICATION_ID,
text=cnst.LINK_NOTIFICATION_MESSAGE,
title=cnst.LINK_NOTIFICATION_TITLE,
auto_close=False,
)
],
),
vm.Button(
id=cnst.AUTO_CLOSE_NOTIFICATION_BUTTON,
text="Auto-Close",
icon="close",
actions=[
va.show_notification(
id=cnst.AUTO_CLOSE_NOTIFICATION_ID,
text=cnst.AUTO_CLOSE_NOTIFICATION_MESSAGE,
title=cnst.AUTO_CLOSE_NOTIFICATION_TITLE,
variant="info",
)
],
),
],
)
Loading
Loading