rusackas commented on PR #20377: URL: https://github.com/apache/superset/pull/20377#issuecomment-1156724225
> > I think an ideal flow might look something like: If we have form data for `big number` and switch to `pie`, it will keep the form data. If we then switch to `line` it will keep the form data all the way from `big number`. If we make adjustments to `line` and then switch to `bar`, the adjustments from line will be reflected in `bar`, (though anything not adjusted would continue to bring the form data all the way from `big number` if possible). Does that make sense? > > The matter up for discussion is "should switching to Big Number (for example) reset the Dimensions in standardized form data". Big number doesn't have Dimensions control, while Line, Bar, Pie etc. do. So we need to decide what happens when we set open line chart, set a Dimension, then switch to Big Number, then switch to Bar. Should Bar chart have Dimension control populated with value set in Line chart, or should it be reset since the previous viz didn't have that control. Thanks for distilling this discussion... There might be a good reason not to do this (some danger I'm not clear on) but my gut feeling is this: • All data that's modified or appended to the standardized controls should be persisted. You may switch to another viz that doesn't use it, but it should remain in memory/state. Then when you switch at any time to a viz looking for that control, it can be recalled. A field should not be disposed of until the chart is saved, and the ephemeral state is disposed of. • I think the current logic that _already_ applies to other extraneous (non-standardized) controls (i.e. each chart type keeps its unique properties like a Pie/Donut's inner radius setting) is that that they are kept in that ephemeral state, and restored when returning to the Pie chart after any number of viz switches. Treating standardized controls the same way, so that they may always be restored, makes sense to me. In other words, is there any harm in keeping that extra/unused data (Dimensions, in our case) in the ephemeral state, in case some other chart type finds it useful? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
