Introduce new "layout_tabs_accordion" layout paragraph type and deprecate old "container_tabs_accordeon" paragraph

Created on 11 July 2023, about 1 year ago
Updated 27 September 2023, 12 months ago

From Introduce layout_slideshow layout paragraph type and deprecate old "container_slides" paragraph Needs work , but separated for tabs. Tabs additionally need to specify their tab title, which is a bit more special and we don't need them as often as Slideshow containers.

Problem/Motivation

Tabs / Accordion paragraphs still use the old way of referencing other layout paragraphs. That disallows using drag & drop for moving the paragraphs around.

This is mitigated by the facts, that this functionality isn't used frequently and typically you don't need to resort the items.

Steps to reproduce

Place a paragraph of that type, add items and afterwards try to move them somewhere else. That's impossible.

Proposed resolution

See #9 for a proposal
Configure and develop everything inside a separate ddev instance (not in our preset-instance).

Remaining tasks

- [] Create submodule
- [] Provide install config
- [] Provide the new custom layout
- [] Remove old container_tabs_accordeon install config
- [] Make the old Tabs Container settings available to the new Tabs Layout
- [] Write an install hook for the submodule to rename the old container to suffix DEPRECATED when installing this module. We won't be able to replace the old containers programmatically.
- [] Style
- [] Ensure all previous functionalities & possibilities exist
- [] Test

User interface changes

API changes

Data model changes

Feature request
Status

Postponed

Version

4.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Comments & Activities

  • Issue created by @Anybody
  • Status changed to Postponed about 1 year ago
  • Further consideration on this topic: The layout should not live in drowl_paragraphs, it should live in drowl_layouts, because we also want to have the drowl_layout settings on the layout.

    @anybody you decide whats the cleaner approach here. I think drowl_paragraphs should only provice the layout-slideshow paragraph type with its configuration. drowl_layouts provides the slideshow-layout(s), with the slideshow settings fields (this time programmatically added fields, not entity fields).

    We might could do all of this in drowl_paragraphs .. if we are able to get the drowl_layouts layout settings in any way.

  • Assigned to thomas.frobieter
  • Status changed to Active 12 months ago
  • 🇩🇪Germany Anybody Porta Westfalica

    @thomas.frobieter both is fine for me. The point is from my perspective, if these layouts are drowl_paragraphs specific (and shouldn't / wouldn't be used outside), then they should be part of the drowl_paragraphs submodule that installs the type.

    If they are general enough, put them into drowl_layouts, as drowl_paragraphs depends on drowl_layouts.

    You can prepare the changes suggested here in our DEMO. But please do NOT CHANGE THE EXISTING Tabs, instead create a new one: layout_tabs similar to the new layout_slideshow.
    We'll deprecate the old paragraphs, so we don't need an automatic migration and don't risk to break things. If we'd like to delete the old paragraph types one day, we can use a view to look up, where they were used and replace them manually.

    Doing this automatically would be super hard and still dangerous.

    Go for it :)

  • 🇩🇪Germany Anybody Porta Westfalica
  • 🇩🇪Germany Anybody Porta Westfalica
  • Okay, thought about this again ;)

    We only need one setting from the DROWL Layout default layout settings, this is the section width.

    So, lets add this here again, next to the slideshow settings [2]:

    The layouts on top, should reflect our default layouts + a custom one:

    1. 1 col
    2. 2 col
    3. 3 col
    4. 4 col
    5. 5 col
    6. 6 col
    7. custom

    The available settings should be:

    1. For all:
      • Section Width
      • Background (the whole fieldset with all fields)
      • Show Arrows (default true)
      • Show Dots (default false)
      • Show Controls outside (default false)
      • Autoplay (default true)
      • Automatic Height (default true)
      • Infinite (default false)
      • Center Mode (default false)
    2. Custom only:
      • Visible Elements: Small Devices
      • Visible Elements: Medium Devices
      • Visible Elements: Large Devices

    All these layouts are technically the same, they have one single region and only differs in its slick settings.
    I think this will be the best possible user experience.

  • Status changed to Postponed 12 months ago
  • As just discussed with @Anybody this is nothing important (for now). We don't use this type frequently and it's well designed the way it is. Just the drag & drop support is missing.

    If we should decide to implement this one day, we should solve this similar to what we did in Introduce layout_slideshow layout paragraph type and deprecate old "container_slides" paragraph Needs work , but:

    1. We just need one layout "Tabs / Accordion" (living in the submodule, not in drowl_layouts)
    2. layout_tabs_accordion paragraph type only allows that one layout to be selected
    3. We need to limit the allowed types within the layout_tabs_accordion paragraph type using https://www.drupal.org/project/layout_paragraphs_limit to one type: "Accordion / Tab item" which holds the tab / accordion title. This one allows all regular layouts (like first class layout paragraphs) so that the contents can be placed into its layout and allows Drag & Drop
    4. The selection to show as accordeon vs. tabs should be a layout setting

    All these points should be first tested in a prototype, before we put the effort of config etc. into it!
    (Written by JP & TF)

    So we postpone it until this is really needed in real world!

Production build 0.71.5 2024