jongacnik / kirby-fields-block

Kirby block preview plugin to directly render block fields
MIT License
109 stars 5 forks source link

Collapsible blocks #1

Closed MikeHarrison closed 3 years ago

MikeHarrison commented 3 years ago

Hi, This plugin as great, incredibly useful and a good bridge between using the drawer for custom blocks and having to dive in to plugin creation.

One enhancement that would make working with it easier on longer pages, would be the ability to collapse the blocks so just the type was shown, like an accordion.

Just a thought - super work though

jongacnik commented 3 years ago

Hey thanks for your note, I had actually already started adding that functionality locally. This is now packaged up and published: you can expand/collapse blocks by double clicking the block title bar. State is persisted to the session to retain expanded/collapsed state while navigating the panel.

MikeHarrison commented 3 years ago

Awesome, that's just the thing! One small suggestion - perhaps a visual indicator on the right hand side of the title bar? It could take the form of an arrow, pointing down when the block is closed and up when it is open? But that's a small point, it works really well.