Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
See meta-issue: #2511554: [meta] Move some parts of Page Manager into CTools
This is about moving the following non-controversial parts of Page Manager into CTools:
- Drupal\page_manager\Plugin\BlockVariantInterface (and Trait)
- Drupal\page_manager\Plugin\ConditionVariantInterface (and Trait)
- Drupal\page_manager\Plugin\BlockPluginCollection
TODO
- Create the new files in CTools, renaming all the namespaces
- Copy and port any automated tests for these files into CTools as well
- Make sure the tests are all passing
This issue DOESN'T include changing Page Manager to use this code in CTools (rather than it's versions), that's going to be in #2511574: Refactor after non-controversial code (issue #2511556) is moved to CTools, although, it would be good to have a working patch there before committing this one.
Comment | File | Size | Author |
---|---|---|---|
#17 | interdiff.txt | 1.45 KB | dsnopek |
#17 | ctools-move-pm-classes-2511556-17.patch | 14.15 KB | dsnopek |
Comments
Comment #1
dsnopekI'm adding to the sprint board because a Panels issue is blocked on this one: #2511576: Remove dependency on Page Manager
Comment #2
dsnopekEr, VariantAwareInterface wasn't meant to be here, that got it's own issue: #2511560: Add Drupal\page_manager\Plugin\VariantAwareInterface and VariantCollection from Page Manager
Comment #3
dsnopekComment #4
MichelleJust noting that I am working on this at Drupalcorn.
Comment #5
MichelleI took a crack at this but I know nothing about testing and am hung up there. I moved the two tests that seemed likely but could not figure out how to run the tests. If I do --file [testfile] it comes back with "ERROR: No valid tests were specified.".
Unassigning this from myself because I'm heading home from Drupalcorn and honestly don't see me being able to get back to this in the next 2 weeks. Hope it helps some. :)
Comment #8
matthewmessmer CreditAttribution: matthewmessmer commentedWorking on this at MWDS
Comment #9
matthewmessmer CreditAttribution: matthewmessmer commentedI moved some the tests from /src/Tests/src/Unit to /tests/src/Unit. They should execute and pass now.
Comment #10
dsnopekCode looks good to me! Marking RTBC :-)
Comment #11
dsnopekEr, hang on! This patch isn't totally well formed, it has the path wrong. Here's one that should be right!
Comment #12
dsnopekIf the tests pass, I think this is still RTBC.
Comment #13
EclipseGc CreditAttribution: EclipseGc commentedBoth of these seem completely unnecessary to me. We're moving Page Manager variants to a config entity and those will always have selection criteria handling at the entity level and don't need this abstraction. Remove these from the patch and the rest looks pretty good to me.
Comment #14
dsnopekHere's a new version of the patch with the ConditionVariantInterface and ConditionVariantTrait removed!
Comment #15
EclipseGc CreditAttribution: EclipseGc commentedI really don't like that we're implementing this in a trait. I'd much rather see us provide a BlockVariantInterface implementing class that provides these regions instead of having them on the trait.
So, this feels like two issues to me. Can we break apart the EntityView block & deriver from the BlockVariantInterface & Plugin collection and stuff? One of these is totally applicable to core's uses and the others are support for panels. I think it'll make review easier, I made it to the deriver class and was like "wait am I still reviewing the entity view block patch?" and indeed I was.
I think both of these can probably go in, but I have no doubt about the block and the deriver and I have some additional review and effort I want to see on the variant stuff, so lets simplify a bit and get some of this committed now.
Eclipse
Comment #16
rlmumfordSplit the EntityView block into another issue. #2568741: Add EntityView block from Page Manager
Patch is the same but with the Entity View block and deriver removed.
Setting back to needs review so we can begin sorting out the block view variant.
Comment #17
dsnopekHere's a patch that addresses #15 by making
getRegionNames()
abstract. Hopefully, this one will finally be ready!Comment #19
mpotter CreditAttribution: mpotter commentedAdded #2573413: Fix wizard tests to address the failing Wizard tests that don't seem to have anything to do with this patch.
Comment #20
dsnopekForcing back to NR - the test failures are unrelated
Comment #21
japerryMarking as a duplicate to the fixed #2511566: Add an abstract version of Drupal\page_manager\Plugin\DisplayVariant\BlockDisplayVariant from Page Manager issue.