This depends on this layout_plugin issue #2490680: Allow layouts to provide settings.

That issue basically makes is it so that LayoutInterface also extends ConfigurablePluginInterface and PluginFormInterface so that layouts can provide settings forms and accept configuration.

This issue is to add the layout settings form to the Panels configuration form, and store the result with the Panels settings.

And once #2612040: Allow DS to use Panels layouts and vice-versa (using the new layout_plugin API for settings) is merged in Display Suite, this will also allow Panels to use to layouts from Display Suite!

Comments

dsnopek created an issue. See original summary.

dsnopek’s picture

Status: Active » Needs review
Issue tags: +Needs tests
StatusFileSize
new6.2 KB

Here's a first pass at this! It works in my testing, but it could use automated tests!

dsnopek’s picture

Issue tags: -Needs tests +D8panels
StatusFileSize
new9.41 KB
new3.2 KB

And here's some tests! If these pass (which they might if testbot doesn't pull the latest -dev of layout_plugin) then this probably ready.

The last submitted patch, 3: panels-layout-settings-2612044-3.patch, failed testing.

dsnopek’s picture

StatusFileSize
new9.42 KB
new851 bytes

So, that failed because it couldn't enable page_manager, which I think might be because the testbot won't recognize page_manager being a dependency of panels_test until after it's been in the repo for 24-48 hours (something like that). So, we might have to just commit this?

Anyway, I also forgot to enable panels_test in my last patch, so here's a new version.

Status: Needs review » Needs work

The last submitted patch, 5: panels-layout-settings-2612044-5.patch, failed testing.

  • japerry committed c7f4325 on authored by dsnopek
    Issue #2612044 by dsnopek: Add layout settings to configuration form
    
japerry’s picture

Status: Needs work » Needs review

Committed, but pushed to needs review. Hopefully tests will pass on new stuff now.

Status: Needs review » Needs work

The last submitted patch, 5: panels-layout-settings-2612044-5.patch, failed testing.

dsnopek’s picture

Sweet, thanks! This patch won't pass (because the patch is already applied) but I'll re-run the branch tests in 24 hours and see if they pass (or at least give a different error that shows that testbot caught up).

dsnopek’s picture

The branch tests came back, and testbot was able to find page_manager for the tests! However, the still failed because this depends on code in layout_plugin that isn't part of a release yet.

So, we should revert this for now! I have an idea for a multi-step approach that would get the change for testbot in first, and then we can merge the rest after the next layout_plugin release.

dsnopek’s picture

Status: Needs work » Postponed
StatusFileSize
new9.03 KB

I created a new issue that just includes the hidden 'panels_test' module: #2614206: Add 'panels_test' module that we can use for functional tests

And here's a new version of this patch without those changes. Postponing until we have a new layout_plugin release!

dsnopek’s picture

Status: Postponed » Fixed

I asked @tim.plunkett to re-run the branch tests and they are now passing. So, we no longer need to revert! Everything should be good now. :-)

japerry’s picture

Status: Fixed » Needs work

So I've been playing with this tonight, and it definitely has issues.. using the latest version of layout plugin I get an error:

( ! ) Fatal error: Call to undefined method Drupal\layout_plugin\Plugin\Layout\LayoutDefault::buildConfigurationForm() in /Users/japerry/Sites/d8/drupal/modules/panels/src/Plugin/DisplayVariant/PanelsDisplayVariant.php on line 209

Which appears to make sense, since there is no buildConfigurationForm inside layout plugin. Ideas?

dsnopek’s picture

What version of layout_plugin are you using? There's a ::buildConfigurationForm() method on LayoutBase which is the parent class of LayoutDefault, but this was only added in layout_plugin 1.0-alpha19.

japerry’s picture

Status: Needs work » Fixed

Looks like an issue with php needing to be reloaded fixed the issue. This works well now.

Status: Fixed » Closed (fixed)

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