Esri / application-boilerplate-3x-js

Starter application that simplifies the process of building templates for the ArcGIS.com template gallery.
https://developers.arcgis.com/javascript/
Apache License 2.0
90 stars 68 forks source link

4x boilerplate: Add support for reading app values from local storage #90

Closed kellyhutchins closed 7 years ago

kellyhutchins commented 7 years ago

I'd like to add support for reading app values from local storage so we can take advantage of this capability in the app config panel. If the app was able to read app values from local storage we'd be able to support live preview and undo/redo capability in the default template config panel. The app could use the values from app storage to provide live preview and then once the save button was hit on the config panel we'd write out the appid and clear local storage.

@driskull thoughts?

driskull commented 7 years ago

Yep! sounds like a great idea. I remember we talked about this before.

driskull commented 7 years ago

@kellyhutchins would this require that the app have an appid? Otherwise, we don't want to have settings conflict with different apps for a user. Need some kind of unique identifier.

kellyhutchins commented 7 years ago

@driskull yep - but once you enter config mode we have an appid so we'd use that appid. If the template was locally hosted and didn't have an appid then we wouldn't write anything to storage.

driskull commented 7 years ago

do you need functions to set or remove the local storage item from the boilerplate or would that be done outside?

kellyhutchins commented 7 years ago

We'd do that from the config panel so I don't think we'd need functions in the app.

driskull commented 7 years ago

Reassigned for verification

driskull commented 7 years ago

Is this good @kellyhutchins ?

driskull commented 7 years ago

closing. reopen if necessary.