mark-when / markwhen

Make a cascading timeline from markdown-like text. Supports simple American/European date styles, ISO8601, images, links, locations, and more.
https://markwhen.com
MIT License
3.56k stars 126 forks source link

Nested groups and sections #52

Closed jceb closed 1 year ago

jceb commented 2 years ago

Thank you for the great tool! I love it! I noticed that the group and section features don't support nesting. It would be great to have that functionality so that more structure could be provided entries!

kochrt commented 2 years ago

Thanks, I'm glad you like it :)

I thought about nesting when making groups and sections, but then thought it could get cluttered or look bad with (potentially) so many overlapping colors and collapsible sections. It's not out of the question - I do think events are comprised of smaller events, and internally it takes on a nice tree structure.

My concern is just that it wouldn't look that good when rendered.

My suggestion for right now would be separating things into pages or different markwhen documents altogether and linking them to each other.

Volapyl commented 2 years ago

It would indeed be useful that a section would at least be able to wrap groups until the endSection tag. Otherwise there need to be a logical user indication that this feature is purposefully left out. I just spent 5 min puzzling why it wasn't working as I expected it to.

While I agree that it could be broken up into different pages, I do also see the benefits of having 2-3 sections on the same sheet for correlated data to easier view events related to each other. Another approach is ofc to use the tags, but a section is a bit more logical to find visually in the text, rather than relying on tags.

AlexErmer commented 2 years ago

I also struggled until realising, that nesting is not working. In my case I have three main sections and each section may have several groups. Separation in multiple pages would not be beneficial.

huyz commented 2 years ago

It was quite surprising to me that groups can't be put inside sections. They're visually different levels of hierarchy so it's quite intuitive that it would work. I don't see a problem with confusion as long as the colors of the groups are distinct from the containing section.

kochrt commented 1 year ago

I just merged the nesting branch I had been working on into main (from 0fc8a5f1ec5061b944b70c74325b002b00cc3aea to f51035d0a2f03c144ff0a33330b1548935f8f464), so nesting is now available. Docs have not yet been updated.

Performance seems to have taken a hit though (with large enough timelines) so I'm going to look into that next.

Let me know if you see any other problems with the implementation.

kochrt commented 1 year ago

The VSCode extension has also been updated to support nesting.