amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

FR: More flexible height-change requests

Open ericlindley-g opened this issue 9 years ago • 5 comments

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

ericlindley-g avatar Nov 06 '17 17:11 ericlindley-g

Also we should make sure resize requests in fixed layer work reasonably: https://github.com/ampproject/amphtml/issues/10230#issuecomment-342259777

dreamofabear avatar Nov 06 '17 19:11 dreamofabear

/cc @cpapazian

aghassemi avatar Feb 28 '18 22:02 aghassemi

--- 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 avatar Feb 28 '18 22:02 lswang1618

@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.

aghassemi avatar Feb 28 '18 22:02 aghassemi

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.

samouri avatar Jun 05 '20 18:06 samouri