Description
Makes graphing a full sheet experience. Each graph now is its own tab in Mito. The fact that the graph is an entire sheet and the fact that the graph is persistent makes graphing feel way more powerful, even without the upcoming functionality changes.
It allows you to delete, duplicate, and rename graphs. It also lets you use generate a graph from a datasheet through the sheet tab actions.
It also gets rid of the usage triggered feedback so we don't need to maintain that anymore.
There are a few things that this PR leaves desired:
Number 1:
there is a tradeoff between making redo work properly when the entire graph is deleted, and making the graph refresh when opening the graph. The reason that this tradeoff exists is the same reason that we can't properly handle redo in pivot table (where we can't refresh the params). Namely, we can't tell the difference between a redo event and just a regular edit. See the existing issue here https://github.com/mito-ds/monorepo/issues/120
Specifically, for graphing we can't tell the difference between opening a graph / switching from one graph to another (both of which cause the graphID in the GraphSidebar to change) and a redo event that recreates a graph that was previously completely removed using undo.
Since the graph has existing issues with redo (namely, the parameters aren't kept in sync), and I think its a more common use case that people will create a graph, edit the data, and then want to see the updated graph (this is one of our core design principles of graphing -- respect the relationship between graphing and transformation), I vote we opt for refreshing the graph, causing redo to not work in this specific instance.
Number 2: https://github.com/mito-ds/monorepo/issues/147
Number 3: Since issues documented https://github.com/mito-ds/monorepo/issues/145, when you create a graph, it actually gets created as two different steps. Therefore, using Undo requires pressing it twice to get the graph to actually fully dissapear.
Number 4: We should make the graph taskpane play nicer with the toolbar. However, I don't want to expand this PR to do so, so lets address it separetly. I added a note to the next spec to specify this in a bit more detail and add it to the plan of attack.
Testing
Make sure that it plays nicely with undoing graphs, and that the correct graph is always selected.
Once we merge into dev, we can test the spacing on windows
- [x] I have tested this on real data that is reasonable and large
- [x] If I changed the interaction with JupyterLab, I tested that it does not break other programs (like VS Code), and tested that it works "multiple times" in the same notebook.
Documentation
Yes, this requires documentation changes, but we should just wait until we are finished this week of changes before updating.
cla-signed