Comments

demonde created an issue. See original summary.

samerali’s picture

StatusFileSize
new6.52 KB

Can we test this out? i found the module couple of hours ago and thought i could help getting it to work with D8.3, seems to be working good with me right now.. BTW this module though probably needs version 2 instead of the current v1

samerali’s picture

Status: Active » Needs review
samerali’s picture

So something is failing on D8.3 tests, Could someone help?

samerali’s picture

Status: Needs review » Needs work
samerali’s picture

StatusFileSize
new6.62 KB

Updated the patch to resolve a bug that would not make region detection probably. I'm using the module with this patch and it's working great!

samerali’s picture

Status: Needs work » Needs review
legolasbo’s picture

Thanks for your efforts @samerali. I'm currently unable to review your work due to time constraints. I'll get on this ASAP. Any reviews are most welcome in the mean time.

h3rj4n’s picture

Status: Needs review » Reviewed & tested by the community

Seems to work as designed. I'm able to display the fields within a layout.

andypost’s picture

StatusFileSize
new601 bytes
new6.8 KB

RTBC ++

Just a minor clean-up of description & both dependencies exists only in 8.3 core, so no reason to compare version

andypost’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new920 bytes
new7.33 KB

trying to fix test

legolasbo’s picture

Status: Needs review » Needs work

Tests need fixing

andypost’s picture

Status: Needs work » Needs review
StatusFileSize
new7.32 KB

Re-roll

andypost’s picture

trying to fix tests

- removed IntrospectableContainerInterface as SF 3.x has no such class (core 8.4 compatibility)
- replace deprecated Field views plugin with EntityField

Status: Needs review » Needs work

The last submitted patch, 14: 2868179-layout_plugin_views-d83-14.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

andypost’s picture

Status: Needs work » Needs review
StatusFileSize
new636 bytes
new8.84 KB

Fix broken tests, probably 8.x-2.x better to use for new module's version

andypost’s picture

StatusFileSize
new597 bytes
new8.85 KB

Clean-up coding standards regression

andypost’s picture

StatusFileSize
new402 bytes
new8.85 KB

And one more minor fix

andypost’s picture

Title: The module should be based on Layout Discovery » The module should be based on Layout Discovery for 2.x branch
TD44’s picture

Commit please!

andypost’s picture

This still needs review before commiting, and probably new branch

TD44’s picture

This module is a MUST HAVE! This functionnality was include with Views on Drupal 7.
Does the update to the new branch will be easily to apply? Or does it break websites :/ ?
Thanks

Syntapse’s picture

is this confirmed working yet? can it be committed?

andypost’s picture

I'm using it but it needs maintainer to start new branch, I'd like file issue to ask co-maintainership

legolasbo’s picture

I currently don't have time for a proper functional review, but the patch itself looks good and I'd be happy to open a new branch and commit this if someone can RTBC this.

tim.plunkett’s picture

Reviewing at @andypost's request. 99% of it looks great!

  1. +++ b/layout_plugin_views.info.yml
    @@ -1,7 +1,7 @@
    -description: 'Allows users to dispay Views fields in the regions of pluggable layouts provided trough the layout plugin module.'
    +description: 'Allows users to display Views fields in the regions of pluggable layouts provided trough the layout plugin module.'
    

    This changes unrelated typos, but leaves the incorrect part: no longer the layout plugin module, should be the Layout Discovery module

  2. +++ b/src/RegionMap.php
    @@ -57,7 +57,7 @@ class RegionMap {
    -    return in_array($region_name, $this->getRegionNamesForSelectedLayout());
    +    return array_key_exists($region_name, $this->getRegionNamesForSelectedLayout());
    
    @@ -66,8 +66,9 @@ class RegionMap {
    -    $available_regions = array_keys($definition['region_names']);
    +    $available_regions = $definition->getRegionLabels();
    

    If the second part changed to using ->getRegionNames() instead, the first part wouldn't have to change.

  3. +++ b/tests/src/Unit/FieldsTest.php
    @@ -3,23 +3,25 @@
    +use Drupal\Tests\UnitTestCase;
    ...
    -use Symfony\Component\DependencyInjection\IntrospectableContainerInterface;
    +use Symfony\Component\DependencyInjection\ContainerInterface;
    ...
    -class FieldsTest extends \PHPUnit_Framework_TestCase {
    +class FieldsTest extends UnitTestCase {
    
    @@ -28,7 +30,7 @@ class FieldsTest extends \PHPUnit_Framework_TestCase {
    -    $this->container = $this->getMockForAbstractClass(IntrospectableContainerInterface::class);
    +    $this->container = $this->getMockForAbstractClass(ContainerInterface::class);
    
    @@ -392,7 +394,7 @@ class FieldsTest extends \PHPUnit_Framework_TestCase {
    -    $field = $this->getMockBuilder(Field::class)
    +    $field = $this->getMockBuilder(EntityField::class)
    

    Out of scope

  4. +++ b/tests/src/Unit/FieldsTest.php
    @@ -3,23 +3,25 @@
    -use Drupal\views\Plugin\views\field\Field;
    +use Drupal\views\Plugin\views\field\EntityField;
    

    Not sure about this

finnsky’s picture

I did test of patch. On my side works ok https://i.gyazo.com/242217b83c0113befe5c5d2fdd4cc46d.png

andypost’s picture

StatusFileSize
new2.49 KB
new8.32 KB

@tim.plunkett Thanx for review, new patch fixes #26

1) also changed "provided trough/by"
2) also removed intermediate variable
3) reverted to PHPUnit_Framework_TestCase - it works with 8.6 core as well
4) this class deprecated in core since 8.3.x so IMO in scope

andypost’s picture

StatusFileSize
new1.29 KB
new8.31 KB

No reason to call method in loop as it was a variable

Mixologic’s picture

PHPUnit_Framework_TestCase is not supported on phpunit 6, which is what core uses for testing for php7.0 and up. Im not sure why the test isnt picking up on the fact that there is an alias for that class in core/tests/bootstrap.php, which is what makes most of the other ones work. Perhaps change that to '\PHPUnit\Framework\TestCase'

Not completely sure what the proper technique is for ensuring that the tests work on both phpunit 4.8 (for 5.5/5.6) and on phpunit 6 (for 7 and up), but thats probably where the issue lies.

andypost’s picture

Let's see if replace will help, otherwise will need to revert to UnitTestCase

andypost’s picture

demonde’s picture

To me it works unless you donnot use the more complex display suite layouts. They are not compatible.

If I choose another layout in the row options the layout options are not dynamically reloaded. Therefore I have to apply the panel layout and open it once more to see the options. This is not very intuitive.

andypost’s picture

Yep, this is how it works now but surely needs rewamp UI in separate issue when this one lands

demonde’s picture

Would be nice to open a 2.x branch.

legolasbo’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev

I've finally found some time to catch up on maintenance of my modules so I've opened the 8.x-2.x branch for this. I'm willing to put some effort into reviewing this to make it land in the next couple of weeks.

  • legolasbo committed d1ea019 on 8.x-2.x authored by andypost
    Issue #2868179 by andypost, samerali, legolasbo, demonde, finnsky, tim....
legolasbo’s picture

Status: Needs review » Fixed

Committed and pushed to 8.x-2.x. Thanks for your work on this everyone!

andypost’s picture

Great! Please update project page about difference between 2 and 1

legolasbo’s picture

Done!

Status: Fixed » Closed (fixed)

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