edgi-govdata-archiving/web-monitoring-ui

Save user's last diff type using localStorage/sessionStorage

Closed this issue · 4 comments

Currently whenever a user navigates to a change it defaults to the side-by-side rendered view. Analysts have asked that we save the diff type they were last using so that it doesn't always default to that view. https://archivers.slack.com/archives/C47DJK8H0/p1516715228000107

We can do this using localStorage the same way we've been storing if the annotation form is expanded or not. WE SHOULD NOT USE COOKIES 🚫🍪

Should probably set both session and local storage and, when reading, give sessionStorage priority (so you can have two windows with different preferences, but a new window will still pick up on the last used diff type).

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in seven days if no further activity occurs. If it should not be closed, please comment! Thank you for your contributions.

We have a layered-storage module that can be used for this now. See #313 for an example.

This was fixed in #477.