ryanthompson - 2 months ago

The layout editor is coming along but wanted to put some ideas down here in HOW it will work.. I am in a battle vs more traditional form builder cycle vs tons of JS..

So the idea of the layout builder is that you can define 1 or more layouts per stream. A layout being basically the $structure for a form - based on stream and slug. So the default layout for Pages for example. This utility will let you customize it from the CP. So you can put your custom fields anywhere - reorder the existing fields / add tabs / rows / columns / etc within sections or add more sections and customize your form layout. The slug is so you can define multiple per stream in case you want to combine them / change them for whatever reason.

So where I am at now is a mixture of traditional request cycles and JS..

For example - add section (reloads), add tab (reloads), add field (modal -> select -> reloads), all dragging and dropping would be like pages - no reload. But then you'd want to save your ordering (obvious reload).

The reason being is so that we can rely on the underlying UI architecture to produce HTML. I started off using much much much more JS and it was not going to work well if I changed HTML / markup at all. Basically I'd have to mirror HTML / structure changes in JS as well..

Thoughts on this? All in all I think the workflow mentioned above will be a little slower but MUCH more stable and MUCH more maintainable and MUCH more versatile for other CP admin themes.

ryanthompson - 2 months ago

PS this and the other features like versions / statuses will be in Pyro 3.5 with Streams Platform 1.4

edster - 2 months ago

More stable and more maintainable and more versatile > faster imo.

Could we not build some JS to pull the HTML from routes via ajax for building?

This would let you have more stables and faster.

william - 2 months ago

My 5 cents, release it that way. Let the community have a go at it. Then we can take it from there. I think i prefer that we rely as little as possible on JS until we have actually moved pyro backend to utilise VUE.

And second. I feel this release without too much js will be released faster. And we need this yesterday. And there is not anything stopping us from adding more js along the way if it's needed.

damian_nz - 2 months ago

I agree with william, eve if you release it under beta so new people don't get tripped up under it, I think this is the kind of feature we need to play with to give you any kind of useful feedback

william - 2 months ago

I mentioned this in another comment. So i thought id ask here as well, what is the status on this one?

ryanthompson - 2 months ago

Behind layouts currently and possibly blocks. I REALLY really wanna get blocks out cause I am so sick of using Grids for it lol. Migrations and stuff copying around is kinda annoying.