- Issue created by @pdureau
-
pdureau →
committed 0cc47567 on 2.0.x authored by
Christian.wiedemann →
Issue #3395954 by Christian.wiedemann: [2.0.x] Add new Legacy module for...
-
pdureau →
committed 0cc47567 on 2.0.x authored by
Christian.wiedemann →
- Status changed to Needs work
11 months ago 3:53pm 24 December 2023 - 🇫🇷France pdureau Paris
First commit of the new strategy : https://git.drupalcode.org/project/ui_patterns/-/commit/deb8f3d6d94632d2...
Because 🐛 No matter what I do, I can't swap the class of the SDC plugin Postponed is moving slowly and will not be enough, and we are pessimistic that SDC will one day become really extensible, we are replacing the "legacy plugin discovery" by a drush command doing a migration.
Spec document was updated.
- Assigned to pdureau
- 🇫🇷France pdureau Paris
Don't forget to also update ui_examples files with the drush command
- 🇫🇷France pdureau Paris
Do we do that too? Does UI Patterns 1.x allows patterns to be outside templates folder?
+++ b/modules/ui_patterns_legacy/src/ComponentDiscovery.php @@ -42,7 +42,7 @@ class ComponentDiscovery { */ public function discover(string $extension): array { $components = []; - $path = $this->getExtensionPath($extension) . '/templates/'; + $path = $this->getExtensionPath($extension); foreach (array_keys($this->fileScanDirectory($path)) as $file_path) { $content = file_get_contents($file_path); foreach (Yaml::decode($content) as $id => $definition) {
- 🇫🇷France pdureau Paris
In the scope of this ticket:
- Migration from LayoutOptions because UI Patterns 2.x replace also Layout Options. Careful with "getRegionName()" in markup.
- Migration of UI Patterns Settings
default_value
because it may be used as a fallback preview story value:
elseif ($preview && !empty($setting_definition->getPreview())) { $value = $setting_definition->getPreview(); } else { $value = $setting_definition->getDefaultValue(); }
https://git.drupalcode.org/project/ui_patterns_settings/-/blob/8.x-2.x/s...
- Do 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 📌 [5.1.x] Automatic conversion to SDC & UI Patterns 2.x Needs work
- Status changed to Needs review
6 months ago 5:17pm 18 May 2024 - 🇫🇷France pdureau Paris
DONE in cb45c339a:
- Migrate 'default_value' which may be used as a fallback for 'preview'
- Do not add a prop in a story if the preview value is not in the enumeration.
- Cast the preview value according to the prop type.
- Replace component_story by a component render element
- Patterns can be found outside templates folder
Let's close this issue and create a new one for:
Migration from LayoutOptions because UI Patterns 2.x replace also Layout Options. Careful with "getRegionName()" in markup.
if we find some issues, lety's create dedicated tickets
- Status changed to Needs work
6 months ago 2:39pm 21 May 2024 - Merge request !125Issue #3395954 by pdureau: Add new Legacy module for UI Patterns 1.x compatiiblity → (Merged) created by pdureau
- Issue was unassigned.
- Status changed to Needs review
5 months ago 9:01pm 21 June 2024 - 🇫🇷France pdureau Paris
DONE
- composer.json update
- info.yml update
- merge drush commands?
- fix the need to execute some commands many times to work properly
- Status changed to Fixed
5 months ago 9:50am 24 June 2024 - Status changed to Fixed
5 months ago 1:46pm 3 July 2024