Fix popover dismissal of new merge request navigation tabs location for anonymous users
Summary
#33813 (closed) implemented a popover that introduces the new location of the merge request navigation tabs (at the top of the page).
When dismissing it, the dismissal is saved to the DB, per user. This doesn't work for anonymous users, so the popover keeps appearing when viewing merge requests.
Steps to reproduce
- View a merge request as an anonymous user (logged out)
- The popover should appear next to the navigation tabs
- Dismiss the popover
- Refresh the page
- The popover is visible again
What is the current bug behavior?
If the user is anonymous, the popover keeps appearing when viewing merge requests.
What is the expected correct behavior?
If the user is anonymous, the popover should permanently disappear when dismissing it the first time.
Output of checks
This bug happens on GitLab.com
Possible fixes
Save the popover dismissal to a cookie, regardless if the user is authenticated or is anonymous. If the user is authenticated, continue saving the dismissal to the DB.