- 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.
- πΊπΈUnited States jrockowitz Brooklyn, NY
The attached patch is my best workaround to widening the sidebar to 480px because the 400px width is an internal property of the MercuryDialog class.
For example, the below code snippet does set the sidebar width, but the sidebar jumps back to 400px when resizing
window.addEventListener('load', function load() { document.documentElement.style.setProperty('--me-dialog-dock-width', '600px'); });
My issue with the 400px-wide sidebar is that the node edit form and field widgets are designed to work on mobile screens wider than 400px.
- πΊπΈUnited States jrockowitz Brooklyn, NY
For the problem/question #2 I created a proof-of-concept Mercury Editor Task β experimental/sandbox module.
The module takes an MVP approach for only nodes and does not create a new form display but overrides the MercuryEditorHtmlEntityFormController to only applies ME to the dedicated 'entity.node.mercury_editor_task' route.
- First commit to issue fork.
- πΊπΈUnited States sethhill
@justin2pin I created a new configuration option for setting the default width of the tray. I put that on the Dialog Settings form, but I'm not sure that's the right context. Do you think it's better on the main Mercury Editor Settings page?
I have some questions about the intended behavior of the saved tray width when a user manually resizes it. Is that supposed to persist after a refresh or on other edit pages? I wasn't sure about that, and this needs some more refinement anyway.
For example, I didn't want to mess with the settings array, because it looked like some of those options were being set directly in dialog.drupal.js. For the time being, I created an additional drupalSettings.mercuryEditorDefaults to get the value from the configuration and then merge that in with the existing settings.
Setting this to Needs Work while we deliberate.
- Status changed to Needs review
6 days ago 10:25pm 18 November 2024 -
sethhill β
committed ab224764 on 2.1.x
Issue #3403159 by sethhill, jrockowitz, sbubaron, pixelwhip: How to...
-
sethhill β
committed ab224764 on 2.1.x
-
sethhill β
committed ab224764 on 2.2.x
Issue #3403159 by sethhill, jrockowitz, sbubaron, pixelwhip: How to...
-
sethhill β
committed ab224764 on 2.2.x