Amphtml: the height of amp-list will be resized with some random height when user wants to navigate to another page

Created on 16 Oct 2018  路  6Comments  路  Source: ampproject/amphtml

ezgif com-video-to-gif

Hi guys, we notice since the version released of v1810052256480, the height of amp-list will be resized with some random height when user wants to navigate to another page, can you please check on this ? appreciate your guys assistance on this

to: @choumx @aghassemi

High Priority Bug

Most helpful comment

Thanks for the report (and the animated GIF).

This is an interesting one. It's caused by placeholder resizing in #18148. The placeholder animation is 690px and the amp-list is layout=fill which means it has a height of 1px at layoutCallback.

Since 690 > 1, the amp-list requests a height change to 690. However, this remains queued while the amp-list finishes rendering (3000px+ height). So the amp-list's resource still has a pending change-size (getPendingChangeSize()) of 690px.

This change size to 690px is finally triggered from a focus event listener in focus-history.js, which eventually triggers the flushing of the pending change-size.

To fix this, we should call resetPendingChangeSize() after render.

All 6 comments

/cc @cathyxz as well

https://github.com/ampproject/amphtml/pull/18148
i think this is the PR who is causing the issue, hope it helps

Thanks for the report (and the animated GIF).

This is an interesting one. It's caused by placeholder resizing in #18148. The placeholder animation is 690px and the amp-list is layout=fill which means it has a height of 1px at layoutCallback.

Since 690 > 1, the amp-list requests a height change to 690. However, this remains queued while the amp-list finishes rendering (3000px+ height). So the amp-list's resource still has a pending change-size (getPendingChangeSize()) of 690px.

This change size to 690px is finally triggered from a focus event listener in focus-history.js, which eventually triggers the flushing of the pending change-size.

To fix this, we should call resetPendingChangeSize() after render.

ezgif com-video-to-gif 1

this is another more serious issue that we have been facing on ShopCart Page List ~

rollback should be in canary now

ezgif com-video-to-gif 3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akshaylive picture akshaylive  路  3Comments

choumx picture choumx  路  3Comments

aghassemi picture aghassemi  路  3Comments

radiovisual picture radiovisual  路  3Comments

edhollinghurst picture edhollinghurst  路  3Comments