SandDance icon indicating copy to clipboard operation
SandDance copied to clipboard

Add dialog in Data Browser to change numeric columns' quantitativeness

Open nik0sc opened this issue 2 years ago • 4 comments

See #270

nik0sc avatar Aug 23 '22 16:08 nik0sc

CLA assistant check
All CLA requirements met.

ghost avatar Aug 23 '22 16:08 ghost

Thanks for your contribution! I always appreciate a good PR 🥇

I think this change has implication on the History feature. A history entry may become invalid when a layout is dependent on a column type being quantitative, for example the Size role.

Also, the layout vegaSpec will need to be recomputed - so we will not be able to call viewer.onAnimateDataChange. This is because there is a binning slider mechanism for layouts with quantitative band scales (Bar, Column, Density & Stacks): image

So let's back out changes to viewer.ts and instead of viewer.updateColumn(), call explorer.load(). The .load() method should be modified to accept an optional "columnTypes" mapping of some invention.

Now since we are calling .load() this is a hard reset of the UI state, so I'll retract my need to have a "revert" capability and we should have a confirmation dialog with a message stating "this will erase your current history".

Lastly, look out for an upcoming merge as I've been working in some of the same files. 🙏

danmarshall avatar Aug 23 '22 19:08 danmarshall

Sure, I'll try to have something out this weekend, I guess that explorer.load would reset the entire history stack too? Also it seems that we could integrate a column type choosing step in the load dataset flow as well, independent of whether the button in the data explorer was pressed.

nik0sc avatar Aug 25 '22 12:08 nik0sc

Yes, explorer.load is a complete fresh start. As for the column type chooser in the opening flow, I'd rather have a visualization up as fast as possible, instead of a dialog as the primary experience.

danmarshall avatar Aug 25 '22 16:08 danmarshall

Thanks for the work so far, @nik0sc. I am going to complete this PR as-is and complete the work as part of a new "data summary" component.

danmarshall avatar Feb 03 '23 20:02 danmarshall