I have been thinking a lot about adding the ability to do things like:
Lock things like code blocks, live templates, live queries from going into edit mode
default certain parts of a page as folded
maybe add a filter box to a query (a lot to this but just spitballing)
… anything else your heart may desire to configure on a block/widget
and I was thinking that it might align with the way things are done in SB thus far to leverage frontmatter blocks to control some of this:
```query
- - -
locked: true //this would also add an icon to unlock it
folded: false
filterable: true
- - -
tag where name = “my-tag”
```
# Some heading
- - -
folded: true
- - -
How do people feel this aligns with the sprit of SB and Frontmatter? Any other ideas related to this?
I simply love the idea of misc. modes, like in vi(1), personally. Why not to have “visual” (read-only) mode and “insert” (editing) mode and get rid of many small annoyances at once? Because it will also solve some issues when using SB on mobile phones etc., AFAIK. All we need is a “knob” (command) to toggle between the two modes. Then a button can be added easily to switch between the two modes, or from the command menu, or whereever you place the command in a page.
Folding, yeah, I would love to have it too! But perhaps the proposed syntax is somewhat unusual. What about something like:
# Heading
{.folded}
And, of course for quotes and admonitions:
> Some quotation...
> This line will get folded...
> And this one too...
> {.folded}
Extended idea: to just toggle folding on/off for a block with e.g. {.folding} and then let SB somehow remember the last state of the block (folded/unfolded).
I can imagine folding list branches (may be complicated because of the code that lets us reorganize the lists), or even simple paragraphs (the first line for example could stay unfolded)…
But, TBH, I have no idea how hard are these ideas to implement.