Problem/Motivation
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.
Proposed resolution
Run:
$ drush en ui_patterns_legacy
$ drush upm ui_suite_dsfr
$ drush upu ui_suite_dsfrRemaining tasks
Only one issue found so far:
operator_logo slot in page.html.twig:
{{ pattern('header', {
'logo_text': page.logo,
'operator_logo': page.header_operator_logo,
'service_title': site_name,
'service_tagline': site_slogan,
'tools_links': page.header_tools_links,
'tools_search': page.header_tools_search,
'navbar': page.header_navbar,
}) }}
trigger this: Error: Call to undefined method Drupal\Core\Url::render() in Drupal\Core\Template\Attribute->__toString()
but we don't know yet if it an issue from ui_suite_dsfr, ui_patterns_legacy, ui_patterns 2.x or SDC.
Issue fork ui_suite_dsfr-3419042
Show commands
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:
- 3419042-automatic-conversion-to
changes, plain diff MR !55
- pierre_proposal
changes, plain diff MR !122
Comments
Comment #3
mogtofu33 commentedSome minor errors left (detected with ui_patterns_devel):
Comment #4
pdureau commentedI have rebased from 1.0.x branch, and I don't reproduce the issue. Maybe it was fixed by the team.
Comment #5
stephj commentedHello,
i am testing the current code in the MR and found a few minor isues :
- the composer.json requires ui_patterns 1.x
- in the translate component, "links.description" has value "null".
thank you
Comment #6
pdureau commentedLet's use this MR as the first commit of new 1.1.x branch.
Postponed until #3455354: [2.0.0-beta4] Add a stories specific discovery is done and UIP2 beta4 is released.
Once ready:
templates/patternsfolderui_suite_dsfr_preprocess_pagerui_suite_dsfr_preprocess_breadcrumbtemplates/overrides/ui_patterns_library/pattern()bycomponent():Comment #7
pdureau commentedWe also need to get rid of those 3 preprocesses:
I don't know how to replace them yet. Maybe I will just remove them and create a 1.x issue to restore their logic elsewhere.
Comment #8
pdureau commentedComment #9
pdureau commentedDONE:
Next steps before merging as the first commit of 1.1.x:
drush upm ui_suite_dsfrafter #3455354: [2.0.0-beta4] Add a stories specific discovery is merged in UIP2)drush upm ui_suite_dsfrafter the release of 1.0.2Will be moved to dedicated 1.1.x issues (we don't do them now in order to be able to keep rebasing from 1.0.x as long as possible):
templates/patterns/folder and movetemplates/overrides/totemplates/pattern()Twig function bycomponent()1.1.x branch will also benefits from:
Comment #10
pdureau commentedDONE:
drush upm ui_suite_dsfrexecuted^10.3.4 || ^11Next steps before merging as the first commit of 1.1.x:
drush upm ui_suite_dsfrafter the release of 1.0.2templates/patterns/folder and movetemplates/overrides/totemplates/Next issues (after this one):
Comment #11
pdureau commentedComment #12
pdureau commentedComment #13
pdureau commentedDONE:
drush upm ui_suite_dsfrexecuted^10.3.4 || ^11. Abd removeui_patterns_librarydependency.drush upm ui_suite_dsfrafter the release of 1.0.2templates/patterns/folder and movetemplates/overrides/totemplates/Next issues (after this one):
Comment #14
pdureau commentedComment #18
pdureau commented