longform icon indicating copy to clipboard operation
longform copied to clipboard

Feature Request: Option to apply property to scenes based on order

Open b-camphart opened this issue 1 year ago • 3 comments

Describe the solution you'd like Longform defines an ordering for the scenes within a project, but this ordering is removed when longform is uninstalled. It's also not readable by other plugins. I'm wondering if there could be a toggle, possibly on a per-project basis in the longform index file, that tells longform to add/modify a property for each scene with the given index as the value. This would allow other plugins in Obsidian to read the ordering, without having to directly interface with longform.

I'd be happy to implement this, but I want to ensure it's inline with your vision @kevboh . Considering some recent issues opened around syncing, I'm not sure how you feel about longform actually modifying the scene files.

Alternative Options

  • A small, custom plugin that directly interfaces with Longform to read the index file and apply the property. Users would have to hunt for it. (though, the plugin could be listed in longform's README for easier discovery).
  • A compile step that simply applies the property. Possibly in a new workflow that is included by default, but not used unless selected. However, this would mean users would have to remember to "compile" the project every time they change the scene order if they want other plugins to detect the change. But, maybe a small modification to the way longform works could be to ask the user, after the scene order has been changed, if they want to apply it?

b-camphart avatar Feb 14 '24 22:02 b-camphart

My preference would be for this to be opt-in at the plugin settings level. When on, it writes a longform-order property or similar to each scene equal to its index. I suppose nested scenes would be something like 1.2 or similar.

kevboh avatar Feb 15 '24 15:02 kevboh

I think that makes sense. How do you feel about the written property name being customizable, but defaulting to longfrom-order?

b-camphart avatar Feb 18 '24 22:02 b-camphart

Fine with me as long as all of this is opt-in!

kevboh avatar Feb 19 '24 13:02 kevboh