rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
462 stars 261 forks source link

Replace $cookies global and related logic #11392

Open cnotv opened 4 months ago

cnotv commented 4 months ago

Description

From a removal attempt (https://github.com/rancher/dashboard/issues/11272), the global $cookies and 2-way binding logic adopted are defined from the plugin cookie-universal-nuxt. This has been replaced with a more generic one cookie-universal https://github.com/rancher/dashboard/issues/11321 As the logic creates several issues, replace with some more conventional patterns. The main reason is the presence of too many states: cookies, global, and Vuex.

Occurrences are not so high: https://github.com/search?q=%24cookies+repo%3Arancher%2Fdashboard&type=code&ref=advsearch

Screenshot 2024-07-01 at 17 26 43
nwmac commented 1 month ago

@cnotv Can we push this to 2.11?

cnotv commented 1 month ago

@cnotv Can we push this to 2.11?

Yes definitely. @rak-phillip has found a generic replacement that makes this change not strictly necessary. unless we want to change the logic around.