Saving and restoring the collapse/expansion state?

I wonder if it would be feasible/useful for Bike file items to have something like a data-collapsed attribute ?

(So that patterns of outline collapse and expansion could be:

  1. saved and restored
  2. taken account of in translations from Bike outlines to other formats)
1 Like

I don’t think I want to store that state with items because you can have multiple views on the same document (File > New Window). Expand/focus state are owned by view not items.

So far I’ve just been saving expanded items state using the macOS “restorable state” system, so that’s why state is restored, but you don’t see anything in file format. I can imagine also storing this view state in <head> metadata. I think that would work well for most cases, but it gets messy if you are sharing a file with someone on dropbox (which some TaskPaper users do).

I think better way to expose expanded state is through eventual scripting API.

1 Like

Got it – I hadn’t thought of multiple views – that sounds good.

For some reason I had thought that collapse state wasn’t yet being restored. I must check again : -)


that’s why state is restored

Should I be seeing that in Preview build 23 ?

Yes, it’s using the standard “restorable state” macOS system. For that to work you need to make sure that you don’t have System > General > “Close Windows when quitting an app” selected. It also will only work for documents that you have left open as you quit Bike. If you close document and then quite Bike the state won’t be restored.

1 Like

Got it – works fine now : -)

(I think my habit had been to ⌘W each file when done with it)

1 Like

In the latest preview release Bike will store expanded state even for closed documents: Bike 1.16 (Preview) - #11 by jessegrosjean

1 Like