Open
Description
Is there an existing issue for this?
- I have searched the existing issues and checked the recent builds/commits
What would your feature do ?
Make the location that toast notifications appear configurable.
Proposed workflow
- Go to settings
- Click Toast Location dropdown (default: Right)
- Select Centre
- Toasts are now anchored to the centre of the top edge of the canvas, rather than the top-right corner
Additional information
On a 32:9 screen, it is easy to miss small changes (e.g. toast notification) on one side of the display if you are looking at the opposite edge.
Below is the hard-coded override I cherry-pick locally.
diff --git a/src/components/toast/GlobalToast.vue b/src/components/toast/GlobalToast.vue
index 848ad15c..fc9925da 100644
--- a/src/components/toast/GlobalToast.vue
+++ b/src/components/toast/GlobalToast.vue
@@ -64,8 +64,9 @@ function updateToastPosition() {
styleElement.textContent = `
.p-toast.p-component.p-toast-top-right {
- top: ${rect.top + 20}px !important;
- right: ${window.innerWidth - (rect.left + rect.width) + 20}px !important;
+ top: 20px !important;
+ left: 50% !important;
+ transform: translateX(-50%);
}
`
}
┆Issue is synchronized with this Notion page by Unito