Bug found in Carousel + Poster Card
Describe the bug
Bug found in Carousel +Poster Card. When we are changing the current slide it causes the others around it to be reset.
When you change the slide you are viewing, it resets what is around it.
The error behavior:
What libraries are you seeing the problem on?
Mobile Library
Steps to reproduce
- Carousel component
- Add the Poster Card to the 3 slides
- Change the slide being viewed
Expected behavior
That the component does not lose the content added to the slides when changing.
Another video showing in detail the context of this bug, it breaks whenever you change the view.
https://telefonicacorp-my.sharepoint.com/:v:/g/personal/lucas_aalbuquerque_telefonica_com/EXL3GhinW41EuMUqWT-OZzQBtbPPwMtSsjpeZsGvID8EMA?nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D&e=Whek7I
This bug happens especially when creating a template content to add to the carousel component.
We have been investigating this issue deeply and seems to be directly related of the anatomy of the poster card (the image is in the outermost layer) and how swap instance works in Figma.
One way to fix this problem is to avoid having the image being directly at the level of the swap instance layer. If the image is in a layer below this issue doesn't exist (yo can tray with media cards and see that the image stays.
Since we see overkill changing the implementation of the poster card for this problem, we recommend you to avoid using instances of Mística components directly in the REPLACE ME properties of other components, instead, wrap them in a component first (https://github.com/Telefonica/mistica-design/issues/2014#issuecomment-2768865707). After trying this solution, the image of the poster stayed across all carousel slides.
We'll keep this issue open in case we can find a better workaround for this, but I will remove the milestone of the issue for now, since this is something hard to fix ATM.