Conversation
| // Specifically added for WebWorker API, but seems that listing that one | ||
| // makes adding ESNext also necessary | ||
| "lib": ["WebWorker", "ESNext"], | ||
| "lib": ["WebWorker", "ESNext", "DOM"], |
There was a problem hiding this comment.
This is just because of some typescript errors showing up after a recent IDE update; makes this library explicitly available
SeanDuHare
left a comment
There was a problem hiding this comment.
Looks good - curious what you think about the versioning though so just waiting for that
| } | ||
|
|
||
| // Use browser localstorage to persist data between sessions | ||
| export default class PersistentConfigServiceWeb implements PersistentConfigService { |
There was a problem hiding this comment.
The other config storage keeps track of versions with schemas right? What do you think about storing the config version whenever this initializes so that we can version the config version (..) style going forward in case we end up changing the config variables a lot in the future? We could then, if the major version has changed, delete(?) the cookies saved so far and start anew. Worth checking if there is some existing convention for how apps do this too if you haven't yet.
There was a problem hiding this comment.
That makes sense to me! The other version was specific to "electron-store", and I wasn't sure if there was an equivalent I could translate to local storage. I think it's worth doing though, will take a look.
On a similar topic, I didn't include the other cookies that we currently use in desktop, but may be worth discussing if we want any of those to be included in web (e.g., columns?)
…feature/localstorage-cookies
Context
Although we did have a variable in state for storing whether a user has visited the app before, we weren't actually using it. This meant that the tutorials were showing up every time a user navigated from the website to the app, instead of just their first time.
Changes
Implements
PersistentConfigServicefor web (previously only implemented for desktop) so that we can managelocalstoragecookies.Also adds a hook in the app that both updates the "has used app before" cookie and launches the tutorials. This means that the tutorials now also launch when a first-time user is sent a link that goes directly to the app itself.
Testing
Manually verified (in incognito) that the tutorials launch when it's a user's first time visiting the app, and not any following times.