Page Manager is awesome! :-)

It has demonstrated that a lot of what the Panels eco-system does in Drupal 7 will work in Drupal 8, and even moved several of those ideas into Drupal 8 core.

However, it now contains some code that doesn't conceptually belong in Page Manager, either because:

  • It's outside the scope of what Page Manager is trying to accomplish, or
  • It's code that other modules (ex. Panels) could benefit from using, but don't need or want a dependency on Page Manager

It makes sense that this code is in Page Manager today, because CTools (the proper home for the code in question) didn't exist in Drupal 8 until very, very recently. But now that CTools, Panels and Layout Plugin are starting to come together, it's high time to move everything into it's right place!

We had a meeting on Google Hangouts to discuss this - here are the notes: https://docs.google.com/document/d/18nEhyVZdZwvQjAXz6YhRDyzl1zf3ZvATppS2...

This meta issue will track the issues to add the code to CTools, the follow-ups to refactor in Page Manager, as well as follow-ups in Panels and Layout Plugin to take advantage of the new code. I'm going to create all the CTools issues up-front, but I won't create all the Page Manager follow-ups until they become necessary (otherwise, I'd be creating an unreasonably large number of issues at once :-)).

Adding the code to CTools

#2511556: Add BlockVariantInterface (and Trait), and BlockPluginCollection from Page Manager
#2568741: Add EntityView block from Page Manager
#2511558: Add Drupal\page_manager\Plugin\VariantCollection from Page Manager
#2511560: Add Drupal\page_manager\Plugin\VariantAwareInterface and VariantCollection from Page Manager
#2511566: Add an abstract version of Drupal\page_manager\Plugin\DisplayVariant\BlockDisplayVariant from Page Manager

Refactoring in Page Manager

#2511570: Remove Drupal\page_manager\Plugin\PageAwareVariantInterface
#2511574: Refactor after non-controversial code (issue #2511556) is moved to CTools
#2511596: Switch from EventSubscribers to core-style ContextProviders

We will need to add follow-ups as the CTools issues get fixed!

Refactoring in Panels

#2511576: Remove dependency on Page Manager
#2511582: Extend BlockDisplayVariant rather than copying code from Page Manager

Refactoring in Layout Plugin

#2511588: BlockPageLayoutVariant should extend BlockDisplayVariant from CTools (rather than Page Manager)

Comments

dsnopek’s picture

Issue summary: View changes

Created all the CTools issues and added them to the issue summary.

dsnopek’s picture

Issue summary: View changes

Created a couple of the Page Manager issues and added them to the issue summary.

dsnopek’s picture

Issue summary: View changes

Created all the Panels issues and added them to the issue summary.

dsnopek’s picture

Issue summary: View changes

Created the (probably only) follow-up issue for Layout Plugin and added it to the issue summary. It should now only be Page Manager that will need more follow-ups later on - I think the Panels and Layout Plugin issues are all listed.

dsnopek’s picture

Issue summary: View changes

Minor fixes in issue summary for type-o's and clarity.

dsnopek’s picture

Anonymous’s picture

For me personally I need the simplest possible solution for "managing pages" where I can jsut create a page via UI, choose layout for it an put blocks in it. Having to additionally install CTools for me is totally unwanted.
If this gets done will the Page Manager be able to perform this simple task without CTools? I don't like modules to rely on anoter modules, especially if they have broad code base.

tim.plunkett’s picture

@ivanjaros sorry, but you just described the functionality of page_manager + panels + ctools.

dsnopek’s picture

@ivanjaros: We're treating CTools like an incubator for core, ie. things that should probably be in Drupal core but we weren't able to get them there for 8.0.0. We're hoping that we'll be able to continually move things from CTools to core in point relases like 8.1.0, 8.2.0 and so on. So, while CTools will be a necessary dependency for now, we hope that won't be the case forever. :-)

rlmumford’s picture

japerry’s picture

Get it saved

dsnopek’s picture

Issue summary: View changes

#2511568: Create "context stack" service where available contexts can be registered turned out not to be a dependency of any of these issues, so I'm removing it from this meta (it's still worth doing, though)

dsnopek’s picture

Status: Active » Closed (fixed)

I'm going to close this. It's done enough that we can just worry about the remaining open issues -- this meta isn't needed to track theme anymore.