How to change the default widget the sidebar

Created on 21 November 2023, 7 months ago
Updated 29 January 2024, 5 months ago

Problem/Motivation

Via the Schema.org Blueprints module, some node edit forms have a lot of fields and would benefit from the sidebar being a little wider than the default width of 400px.

Steps to reproduce

Open ME sidebar.

Proposed resolution

Document how to change the sidebar's default width.

So far, I figured out via the below CSS I can change the default width but subsequently break the ability to resize the sidebar.

body {
  --me-dialog-dock-width: 600px
}

Remaining tasks

  • Determine if and how this can be done.
  • Decide how this should be documented.

User interface changes

N/A

API changes

TBD

Data model changes

N/A

πŸ’¬ Support request
Status

Active

Version

2.1

Component

Code

Created by

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

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

Comments & Activities

  • Issue created by @jrockowitz
  • πŸ‡ΊπŸ‡ΈUnited States sbubaron

    In a similar vein, I'd love to be able to have a separate page/edit form for the non-mercury stuff. In our use case those fields are mainly meta-data related and editors rarely need to change both things at the same time. The sidebar is still useful for things like revision notes/publishing options etc, but everything else could be tucked away on a more traditional edit page.

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

    There is currently no configuration for this. You could potentially alter the dialog data attributes on the local tasks similar to how mercury_editor_menu_local_tasks_alter creates them.

    @Sbubaron Mercury Editor currently uses the default node edit form. You could achieve what you're looking for fairly simply by defining a custom form display, configuring it with just the fields you want, then defining a new route that points to that entity form display. See https://www.drupal.org/docs/drupal-apis/routing-system/structure-of-routes β†’

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

    I am stumped on how to do this via custom code.

    I cannot find mercury_editor_menu_local_tasks_alter in the mercury_editor.module file.

    If anyone can provide a code snippet, when you have a chance, I will owe you a Drupal beer.

Production build 0.69.0 2024