b-camphart / timeline-view

Obsidian plugin for viewing your notes linearly based on a given property
GNU General Public License v3.0
23 stars 0 forks source link

Save timeline in file system #11

Open b-camphart opened 7 months ago

b-camphart commented 7 months ago

Probably related to #6, this feature would allow users to save a timeline as a json file with the applied filters, selected property, and groups. Users could then close the view, and later reopen that json file, and still have all the settings from a previous session. Effectively, this would work similarly to canvas, complete with custom .timeline file extension.

Update Aug 22, 2024:

I need to think about this a lot more, and I'm open to suggestions. I see a few options here:

The Canvas Pattern

The user would have to choose to save the current timeline to a file, or all timelines would have to be files, to make this work. If the user has to choose to save it, then there's no reason that there couldn't be a "loading" feature to use a different config file. If we go the "all timelines are files" route, we'd have to remove the ribbon icon, and it changes the plugin from being a "view" of notes, and instead a special file type that only makes sense to this plugin.

Additionally, having files makes sync complicated. From other plugins I've seen in the community, working with save files that can sync can really mess some things up.

Config as a Note

Another version of this option is to use frontmatter with a special "timeline-view" property, which can have the timeline config inside of it. It removes the need for a special file type, but it encourages people to riddle their vaults with notes that are just frontmatter (this is how Longform does things).

The Template Pattern

This really just removes the need to automatically save a timeline. It's on the user to create new configs, or save the current timeline to the config folder/file. The timeline would only read a "template" once when opened, or when loaded. However, it still introduces some problems with sync, and requires users to be familiar/comfortable working with json.

Store as part of the plugin data

This option removes the need for users to work with json, but re-introduces the feature complexity of saving the timeline. It also hides some data that the user created (filter and group queries) from them, meaning they would be gone if the user removed the plugin.

a-oneil commented 2 months ago

Hello, is this project still being actively developed? It has been immensely useful in my workflows. The one downside is that the timeline's group coloring and filtering disappears when I close the timeline. My notebook is color coordinated so I would love the capability of retaining groups and their coloring upon exit.

b-camphart commented 2 months ago

Still in development, yes :) Just a bit slow at the moment.

a-oneil commented 2 months ago

Still in development, yes :) Just a bit slow at the moment.

Sorry, didn't mean to come off as rude if it felt that way. Was just genuinely curious.

b-camphart commented 2 months ago

Didn't come across that way at all :)

b-camphart commented 2 months ago

I think I'll tackle 90% of this feature with #20

b-camphart commented 2 weeks ago

Maybe another chunk of this could be bitten off by adding a context menu item for folders to "view as a timeline." It would then open a new timeline that was automatically filtered for just that folder, and still pull from the default groups and ordering property. (tracked in #31 )

That in mind, I could also add that context menu option to properties and tags. (tracked in #31 )

Also, maybe I could add an option to the plugin settings that enables re-opening the timeline with the previous configuration (unless overridden by opening it with one of these other options). It would at least solve another chunk of this problem without too much additional complexity. (tracked in #33 )

b-camphart commented 1 week ago

Another way of handling this would be to save the timeline as a note, with the ordered list of file links in the body of the note, and the various settings in the frontmatter.

Another way to save it could be as an svg file, but that might be more of an export feature than an actual save file.