recogito / recogito-client

GNU Affero General Public License v3.0
1 stars 3 forks source link

localStorage Persistence for Document Homepage State #246

Closed rsimon closed 3 weeks ago

rsimon commented 3 weeks ago

In this PR

This PR makes the following two state variables in the Project Home view persistent via localStorage:

If the user reloads the page, or returns from the annotation view, they will end up at the same tab, and with the same Assignment selected as they last left the page.

Note: it's not a perfect solution though. If you leave the Project Home page via the "Back to Projects" link, you will later return to the persisted state. From a user perspective, you'd probably expect to enter into the initial state ("Documents" tab). In the long run, we should probably persist the state through URL params instead. This way, we can:

netlify[bot] commented 3 weeks ago

Deploy Preview for recogito-cloud-staging ready!

Name Link
Latest commit 4f78d1ddae286f8a0618288a5a8d8965bbe76574
Latest deploy log https://app.netlify.com/sites/recogito-cloud-staging/deploys/66c45192ada4250008673f7e
Deploy Preview https://deploy-preview-246--recogito-cloud-staging.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 3 weeks ago

Deploy Preview for vico-design ready!

Name Link
Latest commit 4f78d1ddae286f8a0618288a5a8d8965bbe76574
Latest deploy log https://app.netlify.com/sites/vico-design/deploys/66c451923fd2840008e5155d
Deploy Preview https://deploy-preview-246--vico-design.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.