Especially when creating tabbed Mini Panels using Tabs panel style (but not limited to that kind of use), there is a need for a minimalistic layout, ie. one that doesn't output more than is needed. Currently, the most minimalistic output can be achieved by using the Single column layout. But that layout still adds a ridiculous amount of nested DIVs and CSS styles, which is generally "too much" for the job. This led to the idea of the Plain output layout: one DIV container, no CSS, ie. rather plain output.

Note that this layout depends on #265012: Make layout CSS optional.

Comments

merlinofchaos’s picture

Other than the excess markup, does this differ significantly from the one column?

I.e, if we reduced one column to minimal markup, would there be any real problems? I'd rather do that than add a new layout which, to a user, looks the same.

sun’s picture

Component: Code » Plugins - layouts
Assigned: smk-ka » Unassigned
StatusFileSize
new186 bytes
new907 bytes

I'm afraid that altering the one-column layout might break sites that already use this layout and applied CSS styles to the surrounding container.

Having a separate Plain layout makes perfectly sense. It avoids unnecessary HTML markup where it is not needed.

smk-ka’s picture

If we rename the Single column layout files but don't overwrite what's possibly in use, there should be no problem, and would be my preferred solution, too.

sdboyer’s picture

It seems like an optimal solution here might be adding something to the existing one-col layout by implementing the 'settings form' and 'settings submit' properties. It doesn't need to be anything more than a simple checkbox that says "Use minimalistic layout;" you can then return one or the other layout style conditionally on whether it's been set.

'Use minimalistic layout' would be the way to do it, to...because that implies that it has to be checked, aka == TRUE, so we wouldn't have any of the nightmares we've had with $pane->shown...

merlinofchaos’s picture

Status: Needs review » Needs work

I agree with sdboyer. If you'd like to reroll the patch with his suggestions, that's likely to get a go.

sdboyer’s picture

Yep. Again, I'd like to see this in for RC, but it needs that refactoring done!

smk-ka’s picture

Title: New layout: Plain output » Add minimalistic layout option to onecol layout
Status: Needs work » Needs review
StatusFileSize
new1.61 KB

Here you go.

sun’s picture

StatusFileSize
new1.61 KB

Changed settings key to 'plain' and re-worded layout settings option.

sun’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.62 KB

Well, just added an E^ALL fix, and this is ready to go.

sdboyer’s picture

Status: Reviewed & tested by the community » Fixed

Nicely done, Kudweins. Thanks, and committed!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.