- Issue created by @lauriii
- First commit to issue fork.
- 🇺🇸United States ctrladel North Carolina, USA
The section previews are actually rendering correctly but are being pushed outside of the tooltip by "undefined" text which was the preview trying to include the css/js header/js footer. css, js_header, and js_footer weren't defined in the component definition which caused the include statements to ultimately be 'undefined' instead of an html string.
{ "id": "fakeSection2", "name": "Fake Section 2", "layoutModel": { "layout": { "nodeType": "root", "name": "root", "uuid": "root", "children": [ { "uuid": "abcde", "nodeType": "component", "type": "experience_builder:two_column", "children": [ { "uuid": "two-column-uuid-slot-column_one", "name": "column_one", "nodeType": "slot", "children": [ { "uuid": "fghij", "nodeType": "component", "type": "experience_builder:my-hero", "children": [] } ] }, { "uuid": "two-column-uuid-slot-column_two", "name": "column_two", "nodeType": "slot", "children": [ { "uuid": "klmno", "nodeType": "component", "type": "experience_builder:my-hero", "children": [] } ] } ] } ] }, "model": { "abcde": { "width": 50, "name": "Two column" }, "fghij": { "heading": "A hero in slot 1!", "subheading": "This text was defined in the section.", "cta1": "Yes", "cta2": "No", "cta1href": "https://drupal.org", "cta2href": "https://google.com", "name": "Hero" }, "klmno": { "heading": "A hero in slot 2!", "subheading": "Text saved in the section", "cta1": "Up", "cta2": "Down", "cta1href": "https://drupal.org", "cta2href": "https://google.com", "name": "Hero" } } }, "default_markup": "<h1 style=\"background: black; color: white;\">TODO</h1>" }
- First commit to issue fork.
- 🇺🇸United States bnjmnm Ann Arbor, MI
Good find @ctrladel ! Fortunately, I don't think we need to make the
css
,js_header
, andjs_footer
properties "optional" because these properties are guaranteed to be present in a Drupal-provided component list. The issue here was the dummy data in sections.ts was incomplete so updating just that should be sufficient. - Merge request !370add object properties to fake section that are not at risk of being missing... → (Open) created by bnjmnm
- First commit to issue fork.
-
jessebaker →
committed a1687126 on 0.x authored by
shyam_bhatt →
Issue #3477199 by shyam_bhatt, ctrladel, bnjmnm: Insert panel preview is...
-
jessebaker →
committed a1687126 on 0.x authored by
shyam_bhatt →
- 🇬🇧United Kingdom jessebaker
I've merged in the change to fix the "fake sections" preview. @lauriii I'm not sure if this issue should remain open until the actual real implementation of sections is complete or if you are happy that it will be address as part of that work ( 📌 Allow saving component compositions as sections Postponed )
- 🇫🇮Finland lauriii Finland
Let's close this one. We can deal with the rest in 📌 Allow saving component compositions as sections Postponed / follow-ups to that.
- 🇺🇸United States Kristen Pol Santa Cruz, CA, USA
crediting shyam_bhatt (to match the commit) and jessebaker for code and review and lauri for reporting
- Status changed to Fixed
17 days ago 3:24am 5 December 2024 Automatically closed - issue fixed for 2 weeks with no activity.