Audit components before go live

Created on 7 November 2024, 6 months ago

Problem/Motivation

Since currently there is no way to deprecate a slot to be a prop or vice versa think it would be good to audit the existing components.

If a change needs to be made open a separate issue

Steps to reproduce

N/A

Proposed resolution

Audit existing components. Fix any that need to be updated

Remaining tasks

Audit
Review any follow ups
Make stable release

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ“Œ Task
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States smustgrave

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

Merge Requests

Comments & Activities

  • Issue created by @smustgrave
  • πŸ‡«πŸ‡·France pdureau Paris

    Ok, i will have a look today or tomorrow

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Updated the project page to include icons.

  • πŸ‡«πŸ‡·France pdureau Paris

    Hello Steven,

    A few feedbacks about the current state of 4.x branch

    Form components

    Some components implement form element. Most SDC themes don't do that because SDC is not compatible with the Form API ( πŸ“Œ Compatibility between SDC and the Form API Active ). In UI Suite USWDS, we have a few of them, and there is nothign wrogn about that.

    However, some don't keep slots opaque and manipulate renderables in the template.

    For example, in combo_box:

    {% if option.type == 'optgroup' or option['#type'] == 'optgroup'%}
    {% set label = option.label ? option.label : option['#label'] %}
    

    Is this component used somewhere? How? Can we prevent this behaviour?

    Layout Options is not necessary anymore

    UI Patterns 2.x is also replacing Layout Options:

    Proposed resolution

    1. Create 4 components: grid_row_1, grid_row_2, grid_row_3 & grid_row_4
    2. Remove layout_options from info.yml & composer.json
    3. Remove ui_suite_uswds.layout_options.yml and ui_suite_uswds.layouts.yml
    4. Remove template/layout--grid.html.twig

    Example of similar change: πŸ“Œ [1.1.0] From Layout Options to UI Patterns 2.x Active

    landing_page ui_examples

    You have to convert it to UI Patterns 2, to replace:

    • pattern render elements by component render elements
    • pattern_preview render elements by component render elements, with a story render property

    It is an emergency to do it IMO, because you have already removed the dependency to ui_patterns_legacy

    This will also be the opportunity to:

    • Remove the # prefix in the render property: "#type": html_tag and type: html_tag
    • Use the newly introduced Grid components instead of markup renderable like "#markup": '<div class="grid-row grid-gap"> <div class="tablet:grid-col-4">...'

    Tests with UI Patterns 2

    Have you already tried using ui_suite_uswds with UI Patterns 2 is projects? That's the best test to do ;)

  • Merge request !94Resolve #3486199 "Fix combo box" β†’ (Merged) created by smustgrave
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Fixed the layout_options/new grid patterns in 1 issue
    the ui_example in another

    and the combo box here. Not thrilled with it but that's my fault for being eager with the patterns for forms.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave
  • Assigned to pdureau
  • Status changed to Fixed 4 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024