Problem/Motivation
When we are in the display builder instances we don't have an easy way to leave and we need to rely on browser bac k button or the admin toolbar
Proposed resolution
Add a method in WithDisplayBuilderInterface and implement it 4 times:
- in Page Layout: returns
entity.page_layout.edit_form(/admin/structure/page-layout/{page_layout}) - in Entity View display: return an URL object built from
entity.entity_view_display.{entity_type}.view_mode - in Views: return an URL object built from
entity.view.edit_display_form - in Devel: return an URL object built from
display_builder_devel.edit
The name of this method needs to be discussed.
Use this method
- in Display Builder's devel
/admin/structure/display-builder/indexin a new table col, for quick access to the config where the display builder was initialized - in a new "button" island plugin to put in the default config, alongside "state". The name and the wording of this island must be discussed.
Issue fork display_builder-3538607
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3538607-island-parent
changes, plain diff MR !104
- 3538607-ui-refactor
changes, plain diff MR !90
Comments
Comment #2
mogtofu33 commentedComment #3
mogtofu33 commentedIn the meantime we could clean the lists part for instances which is a bit everywhere, we have multiple path, class names and opertations, let's try to have a main DisplayBuilderListBuilder class with getOperationLinks, and each module extends if needed.
Route path, names and page titles must be consistent as well.
I don't have option on titles, just proposition to make it consistent.
Page
Views
Entity - @todo nothing yet
UI
Devel @todo move to UI
Comment #4
pdureau commentedGreat idea. Standardization is welcomed. Maybe we can do it in a dedicated issue?
My personal feedbacks:
Page
/admin/structure/page-layout/?/admin/structuresimply "Page layouts" ?Views
Entity - @todo nothing yet
/admin/structure/entityis not a thing. Can we put it in an existing position in admin hierarchy? I don't see one to be honest. That may be the hint this list is not expected. What would be the purpose of this list (maybe too overkill for site builders and developers already have/admin/structure/display-builder/index)?display_builder_entity_form?UI & Devel
⚠️ are you sure it would not be confusing for users to have access to
/admin/structure/display-builder/index? It looks like low level information and I am afraid we will move it back to Devel after some users feedbacks in beta phase.Comment #6
pdureau commentedComment #7
mogtofu33 commentedComment #8
pdureau commentedComment #12
mogtofu33 commentedComment #13
pdureau commentedComment #14
pdureau commentedTest feature:
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.entity_view_display.node.teaser" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 214 of core/lib/Drupal/Core/Routing/RouteProvider.php).To discuss in a follow-up issue for beta1 (because changing the pluginId will alter config storage):
Comment #15
mogtofu33 commentedComment #16
mogtofu33 commentedComment #19
pdureau commented