Skip to content

Persist notification dismissal server-side with Users::Callout

Andrew Evans requested to merge atevans/token-expiration-banner-db-check into master

What does this MR do and why?

Adds server-side persistence to the dismissal of the notification banner. As we have observed in some issues, cookies for our app can be evicted seemingly at random, and users may frequently change browsers, OS versions or devices, causing the dismissal cookie to be lost. I believe there is a small-but-vocal set of users that would be driven insane by not being able to get rid of a notification, so I think if we can add server-side persistence to the dismissal per-user, this would dramatically improve the experience for these users.

This uses the built-in dismissal_path parameter for the broadcast message component to submit a request to the Users::Callout model instead. It's a bit of a hack, but have confirmed it works on my local machine.

Related to !154944 (merged)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Andrew Evans

Merge request reports