I don't know if my issue is related to https://www.drupal.org/node/2359087, but if all panes inside a region are empty (and not printed out) the wrapper is still printed out (eg. #panel-bootstrap-region-top).

Sure we probably can use the :empty CSS selector.. but printing out an empty region wrapper does not make much sense to me.

If its technicly nessecery to print out the surrounding wrappers (row, columns), we should give them some kinda "region-empty" class or something?

Update: The :empty selector won't work, because there are some spaces inside the wrapper.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thomas.frobieter created an issue. See original summary.

thomas.frobieter’s picture

Issue summary: View changes
thomas.frobieter’s picture

Issue summary: View changes
Anybody’s picture

Status: Active » Needs review
FileSize
20.33 KB

Yes, that makes a lot of sense. Here's the patch, tested successfully. Please provide some feedback for RTBC.

Anybody’s picture

Sorry there seems to have been a problem with the patch. My IDE seems to have cleaned all whitespaces etc. but didn't include the real change ... -.- sorry :D

Correct patch attached.

Anybody’s picture

Anybody’s picture

Finally. My IDE was driving me crazy... this is the right one and only contains the required changes.

lesleyfernandes’s picture

Patch #7 has worked for me.

Do you have any plans to review and commit it?

NWOM’s picture

Status: Needs review » Reviewed & tested by the community

#7 works great and can be applied without problems to the newest dev. Thank you.

hargobind’s picture

This works great in my testing. Empty columns/regions are not printed.

hargobind’s picture

Status: Reviewed & tested by the community » Needs work

On further thought, I think it's important to make this option configurable.

Given that layouts are often grids with a defined structure, site builders may actually not expect columns to simply disappear if the content is empty.

For instance, if I have a custom block or panels pane that occasionally displays empty content (e.g. "Today's news"), I wouldn't necessarily want that block disappearing since it could cause columns after the empty region to slide over -- and even entire rows could slide up.

I'm switching this to Needs Work until there is a configurable option. Otherwise, we run the risk of frustrating site builders by introducing unexpected behavior.