-
Notifications
You must be signed in to change notification settings - Fork 24
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
Prefix local storage access with user email address #4217
Conversation
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.
Very nice implementation :)
frontend/javascripts/oxalis/view/layouting/layout_persistence.js
Outdated
Show resolved
Hide resolved
}, | ||
|
||
removeItem(key: string): void { | ||
return localStorage.removeItem(key); |
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.
Shouldn't this also use prefixKey(key)
?
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.
Whoops, well spotted! 👍
Thanks for your review and the commit suggestions 👍 Should be ready now :) |
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.
👍
According to
main.js
, the entire rendering of views is blocked by loading the active user. So, simply depending on the store synchronously should work pretty well. For the layouts, my testing showed that everything works as expected, except for logging in on a tracing page without reloading. One could expect that the layout is changed automatically (to the last layout used by the logged in user). However, the layout code itself is quite brittle which is why I didn't want to touch that. Also, the impact isn't really big. What happens now is that the layout stays the same, but after reloading the last active layout (by the user) is loaded again.URL of deployed dev instance (used for testing):
Steps to test:
Issues: