Closed (fixed)
Project:
UI Suite USWDS
Version:
4.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
3 Jan 2024 at 13:18 UTC
Updated:
16 Aug 2024 at 13:34 UTC
Jump to comment: Most recent
Let's start to run the automatic conversion to SDC and UI Patterns 2.x, as provided by the new ui_patterns_legacy sub-module.
Run:
$ drush en ui_patterns_legacy
$ drush upm ui_suite_uswds
$ drush upu ui_suite_uswdsA few issues were found:
Unable to render component "ui_suite_uswds:table". A render array or a scalar is expected for the slot "header"
Unable to render component "ui_suite_uswds:social_links_group". A render array or a scalar is expected for the slot "items"
Unable to render component "ui_suite_uswds:footer". A render array or a scalar is expected for the slot "footer_social_links"
Unable to render component "ui_suite_uswds:process_list". A render array or a scalar is expected for the slot "items"
Unable to render component "ui_suite_uswds:icon_list". A render array or a scalar is expected for the slot "items"
Unable to render component "ui_suite_uswds:collection_item". A render array or a scalar is expected for the slot "meta_items_list"Because SDC is stricter about slots and props data structures than UI Patterns 1.x is with fields and settings. This need to be fixed before moving to UI Patterns 2.x
The one about table component is related to #3407218: What do we do with table rows and table cells data structure? and will also be done by hui_suite_bootstrap
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
pdureau commentedThis issue has been fixed on UI Patterns 2.x side:
Unable to render component "ui_suite_uswds:collection_item". A render array or a scalar is expected for the slot "meta_items_list"So let's remove it from the scope of this ticket.
However, I have found another one:
I am suggesting:
Don't forget to change the Twig template too.
And I doubt the lang attributes is expected in this example. According to https://designsystem.digital.gov/components/language-selector/ lang and xml:lang are expected when the label is in the targeted language, not when in English.
Anyway, it is nice to manipulate the attributes object for each item, because it will be filled by Drupal if needed, and it is nice to duplicate the value for
xml:langas you already doing.Comment #4
pdureau commentedi keep on my side, and will do a new conversion test when UI Patterns 2.x will hit a development milestone
Comment #5
pdureau commentedMonthly update: https://git.drupalcode.org/project/ui_suite_uswds/-/commit/5badac4cb9c97...
Only one remaining issue:
Unable to render component "ui_suite_uswds:table". A render array or a scalar is expected for the slot "header"Let's check what UI Suite Bootstrap is planning to do.
Comment #6
mogtofu33 commentedSome minor errors left (detected with ui_patterns_devel):
Comment #7
pdureau commentedAlready fixed on UI Patterns 2.x (legacy module) side.
Already fixed on UI Patterns 2.x (legacy module) side.
I don't understand because it looks OK:
Comment #8
smustgrave commentedComment #10
smustgrave commentedWill open up some follow ups following internal testing