France πŸ‡«πŸ‡·
Account created on 18 November 2012, over 11 years ago
#

Merge Requests

More

Recent comments

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Hi,

Postponing until core issue is resolved and the tool is integrated into Drupal Gitlab CI template (we can do an issue to push it forward once core will adopt it)

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Hi,

Adding a reference to core issue: πŸ“Œ Adopt friendsoftwig/twigcs for Twig coding standards Needs review

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Updated TODO:

- one new review question to answer
- update CSS to not rely on Gin @maboy

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Copy pasting works from @maboy in ✨ UX: Add other widgets than select Active , MR 47.

/**
   * Get list of theme directories sorted by inheritance.
   *
   * @return array
   *   The sorted directories.
   */
  protected function orderTheme(): array {
    // Order theme directories to allow overriding in subtheme.
    $themes = $this->themeHandler->listInfo();
    $ordered_theme_directories = [];
    $base_theme = [];
    $theme_directories = $this->themeHandler->getThemeDirectories();

    // Create a list which includes the current theme and all its base themes.
    foreach ($themes as $key => $theme) {
      // Base theme for current theme.
      // We need to place current theme AFTER the base theme in array.
      if (isset($theme->base_themes)) {
        // Get the last base_theme.
        // To get the key after we want to insert the current theme.
        $after_key = \array_key_last($theme->base_themes);
        $index = \array_search($after_key, \array_keys($ordered_theme_directories), TRUE);

        // The current theme is a base theme.
        $before_key = NULL;
        if (\array_key_exists($key, $base_theme)) {
          $before_key = $base_theme[$key];
        }

        // The base theme is not existing yet in the array.
        if ($index == 0) {
          // Current theme is also a base theme.
          if ($before_key) {
            // Insert the current theme before its children in the array.
            $index_before = \array_search($before_key, \array_keys($ordered_theme_directories), TRUE);
            $ordered_theme_directories = \array_slice($ordered_theme_directories, 0, $index_before - 1) + [$key => $theme_directories[$key]] + $ordered_theme_directories;
          }
          else {
            // Insert the current theme at the end of the array.
            $ordered_theme_directories[$key] = $theme_directories[$key];
          }
          $base_theme = [$after_key => [$key]];
        }
        // The base theme exist in the array.
        else {
          // Insert the current theme after the base_theme.
          $ordered_theme_directories = \array_slice($ordered_theme_directories, 0, $index + 1) + [$key => $theme_directories[$key]] + $ordered_theme_directories;
        }
      }
      // No base theme,
      // Can be added first.
      else {
        $ordered_theme_directories = [$key => $theme_directories[$key]] + $ordered_theme_directories;
      }
    }

    return $ordered_theme_directories;
  }

I will try to use that for a generic fix.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Let's wait for core to provide the Tooltip feature.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

After a night of sleep I remember why I put this comment.

In a project using a UI Suite theme and having a sub theme, you will use patterns with styles in Layout Builder or anywhere else.

The idea was to enrich the patterns preview in libraries with the styles applied on the project.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Grimreaper β†’ created an issue.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

After discussion with @maboy and @pdureau,

TODO:
- comment 18, @Grimreaper
- Fix the @todo and question marks.@Grimreaper
- take previewed_as hidden into account @Grimreaper
- update CSS to not rely on Gin @maboy

If Gin specific stuff will be needed when using Gin LB, let's see to make an issue and MR on Gin LB.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Done on Bootstrap version.

Needs to be done on DSFR.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Finally no need to create a new component.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Need to test if instead of a field list to control the media position, we should use different view modes and handle some margin in the view modes.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Grimreaper β†’ created an issue.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Hi,

I have retested on a fresh Drupal install (10.3, standard profile).

I have applied patch from MR then enabled the module and I confirm that I was able to enable scheduling features on the basic block type without needing to have the Content Moderation module.

@r0nn1ef after checkout the fork, did you have the Scheduler module already enabled? If yes, have you executed the update?

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

I guess you wanted to RTBC :)

New patch.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Thanks for the quick feedback.

I have updated the MR.

In the original title, there is no space after the end of the opening span tag, so resulting in:

Add block in @region <span class="visually-hidden">region, @section</span>

And not:

Add block in @region <span class="visually-hidden"> region, @section</span>
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Attaching patch for Composer usage.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Hi,

If it may help, it works without change with https://www.drupal.org/project/system_stream_wrapper β†’ .

So the module could recommend it and let site builders use System Stream Wrapper or not.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Introduced a lot of tests and converted to PHP attribute discovery.

TODO:
- comment 18
- discuss about the @todo and question marks.
- update CSS to not rely on Gin

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

inverted the screenshots.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Fix typo.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Please credit vmaucorps for the proposal ;)

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

I pushed some refactoring.

I did not had the time to fix coding standards and write tests yet, as there are still some stuff remaining.

Main part will be to update the CSS to work outside of Gin / Gin LB.

@maboy do you want to retake the issue? do you want to see it in pair programming?

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Taking care of some review comments during rebase.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Reviewing.

Putting into needs work as of current review comments and also needs automated tests.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Uploading patch for composer usage.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Hi,

I was blocked when trying to implement tests on a custom project which is using Gin.

I copied the submitForm method from the MR in the tests of my project and now it is working.

Would it be possible to make it a trait please?

Thanks!

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Hi,

Here is a patch file from the MR, to avoid adding a MR patch in Composer.

I confirm this fixes the problem. Thanks everyone!

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

https://git.drupalcode.org/issue/drupal-3457863/-/jobs/1984798#L4263

---- Drupal\KernelTests\Core\Layout\LayoutPluginManagerTest ----
Status    Group      Filename          Line Function                            
--------------------------------------------------------------------------------
Fail      Other      phpunit-361.xml      0 Drupal\KernelTests\Core\Layout\Layo
    PHPUnit Test failed to complete; Error: PHPUnit 10.5.20 by Sebastian
    Bergmann and contributors.
    
    Runtime:       PHP 8.3.8
    Configuration: /builds/issue/drupal-3457863/core/phpunit.xml.dist
    
    F                                                                   1 / 1
    (100%)
    
    Time: 00:01.315, Memory: 8.00 MB
    
    There was 1 failure:
    
    1)
    Drupal\KernelTests\Core\Layout\LayoutPluginManagerTest::testPluginOverride
    Failed asserting that two strings are identical.
    --- Expected
    +++ Actual
    @@ @@
    -'Child'
    +'Parent'
    
    /builds/issue/drupal-3457863/core/tests/Drupal/KernelTests/Core/Layout/LayoutPluginManagerTest.php:40
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Provided a MR with a failing test to demonstrate the problem.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Hi,

It is a common problem of themes declared plugins.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

The used is not taking extra classes into account.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Hi,

Thanks for your contribution.

Please provide a MR instead of a patch.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

PHPCS and Cspell fixed.

Remaining is PHPStan and fix PHPUnit.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Grimreaper β†’ created an issue.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

So I showed the bug to @klausi, and it is definitely a real bug.

I will provide a PR with the fix on Github and we need to a failing test.

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·
Production build 0.69.0 2024