mistica-design icon indicating copy to clipboard operation
mistica-design copied to clipboard

Bug found in Carousel + Poster Card

Open LucasAlbuquerque0 opened this issue 9 months ago • 2 comments

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. Image

The error behavior: Image

What libraries are you seeing the problem on?

Mobile Library

Steps to reproduce

  1. Carousel component
  2. Add the Poster Card to the 3 slides
  3. Change the slide being viewed

Expected behavior

That the component does not lose the content added to the slides when changing.

LucasAlbuquerque0 avatar Mar 18 '25 20:03 LucasAlbuquerque0

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.

LucasAlbuquerque0 avatar Apr 10 '25 14:04 LucasAlbuquerque0

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.

aweell avatar May 16 '25 13:05 aweell