adobe / aem-react-core-wcm-components

42 stars 16 forks source link

Example SPA project container using ContainerV1 doesn't show any parsys #17

Open Gusis93 opened 3 years ago

Gusis93 commented 3 years ago

Hi,

while testing the SPA example projects I realised that the container component does not show any Parsys, see the screenshot. Wanted to know if this is by definition or an error.

Also, both options it allows [Simple, Responsive], render essentially the same HTML, what is the actual purpose of this component then?

Screenshot_05_10_2020__14_52

pfauchere commented 3 years ago

@niekraaijmakers, do you have any pointers?

niekraaijmakers commented 3 years ago

il go check it out, I got hammered / clobbered with a major fever last few days... but i'm back. And I'll gladly check this out. Thank you for the first bug report!

niekraaijmakers commented 3 years ago

@Gusis93 can you give me a bit more info on which AEM version you are using, which service pack and whether you are using a fresh instance? I cannot reproduce this issue locally

josephrignanese commented 3 years ago

Hi @niekraaijmakers, @pfauchere, @Gusis93 we hit a similar issue also. In our case we only had a simple Container, not a responsive grid.

Managed to get it working eventually by doing the following:

  1. Adding the new component within the container component as per the examples reference https://github.com/adobe/aem-react-core-wcm-components/blob/master/examples/ui.apps/src/content/jcr_root/apps/core-components-examples/wcm/react/components/container/new/.content.xml
  2. Modifying the isInEditor prop passed to the Container component from ContainerV1.tsx to refer to this.props.isInEditor https://github.com/adobe/aem-react-core-wcm-components/blob/e8ea2f2ef33a2207b76bd90bdbf4a9798ea3628a/react-spa-components/src/container/container/v1/ContainerV1.tsx#L89 (probably also https://github.com/adobe/aem-react-core-wcm-components/blob/e8ea2f2ef33a2207b76bd90bdbf4a9798ea3628a/react-spa-components/src/container/container/v1/ContainerV1.tsx#L74 for ResponsiveGrid)

Hope this helps

Gusis93 commented 3 years ago

Hi Sorry responding so late, I lost track of this issue, I'm using AEM 6.4 and not a fresh instance.

@josephrignanese Yep we solved the same way, might be an error that its always set to false and thats why it wasn't rendering the placeholder.

We created our own container based on this in the end.

pfauchere commented 3 years ago

@niekraaijmakers what about the suggested fix?

https://github.com/adobe/aem-react-core-wcm-components/issues/17#issuecomment-715313022