Component issues, and shortcode onyl works with component sets

Hi,

First of all, I really like the documents change in the new version.

Components seems undercooked, although probably quite complicated feature so I understand.

I see you’re aware of the CSS not being applied for [cs_component id="…"] shortcodes and that will be fixed in future.

But why not allow components to be dropped into child of accordions and tabs? For example the accordion is limited to “Accordion Item”, which only allows text or a shortcode in there.

The workaround is to use a shortcode, but this shortcode for component does not allow to pass in any parameters.

example:
[cs_component id=“hkuotuWWhfbcUr6qX2”]

Would be useful if it took the params like example:
[cs_component id=“hkuotuWWhfbcUr6qX2” params="{“buttonText”: “Click me!”, “url”: “#”]

#3

  • The workaround of using cs_gb (instead of cs_component) only works for component sets post ID’s like [cs_gb id=“1233”], this workaround doesn’t work for the component ID like id=“uscV5nCK3OzzYVLSNn”, so the workaround isn’t useful when more than one component is inside a set.

#4
saving as a component export and also a template, gives a different result. Template does not include the margin of a button but component export does.

see google sheet for screenshots (commenting allowed)
https://docs.google.com/document/d/1ioKW6DqE4CvxBh1RJAbEZ9NZnqSao_MFSvHuPVfhFV0/edit?usp=sharing

Maybe some of this is me not understanding, but seems some bugs and naming convention issues.

Thanks,
Clint

1 Like

You know I never thought about the accordion problem like that. It could definitely have inner child elements to be placed inside it.

We’ll definitely add parameters to cs_component. The shortcode is definitely undercooked in general, but we’ll get that spruced up soon.

Templates will be useful when we bring back presets, although I’m not sure if they are very useful for components or setup correctly as you have seen. I will run through component templates and try to see what’s going on in #4. So the Component dropdown your seeing is what Global Blocks was which worked by post id. I’m not sure we’ll ever add individual components there as you kinda lose all the controls in that element type, but I can see scenarios where that is nice. Honestly it’s more of a legacy support element for Global Blocks.

Thanks for bringing this all to our attention have a great weekend.

1 Like

I’m running into the same issue when trying to use a component in an accordion item. Is there a timeline for the fix on the missing CSS? I’ve been able to manually add styling to the the global stylesheet to get around the styling that is not making it from the component to the accordion when using the component shortcode, but long-term that’s not going to work.

Also, is there documentation re: known issues. I’d love to be able to quickly reference that instead of pulling out my hair trying to figure out if I’ve done something wrong or not.

** Update ** thanks to the good work of some volunteers in Pro-specific Facebook thread, I’ve found a workaround (see below).

  1. You need to change the shortcode to to use: [cs_gb id=IDNUMBER] (the gb and ID are critical)
  2. Replace IDNUMBER with the numeric ID value in the url when you have your component opened in CS

That’ll get your component’s styling to once again work as expected.

1 Like

I’ve nearly addressed the cs_component shortcode styling issues. It might not be in 6.1.1, but it’ll come shortly after in 6.1.2.

And yes using cs_gb will output the component workspace or the global block if it was that previously. Having UI in the component to know how to do this is definitely needed.

We try to keep known issues in the “status” section of the release notes, although I apologize that I did not add in the shortcode issue here if you looked previously.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.