Problem/Motivation

After closing workspaces dialog the vertical admin toolbar is displayed on top of workspaces interface.

Steps to replicate:

  1. Enable workspaces module
  2. Change admin toolbar to vertical mode
  3. Click on "live" button on top
  4. Click on "stage" button, in order to switch to "stage"
  5. (Dialog will open confirming you want to make the switch)
  6. Click on Cancel button
  7. (Now you will see the admin toolbar displayed on top of Workspaces interface)

Proposed resolution

Remaining tasks

  • Confirm it is a bug
  • Come up with a solution
  • Create patch according to proposed solution

User interface changes

API changes

Data model changes

Release notes snippet

Comments

shaal created an issue. See original summary.

pameeela’s picture

Version: 8.9.x-dev » 9.2.x-dev
Issue tags: -Workspaces core +Bug Smash Initiative

Can confirm this still occurs in 9.2.x.

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

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

ikit-claw’s picture

Looks like it might be browser specific need the browser and window width.

shriaas’s picture

I can confirm on firefox 88.0 and chrome 90.0 environment: Ubuntu 20.
I can see that toolbar is re-appearing at the top after the popup is closed(irrespective of the button clicked) I guess there is definitely some JS involved but I can't find how/where to change it so that either:
1. The workspace dialog is closed or
2. Toolbar remains as it is.

ikit-claw’s picture

StatusFileSize
new326.98 KB

Thanks shriaas2898 I can confirm I can replicated this on 9.1.8 also even with the menu being used horizontal.

It looks like some JS is used for the off screen menu that needs tweaking for if you select "cancel"

When you select confirm it has these classes :
button button--primary js-form-submit form-submit ui-button ui-corner-all ui-widget

But when you press cancel it has these :
button dialog-cancel ui-button ui-corner-all ui-widget

shriaas’s picture

Yes @ikit-claw I also think some JS or AJAX call is used here but there are no JS libraries in the module itself 😅 I think it is extended from the core but I am yet to figure out the exact location.

shriaas’s picture

Issue summary: View changes
StatusFileSize
new2.29 MB

Update:
Apparently, this bug does not occur when we try to switch workspace to live (eg. stage -> live), I created two more workspaces to confirm the behavior see below:

The confirm box is created using Drupal\workspaces\Form\SwitchToLiveForm which is extending ConfirmFormBase clase to create that popup box.
So probably some change will be required in Drupal\workspaces\Form\SwitchToLiveForm::getCancelUrl() or Drupal\workspaces\Form\WorkspaceActivateForm::getCancelUrl() method.

shriaas’s picture

Issue summary: View changes

Added remaining tasks to IS

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

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now 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.

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

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now 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.

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, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.