Steps to reproduce:
1) Set the admin theme to Stark
2) Set toolbar tray in vertical orientation.
3) Edit any view eg: www.example.org/admin/structure/views/view/content.
4) Click on any link on view page which will open in modal popup. Eg: click on settings under format.

Views modal popup in vertical toolbar orientation
views-modal-horizontal-toolbar-orientation.png

CommentFileSizeAuthor
#130 interdiff_126-130.txt1.24 KBpradipmodh13
#130 2822778-130.patch1.26 KBpradipmodh13
#129 interdiff_126-129.txt1.21 KBpradipmodh13
#129 2822778-129.patch1.23 KBpradipmodh13
#128 interdiff_127-128.txt1.11 KBpradipmodh13
#128 2822778-128.patch596 bytespradipmodh13
#127 interdiff_126-127.txt1.21 KBpradipmodh13
#127 2822778-127.patch1.23 KBpradipmodh13
#126 2822778-126.patch1.23 KBpradipmodh13
#126 2822778-claro.png320.31 KBpradipmodh13
#126 2822778-seven.png293.88 KBpradipmodh13
#126 2822778-bartik.png302.44 KBpradipmodh13
#126 2822778-olivero.png244.52 KBpradipmodh13
#126 2822778-stark-default.png271.82 KBpradipmodh13
#125 stark-ui.png279.14 KBshobhit_juyal
#125 stark--css.png582.96 KBshobhit_juyal
#123 issue--2822778--123.png269.18 KBshobhit_juyal
#122 Screen Shot 2023-04-10 at 2.28.05 PM.png306.93 KBbnjmnm
#120 Screenshot 2022-07-23 143927.png85.05 KBneograph734
#97 interdiff.txt1.09 KBlauriii
#92 2822778-92.patch4.4 KBwengerk
#92 2822778-92-test-only.patch2.94 KBwengerk
#92 interdiff-2822778-83-92.txt880 byteswengerk
#2 views-modal-vertical-toolbar-orientation.png76.66 KBshashikant_chauhan
#2 views-modal-horizontal-toolbar-orientation.png87.76 KBshashikant_chauhan
#5 views-modal-horizontal-toolbar-orientation.png179.67 KBgoz
#8 views_ui_dialog_formatting-2822778-8.patch1.28 KBvivekguptakota
#15 modal_popups_in_views-2822778-15.patch794 bytesbighappyface
#17 stable-has-the-toolbar-styles.png531.49 KBbighappyface
#21 modal_popups_in_views-2822778-21.patch1.66 KBbighappyface
#24 modal_popups_in_views-2822778-24.patch1.66 KBbighappyface
#28 afterverticalorientation.png171.12 KBmeenakshig
#28 afterapplypatchinbartiktheme.png136.59 KBmeenakshig
#28 afterapplypatchinstarktheme.png142.07 KBmeenakshig
#30 inbartik.png175.2 KBmeenakshig
#30 instark.png173.55 KBmeenakshig
#34 fix-in-stark-2822778-34.png574.81 KBbighappyface
#34 fix-in-bartik-2822778-34.png475 KBbighappyface
#34 fix-in-seven-2822778-34.png466.68 KBbighappyface
#34 modal_popups_in_views-2822778-34.patch2.05 KBbighappyface
#41 2822778-41.patch3.72 KBlendude
#41 interdiff-2822778-34-41.txt1.48 KBlendude
#41 toolbar-dialog.jpg191.65 KBlendude
#44 modal_popups_in_views-2822778-44.patch4.46 KBbighappyface
#47 2822778-47.patch4.37 KBwengerk
#47 interdiff-2822778-44-47.txt2.29 KBwengerk
#49 Content_(Content)_8.6_-_2018-06-02_11.47.36.png95.62 KBifrik
#54 2822778-54.patch4 KBwengerk
#54 interdiff-2822778-47-54.txt4.25 KBwengerk
#56 Awards.png177.66 KBjoelpittet
#61 2822778-61.patch4.25 KBjoelpittet
#61 interdiff.txt951 bytesjoelpittet
#64 interdiff.txt822 bytesjoelpittet
#64 2822778-64.patch4.16 KBjoelpittet
#66 2822778-66.patch4.15 KBwengerk
#66 interdiff-2822778-61-66.txt1005 byteswengerk
#67 2822778-67.patch4.16 KBwengerk
#67 interdiff-2822778-66-67.txt1013 byteswengerk
#81 2822778-test-only.patch2.92 KBlauriii
#83 2822778-83.patch4.45 KBwengerk
#83 2822778-83-test-only.patch3 KBwengerk
#83 interdiff-2822778-67-83.txt1.79 KBwengerk

