Automattic / Automattic/jetpack

Slideshow Block: Pagination added in 11.7 beta doesn't work with AMP

Open
#28,210 2 comments 0 reactions 0 assignees View on GitHub
[Block] Slideshow [Platform] Atomic [Plugin] Jetpack [Pri] Low [Status] Stale Bug
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin

Jetpack

### Steps to Reproduce

1. Start with a site running the 11.7 beta.
2. Install and activate the [AMP plugin](https://wordpress.org/plugins/amp/).
3. Add one or more slideshow blocks to a post or page; for each block, add six images.
4. View the AMP version of the page on the front-end.

### A clear and concise description of what you expected to happen.

I expected the updated pagination to continue to be AMP (things like the slideshow advancing still work as expected with AMP!).

### What actually happened

The pagination doesn't update as you page through the photos.

Also, if you have more than one slideshow on the page, the pagination starts at an offset number (1/6 for the first one, 2/6 for the second one...).

Lastly, the slideshow has some very minor display issues when AMP is enabled (like the previous/next buttons are a lot closer to the edge).

### Browser

Google Chrome/Chromium, Mozilla Firefox, Apple Safari

### Other information

Slideshow without AMP:

![Screen Shot 2023-01-06 at 11 39 29 AM](https://user-images.githubusercontent.com/177561/211087015-35e47c2e-a68a-4448-a89e-7f05395642bb.png)

Slideshow with AMP:

![Screen Shot 2023-01-06 at 11 39 21 AM](https://user-images.githubusercontent.com/177561/211087046-22558d54-d3a2-4487-b4f4-3aef96bb85e1.png)

### Platform (Simple, Atomic, or both?)

Atomic, Self-hosted

### Reproducibility

Consistent

### Severity

Some (< 50%)

### Available workarounds?

Yes, easy to implement

### Workaround details

Disabling AMP on a per post/page basis fixes the issue, but as it does impact existing slideshows they would need to be found on a site using AMP and have AMP disabled on those pages.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with Jetpack 11.7 beta, the AMP plugin, and multiple slideshow blocks containing six images each. Compare the AMP and non-AMP front ends; done means pagination updates as slides advance, starts independently for each slideshow, and the AMP controls no longer have the reported display issues.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php, react, wordpress
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.