Efficient method for letting users know what is in an update?

I was contemplating some form of temporary popup to show to the end-user when there is a new update pushed to an app. I am aware that there is currently no way to verify the apps version directly through like app state, but I wondered if anyone had some suggestions on systems like this?

Hi @Larry_Keen,

As a first quick note, if anyone is interested, for on-prem I would know a way to have the current version of an app, the current staging version, and the current production version available.

As for your question, a simple method I thought about is to use a state variable and the local storage.

Essentially, create a state variable with type Object and structure it something like

// state variable "patchnotes"
{
   someKey: "someValue",
   patchnotes: `...`
}

The someKey: "someValue" pair is the identifier and can be whatever you want, as long as it can have many values. For example, you could do version: "1" and increment by 1 each time you release new patch notes.

Then create an action that compares that identifier with the value in the local storage on app load. If it’s not the same, save the new value of the identifier and open the modal (or whatever you use to show patch notes).

if ({{state.patchnotes.version}} !== {{localStorage.getItem('patchNotesVersion')}}) {
    {{localStorage.setItem('patchNotesVersion', state.patchnotes.version)}};
    {{ui.modal.open()}};
}

That’s it. It may not be perfect, but for how simple it is to set up, I think it works fine.

One thing to keep in mind, though, is that this will not work from different browsers or in incognito mode, since the local storage is different for each. But if the user is accessing the app from the same browser, it will work indefinitely.
Plus it’s not really that problematic, as it can be closed immediately and only pops up the first time it’s accessed from a different browser.

2 Likes

That all makes total sense, thank you for the suggestion.

1 Like

I was brainstorming an altered version of this system for just identifying if the app needs a page refresh based on version numbers. I would still need to have some back end system that updates the version number and adds the patch notes, but I thought store the version number and patch notes in a database record. If my thinking is correct this would get rid of the issue with the incognito or differnet browsers as it is able to reference it globally, and all instances of the app on any users computer is checking against the database.

1 Like

Update on the previously mentioned thought:

This method did in fact work. I was able to set up a button that appears when the users local version does not match the version in the database. This caused an issue where if the user used the browsers refresh button it would update the actual app version but leave the local version behind. I was able to use a reference to the window url and check to make sure that the user was refreshing from the browser and force an update of the local version. Will need to do a little more testing to see if there are still other issues.

1 Like