[beta1] Remove hardcoded markup from consent_banner pattern

Created on 9 February 2023, almost 2 years ago
Updated 14 March 2023, over 1 year ago

Problem/Motivation

Consent banner markup is complicated and mix the markup of 3 components: consent_banner, consent_manager & modal

Proposed resolution

There are 2 things to do to make this component a bit more flexible and future-proof:

  • Call modal component from Twig instead of hardcoding its markup. Modal component must be refactored first, with the removal of the trigger button.
  • Call consent_manager component from Twig instead of hardcoding its markup. This component must be created first.

API changes

No API changes for consent_banner pattern. This is important because we know this pattern is already used in production websites. Renaming "text" field as "content" is tempting, but it

There will be some API changes for modal pattern: label field is removed, modal_id is added.

📌 Task
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

Production build 0.71.5 2024