Issue fork drupal-2822778

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

shashikant_chauhan created an issue. See original summary.

shashikant_chauhan’s picture

shashikant_chauhan’s picture

Issue summary: View changes

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

goz’s picture

Title: Modal popups in views is not showing properly when toolbar tray is in vertical orientation. » Modal popups in views is not showing properly when toolbar tray is upon modal
StatusFileSize
new179.67 KB

Issue also occurs with horizontal toolbar. Depends of modal and browser size.

goz’s picture

There are two options:

  1. Modal should set top or left position value depending of toolbar
  2. Modal should be on top of everything (same for ui-widget-overlay)
  1. This can be hard to deal with, depending of font size, browser dimensions etc.
  2. We have to be careful for all other z-index and choose the right index

I think we should take option 2

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

vivekguptakota’s picture

Assigned: Unassigned » vivekguptakota
StatusFileSize
new1.28 KB

Hello

Please find this patch for resolving this issue.
Let me know if there something else or wrong.

vivekguptakota’s picture

Assigned: vivekguptakota » Unassigned
Status: Active » Needs review
traviscarden’s picture

Status: Needs review » Needs work

That doesn't do the trick in my testing, @vivekguptakota. Also, we can't directly edit files under /core/assets/vendor/, can we?

vivekguptakota’s picture

Hello @TravisCarden,

I agree with you. But this is the only place I found to add my css. Because other css files are related to theme. All other css are calling from admin theme. So let me know if you know any css file where I can add this css?

manuel garcia’s picture

Thank you for the patch @vivekguptakota

+++ b/core/assets/vendor/jquery.ui/themes/base/theme.css
@@ -441,3 +441,6 @@ a.ui-button:active,
+.left-auto{
+	left: auto !important;
+}

Using !important is not allowed on Drupal core, so a new strategy to this will be needed.

You can use stylelint to check if your css will pass https://www.drupal.org/node/2868114

bighappyface’s picture

@GoZ I agree with the z-index approach. Below is a quick example image of what it would look like.

Only local images are allowed.

bighappyface’s picture

Status: Needs work » Needs review
StatusFileSize
new794 bytes

This patch introduces a new CSS file into the Seven theme to override z-index settings for the toolbar in the Stable theme.

The change in the patch overrides the CSS properties via the Seven theme because there are no changes to Stable allowed unless under an extenuating circumstance. I am not a fan of fixing CSS with more CSS, but I respect the importance of the Stable theme, and there is plenty of precedent in overriding styles within Seven itself (see the libraries-override section of seven.info.yml).

Important: the CSS overrides to the z-index properties bring the toolbar much lower in the stacking order. Because the toolbar tray is a nav element within the toolbar nav we are in a tough situation as the stacking order of the tray is relative to the parent element, and not other items on the page, such as the ui-widget-overlay element that is appended to the body dynamically.

As a result, the dialogs will display over the toolbar, regardless of vertical or horizontal orientation.

It is my opinion that this is a desirable behavior. Like a javascript confirm dialog, full focus is given to the dialog and the user can not interact with the rest of the page until they interact with the dialog. I do not know if the toolbar's current behavior, displaying the over ui-widget-overlay, was intentional, but I don't think it was. I think it was a luck of the draw on picking z-index property values.

See the "problem" z-index property values at the following locations:

http://cgit.drupalcode.org/drupal/tree/core/themes/stable/css/toolbar/to...
http://cgit.drupalcode.org/drupal/tree/core/themes/stable/css/toolbar/to...

neograph734’s picture

@bighappyface, shouldn't this be addressed in the toolbar module instead?

The z-indexes are defined in core/modules/toolbar/toolbar.modules.css (lines 56-60).

