Plugin: Collapsible blocks

Already it's very useful! And thanks for your goodwill in sharing!

A killer feature for me in the latest version was the ability to collapse headers in rendered view. That's a feature I never found elsewhere. I went back to the stable version, as code rendering in the blocks was mis-rendering as markdown.

Still daily using your Copy-Span and Collapsible-Blocks, very nice additions to Joplin!

Look after yourself :waving_hand:

1 Like

Could you give an example of what was causing this bug? I wasn’t able to reproduce it just now, but it sounds similar to a bug I remember encountering a few months ago, that I forgot to write down and then forgot how to reproduce :eyes: I may not be the most organized.

I do have plans to make the headers (have the option to) remember whether they were opened/closed, as was requested by someone in another thread. I haven’t started on that yet though, and I’m expecting the solution I have in mind to only work on desktop, not mobile, which I don’t like but it’s better than nothing. I’d also like to make the headers collapsible in the editor. Honestly I can’t say I’m super pleased with the current state of the plugin, and I’ve considered just starting it over from scratch - but that seems like a good way to make sure the next release just never happens at all.

The only workaround is use Joplin mobile web app as PWA instead of the app from damn App Store.

Joplin Mobile web app (app.joplincloud.com/) (as PWA through Safari).

Here I describe one of known limitations of such approach:

Hi @ntczkjfg

I meant in your dev version in the webview the little arrow added to right of headers, giving the ability to collapse header content by clicking on the headers—that was an excellent aid in navigation long notes in the reading view! :glowing_star:

The bug seems to be caused by any header appearing before a code block with content bounded by your fences. Here is a note to demonstrate:

Collapsible Block 1.9.0 - header breaks following code blocks.md (478 Bytes)

Happy to test any changes you make as time goes by. :waving_hand:

1 Like

@johano Thanks for the test note :blush: I’m on the wrong machine to test this right now but it should be super useful later on. I’m thinking I might release the next version as a bugfixed version of the dev version you tried so something is out, then see if I can get through some major rewrites after that. Maybe I should finish up letting headers collapse in the editor and remember their state, as well.

@executed That’s not quite what I meant about issues with mobile - I use Android and don’t have an iOS device. But the solution I had in mind for remembering if headings were left open or not, without adding any extra data to notes, was to save an external file that stored that information. I remembered earlier in this plugin’s development that the API offers some functionality like that, and I very briefly tested it out, before finding it didn’t work on mobile, at which point I moved on to other things.

But… Rereading the API now, I don’t think I noticed the joplin.data.getUserData options before, and they seem perfectly up to the task - I’ll have to test out if that works on mobile.

1 Like