FR: More flexible height-change requests
When an AMP component makes a resize request:
- Queue for resize
- If the user isn't scrolling: -- And if the bottom of amp-list is in the viewport: --- wait until it isn't anymore, then resize and correct scroll accordingly (e.g. if the viewport is below amp-list) -- If the bottom of amp-list is not in the viewport: just resize at will
Primary use case to support is a container-like layout for amp-list, where it can resize with good UX in more cases
Continuation of: https://github.com/ampproject/amphtml/issues/10230#issuecomment-342215212
Also we should make sure resize requests in fixed layer work reasonably: https://github.com/ampproject/amphtml/issues/10230#issuecomment-342259777
/cc @cpapazian
--- wait until it isn't anymore, then resize and correct scroll accordingly (e.g. if the viewport is below amp-list)
^doesn't this mean that whatever is in the viewport can move around without user interaction?
edit: ah nvmd - I see that it would only do so when scrollTop could be changed
@lswang1618 if we correct for scrolling properly (Chrome has actually started doing this recently under their Scroll Anchoring initiative), it won't be noticed by the user.
I think we can close this now that we support container layout for <amp-list>.
Please leave a comment or reopen if there is still work to be done here.