By only solving it in the seven theme, the patch does not provide a solution for people using different admin themes.

bighappyface’s picture

StatusFileSize
new531.49 KB

@Neograph734 thanks for taking a look.

Unfortunately, the CSS in the module is not in use. The copied versions in the Stable theme are the active styles.

I completely agree that this approach does not solve for other admin theme users; however, popular themes such as Adminimal use Seven as the base theme, so it will fix the issue for *some* alternative admin theme users.

We spoke with others here at the mentored code sprint in Vienna about the nature of having the CSS files copied into Stable, and what would be involved making changes there. Simply put, Stable is more or less off limits, and it completely at the discretion of the core committers.

Please see the following image showing how the styles come from Stable.

neograph734’s picture

Fair enough. Enjoy Vienna :)

WidgetsBurritos’s picture

Status: Needs review » Reviewed & tested by the community

+1 RTBC

tim.plunkett’s picture

  1. index 0000000..3234299
    --- /dev/null
    
    --- /dev/null
    +++ b/core/themes/seven/css/components/toolbar.css
    
    +++ b/core/themes/seven/css/components/toolbar.css
    @@ -0,0 +1,7 @@
    
    @@ -0,0 +1,7 @@
    +.toolbar .toolbar-tray {
    

    The Bartik toolbar.css file has this comment, seems to be a standard thing:

    /**
     * @file
     * Toolbar module overrides for Bartik.
     */
    
  2. +++ b/core/themes/seven/css/components/toolbar.css
    @@ -0,0 +1,7 @@
    +  z-index: 91;
    ...
    +  z-index: 92;
    

    Could these be a bit further apart? 95 and 100? or something like that. Just in case someone wants to be in between :)

Additionally, I think that both Seven *and* the toolbar CSS should be updated. Yes it is duplicated, but it protects those that bypass the Stable theme.

bighappyface’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.66 KB

@tim.plunkett thanks for the guidance and feedback today.

Attached is another patch containing the requested updates.

To be clear on my process, I made the changes for the toolbar module CSS to the Stable theme's copy to test them out, but only include the changes to the module's copy in the patch. Both the new CSS in Seven and the changes to Toolbar's CSS behave the same, according to my testing.

neograph734’s picture

Status: Needs review » Reviewed & tested by the community

I have tested a few different modals (CKEditor image dialog, Views settings dialogs and Context dialogs). These all behaved as expected.

neograph734’s picture

Status: Reviewed & tested by the community » Needs work

Oh wait, one nitpick... Now the Seven CSS file says it is for Bartik.

+++ b/core/themes/seven/css/components/toolbar.css
@@ -0,0 +1,12 @@
+/**
+ * @file
+ * Toolbar module overrides for Bartik.
+ */
bighappyface’s picture

StatusFileSize
new1.66 KB

@Neograph734 great spot! Please see the updated patch and comment, which I have generalized to counter copy/pasta-isms like that.

bighappyface’s picture

Status: Needs work » Needs review
neograph734’s picture

Status: Needs review » Reviewed & tested by the community

Yes, better now :)

manuel garcia’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs screenshots

I like this approach, thanks for working on this!

Since we are making changes to core/modules/toolbar/css/toolbar.module.css, we should check that we are not breaking Stark nor Bartik. Screenshots will help with the usability review, so adding the tag =)

meenakshig’s picture

Status: Needs work » Needs review
StatusFileSize
new171.12 KB
new136.59 KB
new142.07 KB

Patch is all good it does not break in Stark and bartik theme . Here are the screenshots

manuel garcia’s picture

Status: Needs review » Needs work

Thank you @Meenakshi Gupta for the screenshots, they prove that Seven works. If we can now prove that also Bartik and Stark are ok, then I think we can RTBC this patch, so what we need is:

  • setting Bartik as the admin theme and testing
  • setting Stark as the admin theme and testing

You can do this by clicking on the Appearance link on the menu on top, from here, scroll to the bottom of the page to the Administration Theme area. You will see a dropdown list entitled Administration Theme.

meenakshig’s picture

Status: Needs work » Needs review
StatusFileSize
new175.2 KB
new173.55 KB

Thank you ! @Manuel Garcia for telling it works well in stark when i set Stark as admin theme and not in Bartik . Here are the screenshots

