Amphtml: amp-carousel 2.0 works incorrectly with `goToSlide()`

Created on 15 Oct 2019  路  2Comments  路  Source: ampproject/amphtml

What's the issue?

We tried to make a photo gallery with amp-carousel 2.0, but facing some problems:

(1) goToSlide() does not work correctly with amp-carousel 2.0. It sometimes jumps to the next picture.

We fixed the above problem with [slide] and AMP.setState() but we soon found another problem:

(2) When we use amp-carousel 2.0, the carousel gets broken when there are only two pictures. If a user get to the last picture and turn back, the carousel jumps to the last picture and the control won't work.

How do we reproduce the issue?

(1) goToSlide() problem

  1. Go to the example Image Galleries with amp-carousel
  2. Change amp-carousel-0.1.js to amp-carousel-0.2.js
  3. Go to example ## Image gallery with preview or ## Image gallery with a preview carousel. Click small preview photos one by one and sometimes the carousel will jump to the next photo.

This is a screen recording of the above steps:
https://drive.google.com/file/d/1X6F5We0lTg_BQg91SL8N7hZCYnvP4X2Y/view?usp=sharing

(2) two-pictures problem

  1. Go to the example amp-carousel - Example 2
  2. Change amp-carousel-0.1.js to amp-carousel-0.2.js
  3. Remove blueberries button and image
  4. Click the controll back and forth. Then the carousel jumps to the last picture and the control won't work.

This is a screen recording of the above steps:
https://drive.google.com/file/d/1KwJLDZe4LXsVtKgvFVwKGku10GDuFbF4/view?usp=sharing

What browsers are affected?

(1)
Chrome 77.0.3865.120
Firefox 69.0.1
Firefox for Android 68.1.1
Chrome for Android 77.0.3865.116

(2)
Chrome 77.0.3865.120
Firefox 69.0.1
Firefox for Android 68.1.1
(It works well with Chrome on my smartphone)

Which AMP version is affected?

1910071803120

amp-carousel Developer High Priority Bug UX components

Most helpful comment

Closing this as the originally filed issue is no longer reproducible, feel free to reopen with fresh samples if this is not the case.

All 2 comments

Hi @requiemformemories thanks for filing this issue!

I recently followed the steps to reproduce (1) using https://jsbin.com/sowusometu/edit?html,output and (2) using https://jsbin.com/maguvejaha/1/edit?html,output on both Chrome 81 and Firefox 74 for web and could not reproduce the problematic behaviors described. I also got the same results trying on Chrome 80 for Android.

Specifically for (1) I did attempt clicking on many of the preview images in rapid succession and found that the carousel dropped some of the intermediary suggestions but always advanced the slide to the final preview selected, which I believe is working as intended. I could not reproduce selecting an image and having the carousel advance to a different one.

Could you possibly have the bandwidth to double check if these issues are still occurring on your end?

Much appreciated and thanks again for your patience here.

Closing this as the originally filed issue is no longer reproducible, feel free to reopen with fresh samples if this is not the case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sryze picture sryze  路  3Comments

choumx picture choumx  路  3Comments

samanthamorco picture samanthamorco  路  3Comments

mkhatib picture mkhatib  路  3Comments

gmajoulet picture gmajoulet  路  3Comments