- Issue created by @pdureau
- Merge request !229Issue #3477573 by pdureau: Better stories slots processing → (Merged) created by pdureau
- 🇫🇷France Grimreaper France 🇫🇷
Minor code adjustments to discuss.
And needs tests.
- 🇫🇷France pdureau Paris
Let's put this list in a constant or an attribute?
OK, I will move
$render_keys
to a class CONST.Not sure about
$html_tag_allowed_render_keys
because it is very specific to the internal logic of the condition.As this class has no requirement and just manipulate the provided data, should it stay as a service or be converted into a trait?
I personally don't like traits so much in PHP. But I will follow your recommendation if you tell me to use them.
When looking at ui_suite_bootstrap examples, I know it is ui_patterns 1 currently, but is the following code be handled too? Or I misunderstood the goal of the issue?
I will do the test now
- 🇫🇷France pdureau Paris
Tested with
ui_suite_bootstrap
examples. 2 issues.html_tag: order of keys
Having the html_tag workaround children at the beginning doesn't work:
"0": {} type: "html_tag" tag: "div"
We need to have it at the end:
type: "html_tag" tag: "div" "0": {}
Skip integers children
+++ b/modules/ui_patterns_library/src/StoriesSyntaxConverter.php @@ -56,6 +56,9 @@ class StoriesSyntaxConverter { if ($in_html_tag && !in_array($property, $html_tag_allowed_render_keys)) { continue; } + if (!is_string($property)) { + continue; + } if (str_starts_with($property, "#")) { continue; }
Automatically closed - issue fixed for 2 weeks with no activity.