- Issue was unassigned.
- Status changed to Fixed
almost 2 years ago 5:56pm 18 January 2023 Automatically closed - issue fixed for 2 weeks with no activity.
Today, options are simple "class name" => label dictionaries.
Exemple:
theme_bg_color:
label: Background color
options:
mdc-theme--primary-bg: Primary.
mdc-theme--secondary-bg: Secondary
mdc-theme--surface: Surface
mdc-theme--background: Background
In some cases, we need to add extra informations like description or specific previewed_with:
theme_bg_color:
label: Background color
options:
mdc-theme--primary-bg:
label: Primary
description: Lrem ipsum
previewed_with: mdc-theme--mdc-theme--on-primary
mdc-theme--secondary-bg: Secondary
mdc-theme--surface: Surface
mdc-theme--background: Background
Let's implement this.
Descriptions will be displayed on library page.
previewed_with will be used on library page.
It is important to stay compatible with the existing structure, like what is done with ui_patterns in Drupal\ui_patterns\Definition\PatternDefinitionField:
if (is_scalar($value)) { $this->definition['name'] = is_numeric($name) ? $value : $name; $this->definition['label'] = $value; } else { $this->definition['name'] = !isset($value['name']) ? $name : $value['name']; $this->definition['label'] = $value['label']; $this->definition = $value + $this->definition; }
Fixed
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed - issue fixed for 2 weeks with no activity.