-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persist the state of the reporting table so that viewers can return to their previous view easily #4853
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Passing run #7592 ↗︎
Details:
Review all test suite changes for PR #4853 ↗︎ |
1fcda67
to
c745ba3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good! UAT'd:
- Changes to column visibility, width, and order are working as expected
- The "group by" state for the whole table is stored, but not "group/display" for individual columns (e.g. the data categories column), which I think is meant to be part of the AC:
Components to include in the state
Each column’s “Group/Display” status
Also, is this something we can add a Cypress test for?
Ah, good catch! Yes, I misunderstood the AC there. I'll add or update to include this. |
I can look into that. Might need to figure out how to persist the Cypress environment's local storage between page loads. |
0918089
to
81f3ca6
Compare
@jpople updated to address your comments. Thanks for those! I verified that we can go ahead and keep my accidental inclusion of the "Group by" state, in addition to the rest. I've update the AC to reflect that. I added some Cypress tests for verifying persistence on page reload. I didn't include column sizing or column reordering because a) they weren't included in the original tests, b) I think they were left off originally because it would be difficult to simulate dragging items to specific spots and check that they are in the correct spot using Cypress alone. Neither task can be accomplished without a mouse at the moment. We should probably fix that for accessibility in the future, which will in turn enable better testing. |
Closes PROD-1907
Description Of Changes
This modifies the existing Data Map Reporting page to keep track of the various states in Local Storage in addition to the react state. This will allow the user to reload the page, or close the page and come back to it, and not need to adjust these settings again.
This includes storing
Code Changes
useLocalStorage
in AdminUI client that is a modified version of the one in FidesJS.Some things needed to be updated to accept initialized values from the storage, since many were just using hard coded defaults:
tableInstance
is now initialized using the stored state if there is one.Steps to Confirm
/reporting/datamap
Pre-Merge Checklist
CHANGELOG.md