manuel garcia’s picture

Status: Needs review » Needs work

Brilliant thanks! This is very useful.

Setting to needs work, we need to get #24 working on Bartik.

meenakshig’s picture

i think increasing z-index for bartik theme would work

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

bighappyface’s picture

Status: Needs work » Needs review
Issue tags: +SprintWeekend2018
StatusFileSize
new574.81 KB
new475 KB
new466.68 KB
new2.05 KB

@Manuel Garcia @Meenakshi.g I have added the z-index adjustments for bartik. Please see the attached screenshots and updated patch.

WidgetsBurritos’s picture

Status: Needs review » Reviewed & tested by the community

+1 The patch in #34 looks good to me.

WidgetsBurritos’s picture

Issue tags: -Needs screenshots
andrewmacpherson’s picture

Priority: Normal » Major
Issue tags: +Accessibility

Bumping this to major, going by the screenshots in the issue summary.

Some form inputs and labels are visually obscured. Checkboxes, radios, and short labels are particularly impacted.

I'm confident it's a failure to satisfy WCAG 2.0 Success Criterion 2.4.7 Focus Visible. Checkbox/radio controls will be focusable, and operable, but not visible. Their state cannot be understood visually.

It is likely to count as a failure of some other WCAG 2.0 success criteria too, such as "Info and Relationships" and "Labels or Instructions".

I'm late to the discussion here, glad to see it's already at RTBC. Good work everyone!

andrewmacpherson’s picture

Version: 8.6.x-dev » 8.5.x-dev

Should still be eligible for 8.5.x.
- I will cue some tests for that branch.

manuel garcia’s picture

RTBC +1 - thanks @bighappyface
I agree with @andrewmacpherson, this is pretty bad for accessibility, and it'd be great to ship 8.5.0 with this fixed.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 34: modal_popups_in_views-2822778-34.patch, failed testing. View results

lendude’s picture

Status: Needs work » Needs review
StatusFileSize
new3.72 KB
new1.48 KB
new191.65 KB

So I thought it might be nice to have a test for this. As far as I can tell, this isn't fixed for all situations, because the tests fails (locally anyway). Also, see the screenshot taken during the test where you can see this isn't fixed.

So did we miss a spot somewhere? Cause it works great when manually testing this.

Ideally this test wouldn't live in Views since it should be a toolbar test.

Status: Needs review » Needs work

The last submitted patch, 41: 2822778-41.patch, failed testing. View results

bighappyface’s picture

Version: 8.5.x-dev » 8.6.x-dev
Component: views.module » toolbar.module
bighappyface’s picture

Status: Needs work » Needs review
StatusFileSize
new4.46 KB

Reroll for 8.6.x

The last submitted patch, 41: 2822778-41.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 44: modal_popups_in_views-2822778-44.patch, failed testing. View results

wengerk’s picture

StatusFileSize
new4.37 KB
new2.29 KB

It seems the profile used by JavascriptTestBase is 'classy' but the bugs appear with the bartik or seven themes.

Here is a summary of my changes, checkout the interdiff for more info.

  1. Realign public static $modules on multiple lines to be compliant with the 80 chars lengths;
  2. Move the integration of the dialog with the toolbar module test in his own method. With the new layout, the toggle button has to be clicked before using the Add Field button & so it should be a separate method to assert both horizontal & vertical toolbar;
  3. Use the seven theme for testing.
wengerk’s picture

Status: Needs work » Needs review
ifrik’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new95.62 KB

Thanks so much for picking this up. The patch works fine and the modal is completely visible even if the toolbar is used vertically.

bighappyface’s picture

+1 for #47

lauriii’s picture

Status: Reviewed & tested by the community » Needs review

Did you consider increasing dialog z-index instead of lowering the toolbar z-index? Increasing the z-index for the dialog would involve less changes and less risk since the dialog is pretty much always supposed to be rendered on top, whereas the toolbar might vary case by case.

wengerk’s picture

@lauriiii thanks for the review in #51.

I think they consider it but it wasn't possible cause jQueryUI apply an inline-style to the .ui-dialog with an automatic calculated z-index:101. It could be possible to add a important into the dialog.css component but it is by far more dangerous than lowering the toolbar z-index. Do you have another solution or approach to suggest ?

