High level approach to managing layout #20
CraigClark
announced in
Announcements
Replies: 1 comment 2 replies
-
Hi @CraigClark Just throwing this out there, but I noticed we're using paragraphs in composer.json. Maybe to manage layouts, we can use the new Layout Paragraphs module? I haven't used it personally, but it is on my to-do list to test drive it. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
Currently we are using the panels module with the bootstrap_layout module to control what appears on the search page. During automated testing, bootstrap_layout was causing tests to fail. We submitted a report to the project.
The test plan states that the priority is to always use automated tests. Manual tests should only be used if there is no reasonable alternative.
Possible solutions
Do nothing
We could write manual tests and hope that the contrib module gets fixed. it was decided in a meeting on July 17 that we do not want to take this approach.
Contribute a solution back to the bootstrap_layouts module
We are not sure of the level of effort required to identify and fix the issue. Additionally, there are several community approved patches in the issue queue now that have not made it back into the release. This is because the module is minimally maintained.
It was decided at the meeting on July 17 that we do not want to take this approach because it is impossible to estimate the level of effort required to address it.
Find an alternative to panels for layout
We could stop using panels and use layout builder instead. See the section panels vs layout builder.
Use panels, but write custom layouts in code
We could write custom layouts to be used by panels. These would be in code and would not have the customization in the UI that bootstrap_layouts provides. It is not difficulty to write custom layouts in code, however you do need a developer to do write them. It is not something a site builder can do in the UI. Users would be able to select one of the custom layouts to use from the UI, however they would not be able to do things like add custom classes or IDs. Note that all the default layouts are available, it is only the layouts provided by bootstrap_layout that we would replace.
Panels vs Layout builder
Panels is a contributed module, layout builder is part of Drupal core.
Panels
https://www.drupal.org/project/panels
Pros
Cons
Layout builder
https://www.drupal.org/docs/8/core/modules/layout-builder
Layout builder is Drupal's built in tool for doing page layouts.
Pros
Cons
Question to answer
What do we anticipate the needs of projects using the base-build to be? Layout builder offers a simpler interface that will be easier for most content creators to manage. Panels can manage more complex layouts that may require things like conditional display, granular control or the ability to override defaults.
Recommendation
Use panels and layout builder, utilizing the strengths of each.
@chrislaick @NicoledeGreef @lkmorlan
Beta Was this translation helpful? Give feedback.
All reactions