It would be great if the IPE allowed users to configure region style plugins in the same was as they can configure pane style plugins. I think it is more complicated than adding the pane style plugin in #881562: Panels IPE: Add Style configuration link to pane editor since the entire region markup would need to be re-rendered (and the IPE behavior reattached) but it seems possible.

Comments

joelrotelli’s picture

Subscribing...I need that too and i will look at the code to make a patch for that

joelrotelli’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new629 bytes

Here we go... My patch to allow CSS editing in region with Panels IPE !

I hope it that you wanted, for me it's exactly what i needed !

merlinofchaos’s picture

No, that's pane CSS; what is wanted is the region style settings.

In the normal backend editor, the setting is in the same dropdown as 'add content'.

joelrotelli’s picture

Status: Patch (to be ported) » Needs work

Ok sorry...So I will make a new issue for that

merlinofchaos’s picture

Status: Needs work » Needs review
StatusFileSize
new1.64 KB

This patch allows region style settings. The actual region style change does not take effect, however, until the panel is saved. This is because completely re-rendering the region is quite complex: in particular, it means processing where everything in that region might have moved (including panes moved out) and rerendering the entire region with the new style. Making this work is a lot of work, and I'm not sure immediate feedback on region style changes is necessarily even needed.

populist’s picture

This patch is very cool and will open up a lot of doors! In terms of feedback:

1.) There was a slight CSS issue with Firefox that caused the style button to hang down slighty. I rerolled the patch (attached) to address this.

2.) Might it be possible to add some feedback (i.e. a "The region style has changed and requires the page to be saved to see the changes") just so users know? I dont think immediate feedback is necessary (but would be super cool if it was possible).

populist’s picture

Additionally, there seems to be problems with some style plugins (namely the ones that organize the panes into a list like the "List" plugin provided by Panels) where the $panes['empty_placeholder'] markup is accidentally added to the themed list of content.

This problem can be seen in this screenshot (http://drupal.org/files/panels-list-region-style-ipe.png) and fixed with the attached patch (http://drupal.org/files/1549660-list-region-style-dont-render-empty-plac...) as per this screenshot (http://drupal.org/files/panels-list-style-ipe-patch-applied.png).

I am going to presume there is a more global way to exclude that pane from the region theme functions, but this patch will help to explain the problem.

populist’s picture

Here is a reroll of my patch from #6 against the latest -dev.

populist’s picture

Here is a reroll for Panopoly since we have some competing packages. Just posting here since Drupal's packaging script requires it.

populist’s picture

Here is a quick re-roll to work with patch #1711302: Make "Add New Pane" an Icon with a Smaller Design. Sorry, drush make is wierd!

merlinofchaos’s picture

You know, I'm not sure there's a good answer to #7. Normally you want the placeholder pane to be rendered with all the other panes so that it ends up inside the style. However, the 'list' style and 'tabs' style and the like are...well, the problem is they're not really styles, and they're an abuse of the style system. Ironically, they're why the style system got written. But they're...kind of wrong.

I'm tempted to just leave that be and let it be wrong on those styles, because I don't think we can really fix it. I don't really like hacking the style to exclude the placeholder pane (and besides, doing that put it in the wrong place anyway). But I think if you go with a tabs style, it's going to be even worse. And the answer just might be...those styles probably shouldn't be used with IPE. That's a crappy answer, I know.

merlinofchaos’s picture

I also can't think of an easy way to get a message about needing to refresh in. I'm going to go ahead and commit as is, and maybe we can hope some refinements will show up along the way.

populist’s picture

Status: Needs review » Fixed

Marking this as fixed since it was committed in #12. The UI here can be updated as per comments in #7, but we do have region styling in the IPE now.

Status: Fixed » Closed (fixed)

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

  • Commit 369c214 on 7.x-3.x, 7.x-3.x-i18n, 8.x-3.x by merlinofchaos:
    Issue #1549660: Added Allow Styling of Regions in the Panels IPE.