Persist when dismissing FF will look different message
Problem to solve
In #218355 (closed) we added the ability to make alerts dismissible. The user will need to repeatedly dismiss the message though when loading in the view.
Summary
Feature Flags' "Feature Flags New Version" Alert is the target of this Issue.
Improvements
From the following discussion on #218355 (closed), we should store if the user has dismissed the Alerts in a cookie. The solution will bring the following benefits:
- avoid intruding the UX too much;
- avoid unnecessary backend work, as the
feature_flags_new_version
flag will be removed in %13.7.
Proposal
If a user dismisses the message, the action will be stored not show the message on reload of the page for that user.
Risks
From Safari iOS 12.2 and Safari 12.1, ITP 2.1 is capping all client-side cookies to 7 days expiry. ITP won't break any feature but it means that users navigating with Safari will be more likely to see the Alert after 7 days of the dismissal.
Involved components
ee/app/assets/javascripts/feature_flags/components/edit_feature_flag.vue
ee/app/assets/javascripts/feature_flags/components/new_feature_flag.vue
ee/app/assets/javascripts/feature_flags/edit.js
ee/app/assets/javascripts/feature_flags/new.js
ee/app/helpers/ee/user_callouts_helper.rb
ee/app/models/ee/user_callout_enums.rb
ee/app/views/projects/feature_flags/edit.html.haml
ee/app/views/projects/feature_flags/new.html.haml