- Issue created by @ktegory
- 🇧🇷Brazil hmendes
Hi ktegory,
While trying to reproduce your problem, I found one problem but it is not related to the "Layout paragraphs" module.
Steps:- Create "A" paragraph with a text field.
- Create "B" paragraph with a multi-value paragraph field.
- Create a paragraph field in your content type.
- Configure the animations:
- Paragraph A: opacity 0 to 1
- Paragraph B. Only for fields, inherit from paragraph A
- Add a content with 1 paragraph A with multiple paragraph B.
- The animation only occurs once the first paragraph A disappears.
Can you confirm this is the problem you're facing?
For example, if you add a paragraph with Layout Paragraphs, but only add 1 inner paragraph in it, does it work?
If this is not your problem, can you provide the steps to reproduce it? - 🇧🇷Brazil hmendes
Hi, I created another issue to fix the problem related to the multi-value paragraph field, just in case there is actually a problem with the integration with the Layout Paragraphs module: 🐛 Animations doesn't work properly with multi-value paragraph field Fixed
If you want to, you can test the Merge request that I sent there, to see if it solves your problem. - 🇪🇸Spain ktegory Madrid
Hi hmendes,
Thanks for your quick response.
Without having updated the module to the dev version yet, the behavior is this:1- Content type X with a multivalue paragraph field (Selected paragraphs Section, Text, Image, etc...) formatted with the Layout paragraphs widget.
2- Added a "parent" paragraph (Section) with no fields, no animation.
3- Added one or several paragraphs (with text field, image, etc) with animations (rotation, opacity, etc, just for test) inside the parent (section) paragraph.
4- Result: No animation at all
5- If I move those paragraphs out of the paragraph section, the individual animations occur.
6- Also, if I add some animation to the section paragraph, it is executed, but the child paragraphs do not show their respective animations.I will update the module to the dev version and report back.
- 🇧🇷Brazil hmendes
Oh, ok. Now I understood the problem, it's not what I was thinking :(
I'm not too familiar with Layout Paragraphs, and I didn't know that u could add a paragraph with no fields and use it as the 'parent' paragraph. To explain the problem, gs_paragraphs module has 2 approaches to find the paragraphs:Parent paragraph: searches in the HTML for that paragraph type, but only considers the paragraphs that doesn't have another paragraph as its parent.
Paragraph Field: basically does the opposite, only considers paragraphs within another one.E.g:
...
{img}...
It will consider as parent paragraph only the Section one, and will consider the Image as the child of Section.
The problem with Layout Paragraphs the way that you're using it is that, first, you can't use the "Paragraph Field" approach because it doesn't have any field, second, you won't be able to use the "Parent Paragraph" because if you have the Section paragraph, then the Image inside of it, it will consider that the image is a child of Section thus is not a parent paragraph.
I would have to think of a way to integrate these two module, but unfortunately I won't be able to do it now.
My suggestion: in your "Section" paragraph type, add a paragraph field for each paragraph type that u intend to add in your layout, then you'll be able to configure the animation for the fields. You can continue using the layout paragraphs the same way that you're using now, the difference is that you'll be able to configure the animations for each paragraph type that u put inside your Section.
For example, if you have the "text", "image", "cta" types that u can add to the layout, add 3 fields in your Section paragraph type, one for each of these types. - 🇪🇸Spain ktegory Madrid
Ok, I understand. Thanks for your recommendation.
Another thing that I could try is adding a field to the section paragraph (by default it's not neccesary for L.P. but is possible like with any other paragraph). Something like a boolean field: "Activate content animation".
Do you think this will do the trick?Another crazy idea, a field type to add the animations. This field could be added to entities like paragraphs, nodes, etc. and through it, configure the animation for each item. For landing pages this level of customization would be great.
However, the module as it is, is very good. Thank you so much!