Problem/Motivation

The drupal.dialog.off_canvas library has been altered for Drupal 10, but the library overrides in stable 9 have not been changed to match this.

Here is the definition for drupal.dialog.off_canvas

drupal.dialog.off_canvas:
  version: VERSION
  js:
    misc/dialog/off-canvas/js/off-canvas.js: {}
  css:
    base:
      misc/dialog/off-canvas/css/reset.css: {}
      misc/dialog/off-canvas/css/base.css: {}
      misc/dialog/off-canvas/css/utility.css: {}
    component:
      misc/dialog/off-canvas/css/button.css: {}
      misc/dialog/off-canvas/css/drupal.css: {}
      misc/dialog/off-canvas/css/form.css: {}
      misc/dialog/off-canvas/css/table.css: {}
      misc/dialog/off-canvas/css/details.css: {}
      misc/dialog/off-canvas/css/messages.css: {}
      misc/dialog/off-canvas/css/tabledrag.css: {}
      misc/dialog/off-canvas/css/throbber.css: {}
      misc/dialog/off-canvas/css/dropbutton.css: {}
      misc/dialog/off-canvas/css/titlebar.css: {}
      misc/dialog/off-canvas/css/wrapper.css: {}
  dependencies:
    - core/jquery
    - core/once
    - core/drupal
    - core/drupal.ajax
    - core/drupal.announce
    - core/drupal.dialog
    - core/drupal.dialog.ajax
    - core/drupal.touchevents-test

and here is the library overrides for it.

  core/drupal.dialog.off_canvas:
    css:
      base:
        misc/dialog/off-canvas.reset.css: css/core/dialog/off-canvas.reset.css
        misc/dialog/off-canvas.base.css: css/core/dialog/off-canvas.base.css
        misc/dialog/off-canvas.css: css/core/dialog/off-canvas.css
        misc/dialog/off-canvas.theme.css: css/core/dialog/off-canvas.theme.css
      component:
        misc/dialog/off-canvas.motion.css: css/core/dialog/off-canvas.motion.css
        misc/dialog/off-canvas.button.css: css/core/dialog/off-canvas.button.css
        misc/dialog/off-canvas.form.css: css/core/dialog/off-canvas.form.css
        misc/dialog/off-canvas.table.css: css/core/dialog/off-canvas.table.css
        misc/dialog/off-canvas.details.css: css/core/dialog/off-canvas.details.css
        misc/dialog/off-canvas.tabledrag.css: css/core/dialog/off-canvas.tabledrag.css
        misc/dialog/off-canvas.dropbutton.css: css/core/dialog/off-canvas.dropbutton.css
        misc/dialog/off-canvas.layout.css: css/core/dialog/off-canvas.layout.css

if you have a theme based upon stable, this is causing issues with layout build, and modules like lb_claro.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3393441-2.patch2.55 KBgauravvvv

Issue fork drupal-3393441

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

gordon created an issue. See original summary.

gauravvvv’s picture

Status: Active » Needs review
StatusFileSize
new2.55 KB

I have updated the library overrides. Attached patch for same. please review

Status: Needs review » Needs work

The last submitted patch, 2: 3393441-2.patch, failed testing. View results

davidmv97’s picture

I have tested the attached patch from Gauravvvvv, and it worked for me

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Mithun S made their first commit to this issue’s fork.

mithun s’s picture

Status: Needs work » Needs review

Add a MR for the above issue from the patch #2 as the MR's can be tracked better compared to legacy patch methods.
Thanks!

smustgrave’s picture

Status: Needs review » Needs work

Appears to have a test failure.

markconroy’s picture

Status: Needs work » Needs review

Setting to Needs review again, I just want to check that we don't have a red herring test failure.

===
Thanks to Code Enigma for sponsoring my time to work on this.

markconroy’s picture

I think I've come back out of the rabbit hole and tracked down the correct issue here. It's not that stable9 is trying to reference the wrong files, stable9 does not have any CSS files any more for off_canvas, they were all removed by c2af57548.

So when we try to run the tests, specifically Stable9LibraryOverrideTest, it's looking for CSS files in stable9/css/core/dialog... which are no longer there.

Let's see if removing that section of the stable9.info.yml file and the corresponding library from $librariesToSkip fixes this issue.

===
Thanks to Code Enigma for sponsoring my time to work on this.

smustgrave’s picture

Status: Needs review » Needs work

Nice research!

Still seems Stable9LibraryOverrideTest is failing, with you though thought removing 'core/drupal.dialog.off_canvas', from the skipped would be the fix.

markconroy’s picture

Hi @smustgrave,

Looks like we need to keep the line to override the off_canvas library in the $librariesToOverride array.

Tests are passing now.

---
Thanks to Code Enigma for sponsoring my time to work on this.

markconroy’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Removal looks good to me.

  • catch committed c92b0230 on 10.3.x
    Issue #3393441 by markconroy, Gauravvvv, smustgrave, gordon: Stable 9 is...

  • catch committed d0333db8 on 10.4.x
    Issue #3393441 by markconroy, Gauravvvv, smustgrave, gordon: Stable 9 is...

  • catch committed 0d207c38 on 11.0.x
    Issue #3393441 by markconroy, Gauravvvv, smustgrave, gordon: Stable 9 is...

  • catch committed 8300a7a2 on 11.x
    Issue #3393441 by markconroy, Gauravvvv, smustgrave, gordon: Stable 9 is...
catch’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked back through to 10.3.x, thanks!

Status: Fixed » Closed (fixed)

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