[1.0.1] Move documentation URLs to own definition property

Created on 6 July 2024, 5 months ago
Updated 17 July 2024, 4 months ago

Problem/Motivation

Documentation URL are currently in description properties:

accordion:
  label: Accordion
  description: Used to condense space by hiding content and revealing it as needed. https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/accordeon
  category: Accordion

Proposed resolution

Move them to own "link" property:

accordion:
  label: Accordion
  description: Used to condense space by hiding content and revealing it as needed.
  links:
    - https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/accordeon
  category: Accordion

Don't forget to run prettier on modified YAML

And add related markup in patterns-meta-information.html.twig

You can tale inspiration from https://git.drupalcode.org/project/ui_suite_bootstrap/-/blob/5.0.x/templ... :

  {# External documentation links. #}
  {% if pattern.render_links %}
    <p>
      {% for renderLink in pattern.render_links %}
        {{ renderLink|add_class('btn btn-sm btn-primary') }}
      {% endfor %}
    </p>
  {% endif %}

with DSFR classes instead of Bootstrap classes

📌 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

Merge Requests

Comments & Activities

Production build 0.71.5 2024