saulpw / visidata

A terminal spreadsheet multitool for discovering and arranging data
http://visidata.org
GNU General Public License v3.0
7.95k stars 283 forks source link

have opening `vds` file start with recorded sheet, not with VdsIndexSheet #2309

Open reagle opened 9 months ago

reagle commented 9 months ago

When I save a VDS sheet and return to it later, I expect to see things as I left them. Instead, I am shown a VdsIndexSheet.

Using VisiData v3.0.2 on python 3.12.1 on macOS 14.2.1 23C71 arm64 .

saulpw commented 1 month ago

Thanks for the feedback, @reagle. The .vds format was intended as a simple "save all my data" format which would be somewhat interoperable with other existing tools. It wasn't meant to save all internal VisiData state.

It's open for debate whether .vds should include more VisiData internal state, or whether there should be another format that does. I'm certainly sympathetic to a feature request to save and restore a session with perfect fidelity; it's just difficult to do correctly, and it seems like it would be an ever-increasing task that I'm not sure we want to take on.

That said, the immediate request has to do with multi-sheet formats starting with the IndexSheet, which is something we can address more widely than in the .vds format. It seems to cause people a bit of confusion when they open up an .xlsx file and expect to see the first sheet, and instead see this metasheet which doesn't map onto their experience with other tools. So maybe we should consider something like pushing all sheets in a multi-sheet format onto the stack, and letting the new sheet tabs interface show additional sheets, and promoting the open-source (backtick) command to get to the full IndexSheet (or they could just use the existing Shift+S to get to the Sheets Sheet).

What do you think about this approach?

reagle commented 1 month ago

Good morning @saulpw. I can confidently speak to what my expectations were. First, I was looking for some way to resume work from one day to the next. .vdj was not reliable enough for that and .vds got me closer but you say it isn't intended for that. So I'm not sure. Second, if I do open a single-sheet vds, I thought I'd see that sheet instead whatever that initial sheet is. If I open a multi sheet .vds I was expecting to see a Sheet sheet.

Otherwise, I apologize for my questions:

  1. Are there other multi-sheet formats? I see xlsx is, but it freezes some data and doesn't save derived columns.
  2. Is the new sheet tabs interface the 1>test | 2>test tabs at the bottom? I do enjoy those and their alt key shortcuts.
  3. I wasn't familiar with the back-tick and open-source command, nice!

Given these questions, I don't have a good picture of the state of things and where you intend to go, though I do appreciate the improvements. Also, I was thinking it might be nice to have icons in the tabs (and Sheets sheet), instead of the little arrow character. The challenge would be to use a set that is evocative and consistent looking. Misc Technical is consistent, but fairly abstract. Pictographs are evocative (such as the water drop for melt), but often look visually disjointed.

# Two only

- đŸ”ĸ ⌑ opened sheet
- 🔀 ⍈ derived sheet

# More specific

- ℹī¸ âŒļ info
- 🗃ī¸ ⎙ directory
- . ⍠ columns

- đŸ“ļ . frequency
- 📊 . graph
- 🔀 . pivot
- . ⎌ transpose
- 💧 melt