Introducing dependencies between themes

Created on 25 March 2024, 9 months ago
Updated 12 July 2024, 5 months ago

Problem/Motivation

UI Suite DSFR need to be able to validate 2 "themes" together, so they are suggesting to introduce a dependency system:

system:
  label: "System"
  key: data-fr-scheme
  target: html

light:
  label: "Light"
  key: data-fr-scheme
  target: html

dark:
  label: "Dark"
  key: data-fr-scheme
  target: html

mourning_system:
  label: "Mourning system"
  key: data-fr-mourning
  target: html
  value: ''
  dependencies:
    - system

mourning_light:
  label: "Mourning light"
  key: data-fr-mourning
  target: html
  value: ''
  dependencies:
    - light

mourning_dark:
  label: "Mourning dark"
  key: data-fr-mourning
  target: html
  value: ''
  dependencies:
    - dark

Proposed resolution

Only one theme is activated by the user, the form element stays a select list.

If a theme with dependencies is activated, the other themes are also activated, so the attributes, meta element & classes of all themes are added to the page markup.

If a dependency is listed but is not found, let's ignore it, process as usual, and push a warning log message.

Feature request
Status

Fixed

Version

1.1

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024