Closed (fixed)
Project:
UI Suite Bootstrap
Version:
5.1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Jan 2024 at 13:15 UTC
Updated:
20 Nov 2024 at 15:19 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_bootstrap
$ drush upu ui_suite_bootstrapThere is only one issue found so far:
Unable to render component "ui_suite_bootstrap:table". A render array or a scalar is expected for the slot "header".
Because SDC is stricter about slots and props data structures than UI Patterns 1.x is with fields and settings.
This is related to #3407218: What do we do with table rows and table cells data structure?
This need to be fixed before moving to UI Patterns 2.x
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
grimreaperThanks!
Comment #4
e0ipsoI see some of the stories are plain text for the slot content. I would love to see them with HTML markup to ensure they are not improperly escaped.
Comment #5
mogtofu33 commentedThere is a bit more errors, currently hidden by the ComponentValidator throwing an error.
I suggest adding a devel module on UI Patterns to see all errors and ease devel.
Comment #6
pdureau commentedThanks a lot for this comment.
UI Patterns 2 scope
We may need to remove
required: titlefrom links prop type schema in UI Patterns 2.x: https://git.drupalcode.org/project/ui_patterns/-/blob/2.0.x/src/Plugin/U...But this required property may be necessary to not catch any array of objects. So we may add an
anyOfwith the 2 situations:See #3447902: [2.0.0-alpha3] Allow empty link in links prop type
We may need to add a rule in UI Patterns 2.x legacy converter to not add a prop in a story if the preview value is not in the enumeration. Do we also skip a prop in a story if the preview value resolve to false? (it is the case of all props in this example).
See #3395954: [2.0.0-alpha3] Add new Legacy module for UI Patterns 1.x compatiiblity
UI Suite Bootstrap scope
We can also fix upstream
ui_suite_bootstrap1.x code:Comment #7
mogtofu33 commentedComment #8
pdureau commentedFixed
Comment #9
pdureau commentedComment #10
grimreaperChanging to needs work since UI Patterns 2 is in beta phase and usable.
Comment #11
pdureau commentedHi @e0ipso
for example in:
We use a string scalar as
headingslot's preview, as a shorthand notation for["#plain_text" => value]renderable, leveraging a mechanism in SDC render element:https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Co...
So, HTML markup will be escaped by design. Is it something we need to change at the SDC level?
Comment #12
pdureau commentedBlocked by #3480414: Remove obsolete #type => markup
Comment #13
pdureau commentedDONE:
drush upm ui_suite_bootstrapexecuted^10.3.4 || ^11. Add removeui_patterns_librarydependency.TODO ASAP:
src/HookHandler/PreprocessMenuLocalTasks)TODO as soon as 5.0.0-beta1 is released:
drush upm ui_suite_bootstraptemplates/patterns/folder and movetemplates/overrides/totemplates/Next issues (after this one) for 5.1.0 (because compatibility breaks):
Unknown variable: `dropdown_id` in nav componentandUnused variables: slide in carouselCan be done later in 5.1.x (because no compatibility breaks):
Comment #14
grimreaperComment #15
grimreaperChild issues created.
Comment #16
pdureau commentedDONE:
drush upm ui_suite_bootstrapexecuted^10.3.4 || ^11. Add removeui_patterns_librarydependency.drush upm ui_suite_bootstrapsrc/HookHandler/PreprocessMenuLocalTasks)templates/patterns/folder and movetemplates/overrides/totemplates/Next issues (after this one) for 5.1.0 (because compatibility breaks):
Unknown variable: `dropdown_id` in nav componentandUnused variables: slide in carouselCan be done later in 5.1.x (because no compatibility breaks):
Comment #17
grimreaperAlso fix call to pattern in render array.
Comment #18
grimreaperRemaining phpstan issue to be fixed by #3485900: [2.0.0-beta5] Fix normalize typing
Comment #20
grimreaperMerged \o/