Replace jquery-cookie plugin with js-cookie
What does this MR do?
Removes an outdated and unmaintained dependency jquery.cookie with its successor js.cookie which is not dependent on jQuery.
Also this MR adds a global default cookie path
setting which defaults to the GitLab root directory. Now, setting a cookie to any path other than gon.relative_url_root
requires an explicit opt-out. This is a sensible default and should prevent accidental omission going forward.
Are there points in the code the reviewer needs to double check?
Double check that all instances of $.cookie(x)
have been replaced by Cookies.get(x)
and all instances of $.cookie(x, y, z)
are replaced with Cookies.set(x, y, z)
. All javascripts which set or retrieve cookie values should function just as before.
Why was this MR needed?
One more step toward shaking off jQuery as a dependency (#23022 (moved)), also jquery.cookie is no longer maintained and hasn't seen an update in 2+ years.
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added - Tests
-
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together