bryanoltman / stager

Apache License 2.0
21 stars 5 forks source link

Persist environment control values when navigating between scenes #32

Open jacobsimionato opened 1 year ago

jacobsimionato commented 1 year ago

There are likely to be many environment controls that are common between scenes, either because they are the built-in ones, or they are used by an entire app etc. Sometimes, it's likely helpful to persist those values when changing scenes, e.g. so that if you want to check all the scenes for a specific device size, you can do so easily. Of course, it'd be great if there was a reset button also.

Extension: Make the environment control settings deep linkable, so you can share a link to a specific scene displayed with specific parameters etc.

I dunno how easy this is. As weird as it seems, I'm tempted to say that the EnvironmentControl API should just allow people to serialize / deserialize the settings values to a string, so you can implement the URL thing easily, as well as persistence between scenes.

bryanoltman commented 1 year ago

Ooooo I like this idea a lot! Agreed on the need for a reset button. I think such a thing may even be useful today.

A related but probably separate task: do you think it would be useful to persist settings between runs of the Stager app? Even if the answer is yes, that feels lower priority to me, but it'd be interesting to talk through some potential use cases.