Mercury tray resizes when entity browser modal dialogs are opened

Created on 26 November 2024, 22 days ago

Problem/Motivation

Same issue as πŸ› Mercury tray resizes when modal dialogs are opened Active , but I think we are seeing the problem now when the sidebar opens a modal dialog.

Steps to reproduce

  • Add node using mercury editor with an entity reference field that uses an entity browser β†’
  • Attempt to open the entity browser via the sidebar
  • Confirm the sidebar is now full screen. (see attached)

Proposed resolution

Fix JS

Remaining tasks

TBD

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Active

Version

2.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

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

Merge Requests

Comments & Activities

  • Issue created by @jrockowitz
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    Marking this critical because the mercury editor remains locked in the full-width mode even after reloading the page.

  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States sethhill

    Dialogs should be behaving quite a bit better now.

    I also moved some of the handlers around on resizing the sidebar tray, so that should better detect when the sidebar is open or closed. There is still one bug where if you collapse the sidebar and then start dragging it back open, it flies open to the width before it was collapsed. I thought it better to leave that as it stands currently and get more eyes on this sooner.

    I believe this is undocumented at the moment, but you can configure dialog settings based on specific Paragraph types. This is found in Mercury Editor Dialog Settings. To do so, create a new object with the Paragraph's name appended with _form. For example:

    _defaults:
      width: fit-content
      height: fit-content
      drupalAutoButtons: false
      dialogClass: lpb-dialog
      resizable: true
    entity_ref_form:
      width: 600
      height: fit-content
      drupalAutoButtons: false
      dialogClass: lpb-entity-reference
      resizable: true
    formatted_text_form:
      width: 800
      height: 600
    
  • Merge request !84Revise dialog and tray behavior. β†’ (Merged) created by sethhill
  • πŸ‡ΊπŸ‡ΈUnited States sethhill

    I made some modifications to improve the experience of resizing the sidebar tray.

    When collapsing and re-opening the tray using the button in the toolbar, the tray will now open at the default width. This makes the default width setting more relevant, because it's now possible to restore the tray to that default.

    Resolved the issue where the tray popped open unexpectedly to a previously-stored value.

    I think this is ready to merge if it looks good to others.

  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    I tested the MR, and it fixes the reported issue.

  • Pipeline finished with Skipped
    8 days ago
    #364701
    • sethhill β†’ committed aa067eff on 2.2.x
      Issue #3489991 by sethhill, jrockowitz: Mercury tray resizes when entity...
  • πŸ‡ΊπŸ‡ΈUnited States sethhill
Production build 0.71.5 2024