Allow opening bell notifications in new tab
Description
When clicking on bell notifications right now, we use a click handler (to mark bells as read and manually set window.location
to the bell href). This works, but prevents
- seeing the URL where you'll end up before clicking on it
- "opening the bell" in a new tab by using middle-click
Goal
Better workflow for users receiving many bells: allow opening them in new tabs with middle mouse clicks. And of course: keep the current functionality working (mark as unread when clicking on bells).
Evidence
Solution
The bell item is already an <a>
element. Define its href (TODO: are there bells without one?) and use event propagation to both have a handler attached (for marking as read) while letting the browser handle redirection
Links / references
Looks like Vue has native support for @click.middle
so this should be pretty straightforward to implement.
Make sure to test all the usual browsers however, since their event handling might be different in some key areas!