lauriii’s picture

We could override the inline-style in our dialog implementation with another inline style. We already do this for example in CKEditor.

wengerk’s picture

StatusFileSize
new4 KB
new4.25 KB

Thanks @lauriii.

I made a refactoring & remove the previous attempts to apply the suggested approach in #53.

I also improve the tests coverage by using a dataprovider of themes to asserts it works on more than only 'seven' theme. It now coverage for 'seven', 'bartik' & 'classy' themes.

Let's see tests it to check regression anywhere else.

joelpittet’s picture

Needed to clear cache but this is very nice, thank you!

joelpittet’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new177.66 KB

Oh yeah, RTBC


Status: Reviewed & tested by the community » Needs work

The last submitted patch, 54: 2822778-54.patch, failed testing. View results

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

manuel garcia’s picture

Status: Needs work » Needs review

I just ran the test locally using 8.7.x and the test passed... strange

joelpittet’s picture

I wonder if maybe the browser window it opens up is not wide enough to show "Vertical orientation" button?

Maybe we need to set it explicitly:
Example code in core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php:29

    // Set size for horizontal toolbar.
    $this->getSession()->resizeWindow(1200, 600);
    $this->assertNotEmpty($this->assertSession()->waitForElement('css', 'body.toolbar-horizontal'));
    $this->assertNotEmpty($this->assertSession()->waitForElementVisible('css', '.toolbar-tray'));
joelpittet’s picture

joelpittet’s picture

Status: Needs review » Needs work

The last submitted patch, 61: 2822778-61.patch, failed testing. View results

joelpittet’s picture

Status: Needs work » Needs review
StatusFileSize
new822 bytes
new4.16 KB

One fail down, so I was half right...

Removed the extra check that was failing. Tried to setup local testing but failed miserably... so testbot, you get to work.

Status: Needs review » Needs work

The last submitted patch, 64: 2822778-64.patch, failed testing. View results

wengerk’s picture

StatusFileSize
new4.15 KB
new1005 bytes

Just re-roll the patch #61 for 8.7.x & run the test localy via chromedriver (see Running functional Javascript tests with Webdriver).

All the tests on Drupal\Tests\views_ui\FunctionalJavascript\FilterOptionsTest pass. Let's try on testbot now.

Edit
It fail on testbot ... I think it's because testbot run chromedriver with parameters --headless --disable-gpu.

You should setup your tests as follow to asserts running test with the same env as testbot:

# phpunit.xml
<env name="MINK_DRIVER_ARGS_WEBDRIVER" value='["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless"]}}, "http://localhost:9515"]'/>
wengerk’s picture

StatusFileSize
new4.16 KB
new1013 bytes

It seems the issue was on $session->resizeWindow(1200, 600);.
It should be done before accessing a page via $this->drupalGet.

Let's try in now.

wengerk’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 67: 2822778-67.patch, failed testing. View results

wengerk’s picture

Seems to fail on another module :/

Drupal\Tests\content_translation\Functional\ContentTranslationWorkflowsTest

Random fail on ContentTranslationWorkflowsTest ? I restart tests to be sure.

Edit
The final test pass. Seems all clear.

wengerk’s picture

Status: Needs work » Needs review
wengerk’s picture

meenakshig’s picture

Status: Needs review » Needs work

Patch seems to fail

wengerk’s picture

I don't understand @Meenakshi.g the latest patch #67 pass.

Which patch are you talking about ? For me this is ready to review.

manuel garcia’s picture

Status: Needs work » Needs review

Setting to needs review since #67 is green.

wengerk’s picture

I can no longer RTBC this. Anyone else want to review / test / RTBC?
Thanks!

manuel garcia’s picture

Status: Needs review » Reviewed & tested by the community

This was last RTBCed by @joelpittet on #56, as the review by @lauriii (#51) was properly addressed.

The changes made after that were:

  • A reroll on #66 which is correct.
  • Fixing the test, which now looks correct to me.
lauriii’s picture

Status: Reviewed & tested by the community » Needs work

I tried to run the test locally but it is passing even without the bug fix.

wengerk’s picture

