[1.1.0] improve/clean component library and stories

Created on 7 February 2025, about 2 months ago

Problem/Motivation

📌 Task
Status

Active

Version

1.1

Component

Code

Created by

🇫🇷France just_like_good_vibes PARIS

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

Comments & Activities

  • Issue created by @just_like_good_vibes
  • 🇫🇷France pdureau Paris

    if i understood well what you told me during the meeting:

    • more stories for components
    • update ui-patterns-stories-full.html.twig template override with somethign like that:
      --- a/templates/ui_patterns_library/ui-patterns-stories-full.html.twig
      +++ b/templates/ui_patterns_library/ui-patterns-stories-full.html.twig
      @@ -10,20 +10,22 @@
           <div class="ui_patterns_story__story">
             {% if variants and not story.props.variant %}
               {% for variant_id, variant in variants %}
      -          {{ _self.render_variant(component_id, story_id, variant_id, variant) }}
      +          {{ _self.render_variant(component_id, story_id, story, variant_id, variant) }}
               {% endfor %}
             {% else %}
               {{ component_story(component_id, story_id, {}, {}, true) }}
      +        <pre><code>{{ story|json_encode(constant('JSON_PRETTY_PRINT')) }}

      {% endif %}

      {% endmacro %}
      -{% macro render_variant(component_id, story_id, variant_id, variant) %}
      +{% macro render_variant(component_id, story_id, story, variant_id, variant) %}

      {{ variant.title }} ({{ variant_id }})

      {% if variant.description %}

      {{ variant.description }}

      {% endif %}
      +

      {{ story|json_encode(constant('JSON_PRETTY_PRINT')) }}

      {{ component_story(component_id, story_id, {}, {variant: variant_id}, true) }}

      {% endmacro %}

Production build 0.71.5 2024