Needs work
Project:
Drupal core
Version:
main
Component:
javascript
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 May 2023 at 18:20 UTC
Updated:
29 May 2024 at 12:43 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
bwaindwain commentedComment #3
bwaindwain commentedadded a gif for fun
Comment #4
bwaindwain commentedComment #5
bwaindwain commentedComment #6
bwaindwain commentedComment #7
bwaindwain commentedComment #8
gauravvvv commentedI have attached patch for same. please review
Comment #10
bwaindwain commentedTested patch #8 in Drupal 10.1.0 and it works great. Thanks @Gauravvvv
I don't know why the tests failed
Comment #11
guido_sCouldn't apply the patch on Drupal 10.1.6.
But it would be good to have this working.
The issue doesn't only appear when resizing the browser, but also when resizing the off-canvas itself.
Comment #12
pyrello commented@bwaindwain I think the whole reason the original change was made was because of random test failures, so I think it makes sense that the test fails again with the patch reverting that change: https://www.drupal.org/project/drupal/issues/3350972.
Looking through that original issue, it seems like either state causes problems. In all likelihood this means that the JS needs to be revamped to fix this in a way that won't cause periodic failures (like in the test) or the behavior described in this issue.
Comment #13
pyrello commentedI opened a separate issue to address the broader issues here in a way that won't just reintroduce a random test failures: https://www.drupal.org/project/drupal/issues/3411496
Comment #15
_shyGauravvvv, thanks for the patch, it works well with Drupal 10.2.1.
I did some testing and found that if add some more timeout, then resize looks slightly.
Updated patch, increased timeout.
Comment #16
_shyUpdated the last patch to make it smoother during resizing and fixed width changes during resizing.
Comment #17
bnjmnmWhen resizing quickly, the solution in #16 results in an unwanted width increase of the off canvas dialog.
#15 seems to work but it does so at the expense of removing debounce functionality which had been working fine until the fix-the-tests changes in #3350972: [random test failure] Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderUiTest::testReloadWithNoSections(). It is probably worth exploring options that maintain debounce and allow tests to work. It's possible the ideal solution is with changes that only impact test runs in a test-only module, allowing the debounce calls to be switched back to the way they were when they worked reliably.
Comment #20
utkarsh_33 commentedI reverted the change made in #3350972: [random test failure] Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderUiTest::testReloadWithNoSections() so that we are back to the original use of debounce functionality as discussed in #17 and the test are also passing.
Comment #21
bnjmnmBy just reverting the change, it will likely reintroduce the intermittent failure. You can determine if this is happening by customizing drupalci.yml to run the test multiple times while skipping other tests, such as how it was done in issue #3350972. See this patch for how the test in question was run repeatedly to check for the intermittent failure.