ReeceM/h-bar

Dismiss notifications

Closed this issue · 1 comments

Is your feature request related to a problem? Please describe.
The post notifications always hang around, and to be able to clear them one would need to add their own stuff to hide it.

Describe the solution you'd like
Be able to have the banner have a dismiss x or dismiss word on the end and then store the action in localStorage with a hash/ or timestamp that waits until a new post is available.

It would need to look at the localStorage before displaying the data, as it would still need to make a get request of the posts to be able to determine if the post notification has been displayed.

Describe alternatives you've considered
The alternative would be having a injectable component that adds the button with an onclick listener that the user then defines their own callback that handles storing the dismiss action and then also removes the banner.

Then they would also define another callback that the system would then check to see if the banner should be shown

Additional context
N/A

Consider to add the optional user defined onclick listener.

This would be quite nice, 'if' the user would like to send a tracked click event, but don't want to encourage that, cause it makes it heavy and the click will be delayed. (Seen this on multiple websites, it sucks for UX)