The method in the video works. BUT, I can only imagine having this in a template or having multiple instances of this in a site or should that bricks element class name ever change or chaining class names ever changes… then this would be an even larger issue! Definitely not “maintainable”, which is very important.
I get what you mean. BUT, this is a builder… and a control for “Post Status” really should be present.
As far as creating sections and constantly having to do conditionals to show / hide, I would NEVER commit to developing that way. When you use a builder or any tool for that matter that in a breath says “less clicking” “more control” etc, but yet you have to do things like continuously on/off conditionals just to view code execution or not, then there is a problem with “the tool” itself.
Look at Elementor (which I really don’t like for obvious reasons), they and other builders have some stuff thats kinda standard… being able to on/off visibility with a click as you are working is paramount!
For example say you are working on a section that alot of inner working, layout, design etc. You duplicate that section to do another version albeit styling etc.
Having to conditionally on/off one or the other to visualize in the builder is ridiculous.
When you can simply click an “eyeball” toggle and it show or hides that “layer” in the builder… simple.
As stated here with visual: