Skip to content

Commit

Permalink
Move inner pushes (#6364)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristina-fefelova authored Aug 21, 2024
1 parent 5f795ce commit e02d0c7
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
}
onDestroy(() => {
removeNotificationHandler()
if (closeTimeout && timeout) {
clearTimeout(timeout)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
'top-left': NotificationPosition.TopLeft,
'top-right': NotificationPosition.TopRight
}
const maxVisibleNotifications = 3
</script>

<slot />
<div class="notifications">
{#each Object.entries(positionByClassName) as [className, position]}
<div class={className} style:z-index={9999}>
{#each $store as notification (notification.id)}
{#each $store.slice(0, maxVisibleNotifications) as notification (notification.id)}
{#if notification.position === position}
<Notification {notification} />
{/if}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function addNotification (
title,
subTitle,
severity,
position: NotificationPosition.BottomRight,
position: NotificationPosition.TopRight,
component,
closeTimeout,
params
Expand Down
4 changes: 4 additions & 0 deletions qms-tests/sanity/storage-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
{
"name": "flagOpenInDesktopApp",
"value": "true"
},
{
"name": "#platform.notification.timeout",
"value": "0"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions qms-tests/sanity/storage.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
{
"name": "flagOpenInDesktopApp",
"value": "true"
},
{
"name": "#platform.notification.timeout",
"value": "0"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions qms-tests/sanity/storageQaraManager.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
{
"name": "flagOpenInDesktopApp",
"value": "true"
},
{
"name": "#platform.notification.timeout",
"value": "0"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions qms-tests/sanity/storageSecond-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
{
"name": "flagOpenInDesktopApp",
"value": "true"
},
{
"name": "#platform.notification.timeout",
"value": "0"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions qms-tests/sanity/storageSecond.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
{
"name": "flagOpenInDesktopApp",
"value": "true"
},
{
"name": "#platform.notification.timeout",
"value": "0"
}
]
}
Expand Down

0 comments on commit e02d0c7

Please sign in to comment.