This PR adds code to persist filters when the user refreshes the web page.
Relevant Technical Choices
When the table is opened, saved filters are extracted and applied.
As time moves, the user keeps selecting filters, and we keep updating the storage.
When the user navigates to another table, we extract and apply filters.
So the flow continues to open the PSAT panel, open the table, apply filters, navigate to other tables, and close the PSAT.
But if we count the reloading of the page as a step to fulfill, the data gets lost, how?
During the debugging process, when the table is opened the first time we extract saved filters, let's say this time as T1.
As the user starts selecting different filters and reaches time T4.
During this time frame, storage has been updated but the local state storing extracted saved filters on T1 is still not updated, why? Because it was supposed to be updated when the user navigates to another table.
But if the user reloads the web page, we lose filters between T1 and T4, why?
Because the extraction cue hasn't been triggered(which is navigating into the table), and due to this we still operate on data stored on T1.
The old data from T1 will not be able to apply changes between T1 and T4.
To solve this issue:
The data flow has to be changed, for this, we'll use a variable that'll keep a reference of extracted saved filters and the latest updates on filters. So that we don't lose data during any time frame.
With this, we'll always have the latest filters saved and can be applied for any data change, be it reloading also.
Testing Instructions
Open the PSAT panel and navigate to the cookie table.
Open the filters sidebar and select some filters.
Now reload the webpage being analyzed.
The filters should remain consistent and present as per cookies data available at a certain time frame.
Description
This PR adds code to persist filters when the user refreshes the web page.
Relevant Technical Choices
To solve this issue:
Testing Instructions
Additional Information:
Screenshot/Screencast
https://github.com/GoogleChromeLabs/ps-analysis-tool/assets/58820001/b21721a3-ad66-452e-a944-df3229f133a6
Checklist
Fixes #690