[beta2] ⚠️ Fix modal structure in consent_banner pattern

Created on 9 March 2023, almost 2 years ago
Updated 18 March 2023, almost 2 years ago

Problem/Motivation

modal is a field but doesn't act as a slot because its structure is too deep and not renderable:

    modal:
      type: array
      label: Modal data
      description: "Contains:
        - title: Modal title,
        - text: see 'Consent manager' pattern,
        - services: see 'Consent manager' pattern"
      preview:
        title: Cookie management panel
        text: Preferences for all services.
        services:
          youtube:yes
            title: Youtube
            description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nulla arcu, imperdiet vel rutrum sed, dapibus et diam.
          google:
            title: Google
            description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nulla arcu, imperdiet vel rutrum sed, dapibus et diam.
            sub_services:
              analitycs:
                title: Google Analytics
              maps:
                title: Google Maps

Proposed resolution

Maybe a menu structure will fit more. If id does, we can move modale to setting and leverage

If it doesn't, do we move services to its proper pattern?

Remaining tasks

Also, rename "text" field as "content" to fit with upstream.

API changes

Yes, this is chaning the pattern the data model.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇫🇷France pdureau Paris

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

Comments & Activities

  • Issue created by @pdureau
    • pdureau committed db317587 on 1.0.x
      Issue #3346901 by pdureau, Grimreaper: Fix modal structure in...
  • Status changed to Fixed almost 2 years ago
  • 🇫🇷France pdureau Paris

    Fixed in commit db317587626d7bca04ff8e8a6bab9d39dc33adc0

    With a new field structure in consent_banner pattern:

     - modal:
     -   type: array
     -   label: Modal data
     -   description: "Contains: title: Modal title, text: see 'Consent manager' pattern, services: see 'Consent manager' pattern"
     + modal_title:
     +   type: text
     +   label: Modal title
     +   description: "See 'Modal' pattern"
     + modal_text:
     +   type: text
     +   label: Modal text
     +   description: "See 'Consent manager' pattern"
     + services:
     +   type: menu
     +   label: Modal services
     +   description: "A Drupal menu structure. See 'Consent manager' pattern"

    And a new structure (compatible with Drupal menu) for Services in consent_manager pattern:

      -  youtube:
      -    title: Youtube
      -    description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nulla arcu, imperdiet vel rutrum sed, dapibus et diam.
      -  google:
      -    title: Google
      -    description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nulla arcu, imperdiet vel rutrum sed, dapibus et diam.
      -    sub_services:
      -      analitycs:
      -        title: Google Analytics
      -      maps:
      -        title: Google Maps
      +  - title: Youtube
      +    attributes:
      +      id: youtube
      +      title: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nulla arcu, imperdiet vel rutrum sed, dapibus et diam.
      +  - title: Google
      +    attributes:
      +      id: google
      +      title: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nulla arcu, imperdiet vel rutrum sed, dapibus et diam.
      +    below:
      +      - title: Google Analytics
      +        attributes:
      +          id: analitycs
      +      - title: Google Maps
      +        attributes:
      +          id: maps
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024