Settings Tray does not close on placement of block

Created on 24 February 2023, over 1 year ago
Updated 10 January 2024, 6 months ago

Problem/Motivation

After adding a block to the page, the Settings Tray remains open. Drupal core’s behavior, without a modal, is that the Settings Tray does close when someone places a block.

Steps to reproduce

Add a block to a section and note the Settings Tray remains. This requires the user to manually close via "x", which is adding overhead to site building User Experience.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

RTBC

Version

1.3

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States texas_tater Austin, TX

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @texas_tater
  • πŸ‡ΊπŸ‡ΈUnited States bkosborne New Jersey, USA

    I agree, this is a bit confusing. I guess on one hand it could be useful to have it stay open like it does, but it's I think it's more likely that the user is adding just one block

  • πŸ‡ΊπŸ‡ΈUnited States texas_tater Austin, TX

    Agreed! Remaining open also impacts the perceived preview of visual layout by squishing things unnecessarily. It's already possible that the Preview might be slightly different from completely saving the layout, and this issue just adds another thing getting in the way.

  • Status changed to Needs review about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States bkosborne New Jersey, USA

    Added a merge request with a 1 line fix. When the iframe modal is closed, the settings tray will also be closed. I think it's also reasonable to close the settings tray as soon as the iframe modal is opened, but that's more complicated I think. This also allows someone to close the iframe modal and make another selection from the settings tray if they want (like if they clicked the wrong thing).

    I also first tried just configuring the module to have the iframe modal used for the remaining settings tray routes (choose block and choose section), but when I did that, things got a bit wacky after saving the block or section settings form. It reloaded the whole site inside the iframe.

  • πŸ‡ΊπŸ‡ΈUnited States kevinquillen

    I agree, after the user action is completed, the tray should close.

  • πŸ‡ΊπŸ‡ΈUnited States kevinquillen

    The proposed change in the MR addresses the problem.

  • Status changed to RTBC 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States bkosborne New Jersey, USA

    Setting to tested as per #7

  • πŸ‡¬πŸ‡§United Kingdom Alina Basarabeanu

    The changes from the merge request fixed the issue in Drupal Version 9.5.10 and layout_builder_iframe_modal 1.3.0.
    Can this be merged into the next stable release?
    Thank you

  • πŸ‡ΊπŸ‡ΈUnited States galactus86

    I downloaded this MR as a patch and it works as expected! Thank you for this fix.

  • First commit to issue fork.
  • πŸ‡ΊπŸ‡¦Ukraine Taran2L Lviv

    D10 settings tray has a different CSS ID, added it as well.

    Attaching static patch file for composer patching.

Production build 0.69.0 2024