Problem/Motivation
edit_plus's Change-form sidebar code managed the right rail by hand: DisableEditMode hid panels directly through DOM manipulation, and the form callers used the old SidebarManager signatures (closeActiveSidebar() and the two-argument openSidebar(type, id)). navigation_plus 2.3.6 introduced a side-aware SidebarManager API, and continuing to bypass it lets right-rail panel state desync when more than one panel is open. The module's ^2.2 navigation_plus floor could also resolve to a release that predates the new methods, breaking installs.
Proposed resolution
Route all Change-form sidebar open/close through the navigation_plus 2.3.6 SidebarManager:
- Close the right rail with
closeSide('right')and close a specific form withcloseSidebar(id)instead ofcloseActiveSidebar(). - Reveal an already-loaded form with the single-argument
openSidebar(id). DisableEditModecloses the activeedit_plus_formthrough the manager rather than hand-hiding panels, preserving the invalid-form guard.- Reject a blocked close with the
SidebarPluginBase.CLOSE_BLOCKEDconstant instead of an ad hoc string. - Add the
np-scrollclass to the wrapped Change form so it uses navigation_plus' sidebar scroll behavior when the form is taller than the viewport. - Document, at the append site, why edit_plus is intentionally not a
#[Sidebar]plugin: its Change forms are dynamic and per-entity, so they are appended as panel siblings into the right<aside>wrapper rather than discovered statically. - Raise the navigation_plus requirement to
^2.3.6, the release carrying these APIs.
User interface changes
The Change form in the right sidebar now scrolls when it is taller than the viewport. No other visible change.
API changes
No public edit_plus API change. The module now requires drupal/navigation_plus:^2.3.6 (previously ^2.2) because it depends on the side-aware SidebarManager API.
Comments
Comment #3
tim bozeman commented