Introduce layout_slideshow layout paragraph type and deprecate old "container_slides" paragraph

Created on 3 February 2023, over 1 year ago
Updated 25 October 2023, 11 months ago

Problem/Motivation

Currently our Container-Slideshow Paragraph is an entity-reference-revision field, with a Layout-Paragraphs form formatter and a Slick Entity Reference formatter display formatter.

This will never work, because of the way layout paragraphs works. Slick Entity Reference formatter display formatter is not compatible with the layout paragraphs data structure.

So we could fix this, providing a Layout Paragraphs Slick Entity Reference formatter, BUT:

Furthermore, the current implementation is worse UX, because Container-Slideshows are edited inside Drupal UI-Dialogs, inside this Dialog, we have layout paragraphs, each entity form the user will edit, is - again - opened in a UI-Dialog.

Another downside on this is, that the paragraphs aren't draggable across other layouts.

Steps to reproduce

  1. Add a "Container: Slides"-Paragraph
  2. Add a Layout-Paragraph inside, fill it with some other Paragraphs ... text, image, ... it doesn't matter
  3. Clone your example paragraph sometimes..
  4. Save everything & have a look at the frontend side, the result will be:
    1. First Slide: Layout-Paragraph, containing the other slides (so far so good)
    2. Second Slide: The first Child-Paragraph of the previous Layout-Paragraph
    3. Third Slide: The second Child-Paragraph of the previous Layout-Paragraph
    4. ....

Proposed resolution

Configure and develop everything inside a separate ddev instance (not in our preset-instance).

  1. Add a new Layout-Paragraph Type:
    1. Slideshow
    2. Tabs (separated issue in ✨ Introduce new "layout_tabs_accordion" layout paragraph type and deprecate old "container_tabs_accordeon" paragraph Postponed )
  2. Add 2 layouts according to the above Layout-Paragraph Types (including all the options we currently have on the deprecated Paragraph types):
    1. Slideshow (a layout with only one region, each child will become one slide) => 📌 Create a Slideshow-Layout Layout (as replacent for the DROWL Paragraphs Container Slideshow) Closed: won't fix
    2. Tabs (separated issue in ✨ Introduce new "layout_tabs_accordion" layout paragraph type and deprecate old "container_tabs_accordeon" paragraph Postponed )
  3. Rename our existing Layout-Paragraph Type "Layout" to something like "Grid" to make the difference more clear
  4. Deprecate the types: container_slides, container_tabs_accordion (separated issue in ✨ Introduce new "layout_tabs_accordion" layout paragraph type and deprecate old "container_tabs_accordeon" paragraph Postponed ) and container by renaming it with a suffix "(DEPRECATED)" and remove them from the available paragraphs, so users can't add new ones, while existing ones will stay.

So:

Remaining tasks

- [x] Create submodule
- [x] Provide install config
- [x] Remove old container_slide install config
- [x] Make the old Slideshow Container settings available to the new Slideshow Layout
- [x] 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.
- [x] Rename Paragraph Type "Layout" to "Layout: Grid" via update hook
- [x] Style
- [x] Ensure all previous functionalities & possibilities exist
- [x] Test

User interface changes

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

4.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024