Status: Needs work » Needs review

@lauriii, thanks for your review.

Did you run the tests with or whitout "--disable-gpu","--headless" ? Because this is the main purpose of the change in #67. Testbot run with "--disable-gpu","--headless" but people often run localy tests whitout --disable-gpu","--headless which leads to working #66 localy but not on testbot.

Tell me if my answer is not clear, it not easy to explain it ^^.

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

I tested manually in #56 and the testbot agrees. Setting back to RTBC because I think #79 may be correct.

lauriii’s picture

StatusFileSize
new2.92 KB

Posting the test only patch to confirm that the assertions fail before the bug fix.

manuel garcia’s picture

Status: Reviewed & tested by the community » Needs work

Test only patch doesnt fail, which means we don’t have a valid test demonstrating the bug, back to needs work.

wengerk’s picture

StatusFileSize
new1.79 KB
new3 KB
new4.45 KB

Here a reroll.

The only way I found to assert the element is visible aka "on top of X" is to click on it.
The visible method of Selenium still return TRUE even when an element is behind another one.

So using the click we are able to detect this overlay. Selenium should trigger the following message when something is not clickable (in our example behind the Horizontal Toolbar):

is not clickable at point (X, Y). Other element would receive the click

Let's tests this on testbot.

wengerk’s picture

Status: Needs work » Needs review

The last submitted patch, 83: 2822778-83-test-only.patch, failed testing. View results

wengerk’s picture

lauriii’s picture

Status: Needs review » Needs work

Thanks for the test only patch and finding an approach that works!

