Explore: Improve local storage error handling when rich history is added (#39943)

* Rich History: improve local storage error handling

* Reduce number of max items and update docs

* Rotate not-starred items and add tests

* Add missing property to initial state

* Unify date in richHistory tests

* Show a warning message that rich history limit has been reached

* Add missing param
This commit is contained in:
Piotr Jamróz
2021-10-11 09:48:25 +02:00
committed by GitHub
parent 08a20e2247
commit ad757b48e7
8 changed files with 318 additions and 177 deletions

View File

@@ -46,6 +46,17 @@ export interface ExploreState {
*/
richHistory: RichHistoryQuery[];
/**
* True if local storage quota was exceeded when a new item was added. This is to prevent showing
* multiple errors when local storage is full.
*/
localStorageFull: boolean;
/**
* True if a warning message of hitting the exceeded number of items has been shown already.
*/
richHistoryLimitExceededWarningShown: boolean;
/**
* Auto-loading logs volume after running the query
*/