verbb / vizy

A flexible visual editor for Craft CMS
Other
43 stars 8 forks source link

Add Reuseable Block Config #271

Open JshGrn opened 7 months ago

JshGrn commented 7 months ago

What are you trying to do?

I would like to be able to setup blocks and then define them similar to the Editor Config.

What's your proposed solution?

Somewhere to define 'global' Vizy blocks with unique handles, then be able to specify them in a similar way to the Editor Config json.

Additional context

This would allow you to create elements which might be used in various Vizy fields such as 'Button' and only have to setup the structure one time, this would save an unbelievable amount of time on my projects.

engram-design commented 7 months ago

I think this should be feasible, but would require some UI considerations, where you'll need to be able to pick from your global block types, or create a new one. Then, it's also a matter that you can't modify the globally-included block type, otherwise things would get messy.

JshGrn commented 7 months ago

I think not being able to modify the globally included block type is a given, and people should not expect to be able to. Re the UI, I personally wouldn't mind not seeing the included blocks in the normal builder and instead just a message to say additional blocks are being loaded from config... but if they were able to show then these could be quite easily grayed out and maybe a globe icon to say this is a global block and you can't edit... maybe just re-order?