visdesignlab / upset2

UpSet - Visualizing Intersecting Sets
https://upset.multinet.app/
BSD 3-Clause "New" or "Revised" License
54 stars 7 forks source link

De-duplicate and improve undo/redo #111

Closed alexsb closed 1 year ago

alexsb commented 1 year ago

Remove the undo/redo from the menu on the left, and make it work in the tool bar.

Also make the buttons stateful (grayed out if not available)

Provide a tool-tip

JakeWags commented 1 year ago

Requires Trrack refactor: move provenance initialization to packages/app. I tried when adding import/export grammar and ran into MANY issues. Need to discuss with @kirangadhave

alexsb commented 1 year ago

Can you explain why?

kirangadhave commented 1 year ago

Removing the undo/redo shouldn’t require an refactor. Just a new prop for Upset component.

To hook up the undo/redo functionality with the app buttons, you can pass in a Trrack instance instead of letting Upset create one on its own.

@alexsb we have duplication because right now upset component creates it own Trrack instance since there’s no guarantee that the parent app uses Trrack. But it can also accept an Trrack instance from the parent app, and then it uses that instead. We have undo/redo buttons as part of upset component, as well as undo/redo which the app added. One of them can be hidden.

@JakeWags happy to do a short pair programming session if you’re running to issues