Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Behavior When Using Post Loop Builder with a Global Block Containing a Repeater Rendered as a Slider. #1167

Open
mtenreiro opened this issue Nov 1, 2024 · 1 comment

Comments

@mtenreiro
Copy link

When a post loop builder contains a global block with a slider from an ACF Repeater, the post loop builder component switches to slider mode, resulting in unexpected behavior.

Steps to reproduce:

1 - Create an ACF Repeater field with any text field inside it. Display these fields in any post type;
2 - Create a global block named GB-Repeater;
3 - Include a repeater element in this global block and choose Slider option in List Layout;
4 - On a page, create a post loop builder and configure the query to display the list of posts;
5 - Set the List Layout of the post loop builder to List;

You will notice that the post loop builder erroneously displays as a slider, while the ACF Repeater items in GB-Repeater are shown as a list. As a result, the post loop builder shows each post as a slider where all the repeater items appear as a list in the first slide.

  • Breakdance 2.1.0 and 2.2 beta
@mtenreiro
Copy link
Author

Additional Information:

I was able to temporarily fix the issue by applying the following CSS to the repeater within the global block:

%%SELECTOR%% .breakdance-swiper-wrapper {
width: 100%;
overflow: hidden;
position: relative;
}

%%SELECTOR%% .swiper {
width: 100%;
height: auto;
overflow: hidden;
}

%%SELECTOR%% .swiper-wrapper {
display: flex;
width: 100%;
height: auto;
box-sizing: content-box;
transform: translate3d(0, 0, 0);
}

%%SELECTOR%% .swiper-slide {
flex-shrink: 0;
width: 100%;
height: auto;
position: relative;
transition-property: transform;
}

I also had to include the following CSS on post loop builder element to remove the cumulative shift on slides:

%%SELECTOR%% .ee-posts {
--bde-posts-gap: 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants