Closed iMac7 closed 4 months ago
Btw, does the history work with multiple apps? For example app A has Cloud Config param
x
, and app B has the same. These history for both apps must be managed separately and not influence each other.
I hadn't thought of that, probably not. Let me check. How do I make another parse app locally? Between appid and server url, which is unique?
{
"apps": [
{
"serverURL": "http://localhost:1337/parse",
"appId": "APPLICATION_ID",
"masterKey": "MASTER_KEY",
"appName": "",
"iconName": "",
"primaryBackgroundColor": "",
"secondaryBackgroundColor": "",
"cloudConfigHistoryLimit": 100
}
],
"iconsFolder": "icons"
}
That is an example of how the history limit is configured in dashboard config currently, lmk if that's right.
I have implemented unique history for every app by adding the application Id to the localstorage key of the app, if IDs are unique then the fix should hold.
One last review, hopefully :)
Yep that sounds perfect, great job, let's merge!
Added README docs for new config option apps.cloudConfigHistoryLimit
.
🎉 This change has been released in version 6.0.0-alpha.7
New Pull Request Checklist
Issue Description
Adds recent config history using localstorage for better undo functionality
Closes: #2339
Approach
Every time the user updates a value in the config, it is saved to localstorage under the key
configHistory
. For each parameter in the config, an array of values is stored in descending order to show the latest value first.TODOs before merging