+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php
@@ -73,4 +83,61 @@ public function testFilterOptionsAddFields() {
+    $page->waitFor(10, function () use ($page, $web_assert) {
+      // Assert the element is clickable and on top of toolbar.
+      $page->find('css', 'input[name="name[views.views_test_field_1]"]')->click();
...
 

Just a minor nitpick, how about using Drupal\FunctionalJavascriptTests\JSWebAssert::waitForElement() instead?

wengerk’s picture

Status: Needs work » Needs review

#87 for consistency.

On the same tests we already use at multiple times $page->waitFor(10, function () use ($page) {. Changing this behavior was - in my point of view - out-of-scoop of this issue.

What do you think ? If we change it here we should change it it the whole tests. Do you think we should we create a new link issue ?

lendude’s picture

@wengerk those existing waits in that test are testing negatives:

return !$page->findField('name[views.views_test_field_2]')->isVisible();

So in essence waitForElementNotVisible(), which we still don't have.

For positive checks, I would recommend the existing waitForX() methods

wengerk’s picture

Thanks for the explanation @lendude ! I will then work on it asap :D !

wengerk’s picture

Status: Needs review » Needs work
wengerk’s picture

Status: Needs work » Needs review
StatusFileSize
new880 bytes
new2.94 KB
new4.4 KB

Here the requested changes on #87

The last submitted patch, 92: 2822778-92-test-only.patch, failed testing. View results

wengerk’s picture

lendude’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/core/misc/dialog/dialog.position.js
--- a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php
+++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php

Still a shame that this depends on the Views UI module (I know, I did that), but *shrug*

Looks good to me, all feedback has been addressed

manuel garcia’s picture

Excellent work @wengerk!

lauriii’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new1.09 KB

Great work everyone!

Just had to run yarn prettier && yarn build:js on commit. I attached interdiff of the changes here.

Committed 3257ff1 and pushed to 8.7.x. Thanks!

  • lauriii committed 3257ff1 on 8.7.x
    Issue #2822778 by wengerk, bighappyface, joelpittet, Lendude, lauriii,...

Status: Fixed » Closed (fixed)

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

dww’s picture

Version: 8.7.x-dev » 8.6.x-dev
Status: Closed (fixed) » Reviewed & tested by the community
Issue tags: -Accessibility +accessibility

Can we please backport this to 8.6.x?

I ran into this via #2936535: Modal dialog errors in stark theme in preparation for diving into #2352949: Deprecate using Classy as the default theme for the 'testing' profile. Much to my surprise, the 8.7.x test-only version in there passed. ;) But it still fails in 8.6.x. Turns out this issue fixes that bug as a side effect. Basically, stark is uniquely vulnerable to this, since it has no CSS. But setting the zindex in js (as this patch does) solves that problem for us.

#92 applies cleanly to 8.6.x branch and core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php still passes locally.

Seems silly to only fix #2936535 in 8.6.x. Perhaps we can add the additional test coverage from there into both branches?

Thoughts?

Thanks,
-Derek

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 92: 2822778-92.patch, failed testing. View results

dww’s picture

Status: Needs work » Reviewed & tested by the community

Bot is confused. #92 for 8.6.x branch is all green. Back to RTBC for backport consideration.

@Lendude re: #95:

Still a shame that this depends on the Views UI module (I know, I did that), but *shrug*

The test-only from #2936535-13: Modal dialog errors in stark theme is a stand-alone test for a related bug. You might be interested in helping get that into core, too.

Cheers,
-Derek

lauriii’s picture

Version: 8.6.x-dev » 8.7.x-dev
Status: Reviewed & tested by the community » Fixed

This issue was purposefully not backported. The change is potentially disruptive since it changes z-index for dialog everywhere it's being utilized. Couldn't the other issue move forward even without tests passing in 8.6.x branch?

dww’s picture

Couldn't the other issue move forward even without tests passing in 8.6.x branch?

Not really. It's the identical fix. ;) Maybe I wasn't clear. The test-only in #2936535-13: Modal dialog errors in stark theme already passes in 8.7.x (because this issue did the same fix that one needs -- setting the z-index in our dialog-related JS). They only fail in 8.6.x because neither that fix nor this one have been (will ever be?) committed. If it's disruptive to backport such a change, then all modals will remain broken in stark (and stark-based) themes for 8.6.x unless they work around this themselves. There's not really much to "move forward" at #2936535 for the 8.7.x branch, except perhaps adding more explicit (and non-views_ui-based) tests for a different manifestation of basically the same problem.

Sorry for any confusion (I know I was confused while working on #2936535). Hope this comment makes the situation more clear.

Thanks,
-Derek

johnwebdev’s picture

Yeah, this fix breaks dialogs being stacked upon each other. How can I undo this behaviour?

Status: Fixed » Closed (fixed)

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

mgifford’s picture

Issue tags: -accessibility (duplicate tag) +Accessibility

Fixing the accessibility tag.

lauriii’s picture

Status: Closed (fixed) » Needs work

This issue has caused some regressions: #3037636: [regression] Dialog modals can no longer be stacked. Going to any direction to fix those could be disruptive, so, for now, it seems like reverting this change is the least disruptive option.

Talked with @catch and since this change seems to have caused more widespread issues than the original bug, he agree that we should revert this. I tested the known workarounds from the regression issue to ensure that reverting this issue doesn't cause more regressions to those modules.

Revert commits: 8f8ddab2 and 3925713f.

waverate’s picture

@lauriii. Re: revert at #108.

Can the removal of these commits be uploaded here as a patch for those of us not running 8.7.x-dev? Ideally, it would be against the current 8.7.1 as I hope this will get included in the next minor build.

markhalliwell’s picture

@waverate, just add .patch to the end of those URLs to use until a release is made.

waverate’s picture

How about that; learn something new everyday. Thank you Mark.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.9 was released on November 6 and is the final full bugfix release for the Drupal 8.7.x series. Drupal 8.7.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.8.0 on December 4, 2019. (Drupal 8.8.0-beta1 is available for testing.)

Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

osab’s picture

What do you think if we just made these popups movable and resizable?

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

I found a similar issue which I have closed it as a duplicate of this (touching the same code in dialog.position.es6.js). Adding credit.

I see that this also needs an Issue Summary update, adding tag. Although working on BugSmash, I am not tagging this as I have not done a full triage.

neograph734’s picture

StatusFileSize
new85.05 KB

Thanks for bringing this back up quietone. But I can no longer reproduce this. I have tested with Claro and Seven on Drupal 9.4.3 and for both cases the Views modal rendered nicely over the extended toolbar as expected.

Screenshot looks nothing like screen 2 from the summary.
Screenshot 23 Jul 2022

If somebody could doulbe check this, we might be able to close this as it is apparently fixed elsewhere?

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

bnjmnm’s picture

StatusFileSize
new306.93 KB

This looks to work in Claro just fine , but this is still an issue with default CSS (using the Stark theme). Seems like it would be safe to assume a themer would want the modal to appear in front of the tray, and addressing this could make creating custom admin themes a little easier.

shobhit_juyal’s picture

Issue summary: View changes
StatusFileSize
new269.18 KB

No issue found in Drupal v. 9.5.8-dev
issue test in claro

bnjmnm’s picture

Issue summary: View changes

Re #123 @shobhit_juyal Your "no issue found" is a screenshot of Claro. If you look at the comment just prior to yours, I already confirmed this is not a problem in Claro. We need no further confirmation of that, and saying "no issue found" when you didn't check for the diagnosed issue creates confusion.

The problem is specific to Stark AKA the default theme implementation of views. It will not happen with Claro.

shobhit_juyal’s picture

Issue summary: View changes
StatusFileSize
new582.96 KB
new279.14 KB

@bnjmnm, I apologize for any inconvenience caused.
In stark theme, if we can just add z-index says 1260 then it will also work. like this:
z-index: 1260;
stark z-index

and here its UI after that update.
stark UI

Hope, if this can help.

pradipmodh13’s picture

StatusFileSize
new271.82 KB
new244.52 KB
new302.44 KB
new293.88 KB
new320.31 KB
new1.23 KB

Hello @bnjmnm,
Yes, you are correct. The ui-dialog box will be hidden on the vertical toolbar for default theme stark.
To resolve this issue, I added a z-index to the ui-dialog box using js and verified that it works properly with all of the themes listed below.
- Default Theme / Stark
- Olivero
- Bartik
- Seven
- Claro
I've included a screenshot for reference.
Please let me know if there's anything I can do better.

pradipmodh13’s picture

StatusFileSize
new1.23 KB
new1.21 KB

Fixed #126 CCF.

pradipmodh13’s picture

StatusFileSize
new596 bytes
new1.11 KB

Fixed #127 CCF.

pradipmodh13’s picture

StatusFileSize
new1.23 KB
new1.21 KB

Fixed #126 CCF

Note:
Please Ignore my patch #127 and #128.

pradipmodh13’s picture

StatusFileSize
new1.26 KB
new1.24 KB

Fixed #126 CCF

Note:
Please Ignore my patch #127, #128 and #129

bnjmnm’s picture

@pradipmodh13
You can check for Custom Commands Failed locally without having to add noise to
the issue. At the end of the fail report there are instructions on how to do this, but they can be easy to miss.

Drupal code quality checks failed.
To reproduce this output locally:
* Apply the change as a patch
* Run this command locally: sh ./core/scripts/dev/commit-code-check.sh
OR:
* From the merge request branch
* Run this command locally: sh ./core/scripts/dev/commit-code-check.sh --branch 10.1.x

The occasional "Custom Commands Failed" patch is bound to happen from time to time, but first checking locally can help prevent having it occur in multiple consecutive comments.

mgifford’s picture

Issue tags: +wcag247

Tagging

Version: 9.5.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.

Gauravvvv made their first commit to this issue’s fork.

gauravvvv’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Issue summary still appears to be needed

Did not review or test.

mstrelan’s picture

Issue tags: +Bug Smash Initiative

Came across this triaging issues for Bug Smash Initiative and have a few thoughts:

  1. Since we're moving to Navigation module I checked if that is also affected and it is
  2. Since Claro and Starterkit Theme are unaffected should we really be fixing it for Stark?
  3. As per bnjmnm a stylesheet is certainly better than a style attribute. Not just for customisations, but for Content Security Policy also.
  4. I don't think toolbar.module is the right component for this since the issue is really with the dialog. Probably Javascript or Stark would be better. Even if it's a css fix, it's a javascript component we're styling.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Status: Needs work » Postponed

The Toolbar Module was approved for removal in #3476882: [Policy] Move Toolbar module to contrib.

This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

The deprecation work is in #3484850: [meta] Tasks to deprecate Toolbar module and the removal work in #3488828: [meta] Tasks to remove Toolbar module.

Toolbar will be moved to a contributed project before Drupal 12.0.0 is released.