-
Notifications
You must be signed in to change notification settings - Fork 12
fix(ui): fix losing session data when navigating different versions #1756
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
Conversation
92ae4be to
20481be
Compare
c31fcf1 to
d9ba8af
Compare
|
Hmm hold on reviewing, I spotted a last mistake to fix |
|
@vjousse this is back to ready for review… not super proud of the solution to have both app versions living on the same domain by using two distinct store keys, but backporting all this elm code to stable/textile was too complicated and cumbersome so I don't think it's worth doing. Tell me what you think :) |
b589b5d to
86dc0fa
Compare
86dc0fa to
bb430aa
Compare
vjousse
left a comment
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.
Tested locally, with valid and invalid JSON: works as expected, god job! Are we sure we want to keep invalid bookmarks in the local storage when we detect one? Shouldn’t we delete the invalid entry from the storage?
We actually have to keep them because they may be valid in another version (a valid v7 one is invalid in ongoing version and the other way around) Edit: Oh, you mean now we have distinct stores, it doesn't matter anymore and we should garbage collect them? That makes sense, thanks for the feedback 🙏 |
|
Yes indeed, that’s what I was talking about! |
@vjousse that's because you're testing the v7 regulatory version, which I can't patch as previously stated… the filtering of invalid bookmarks is only implemented for master. Or do you observe this behavior on the ongoing version as well? |
|
@vjousse Oh I see the Edit: tested this myself, it's indeed because you have to perform an update to the session for the filtering to be performed and persisted. |
|
Indeed, with an update of the bookmarks, it works as expected 🎉 |
vjousse
left a comment
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.
LGTM!

🔧 Problem
This patch:
🚨 Points to watch/comments
Contrary to the initial impl. in #1694, this one is non-destructive, meaning there won't be a session reset nor emptying the list of existing bookmarks for end users when deployed to production.
The patch introduces a new separate localStorage key for the ongoing version (
ecobalyse) and leaves untouched the previous one (store); while it's a bit sad to have those two stores, the UX is better and safer for end users and I think that's what matters most.🧐 How to test