iot-application
iot-application copied to clipboard
Revise notification dismissal on client-side navigation
Notifications are expected to have the UX behavior (defined by Cloudscape)[https://cloudscape.design/components/flashbar/?tabId=usage].
There are two issues with our implementation:
- A side-effect occurs. Users of the
useApplication
hook must understand thatnavigate
dismisses notifications. This is problematic when creating a dashboard, as a navigation needs to occur and then a success notification needs to appear. If the emission of the notification occurs before navigation, the notification will be dismissed. (note: this behavior is documented in theuseApplication
hook. -
navigate
dismisses all notifications, but the UX guidance is to persist notifications relevant to pages across navigation. This will require adding context to the notification structure about which pages it should be visible on.