Fallback localstorage cases
What does this MR do?
Avoid exceptions from localStorage
being accessed when it is disabled by the browser.
-
Active tab memoizer will now simply not work for users with localstorage disabled. -
Emoji support map and user agent will now not be cached for users with localstorage disabled. This could have a significant perf impact, I haven't checked just yet, will update soon. -
Filtered search recent searches will now always be empty with a message to the user explaining why they will never have any recent searches.
The other case that uses localStorage
is our autosave feature, but its already avoiding exceptions.
This also makes sure localStorage access is checked safely (in a trycatch block)
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Screenshots (if relevant)
Active tab memoizer
I start on 1 tab, select another, and then refresh
w/ localStorage
w/o localStorage
A bit hard to see, but you'll see w/o localstorage, it returns to the default tab after refresh, but w/ localstorage it selected the previously active tab
Recent searches
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
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
What are the relevant issue numbers?
Closes #30179 (closed).
Closes #25788 (closed).