Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amp-list resizing broken #22552

Closed
sebastianbenz opened this issue May 29, 2019 · 2 comments · Fixed by #22559
Closed

amp-list resizing broken #22552

sebastianbenz opened this issue May 29, 2019 · 2 comments · Fixed by #22559
Assignees
Labels
Externally Tracked Tracked by Google or other parties Type: Bug WG: runtime

Comments

@sebastianbenz
Copy link
Contributor

The release yesterday broke https://amp.dev/boilerplate/.

Steps to reproduce:

  • go to https://amp.dev/boilerplate/
  • select on of the checkboxes on the left
    => no code snippet visible (the initial snippet is server-side-rendered and gets replaced with an amp-list when the config changes).

This is what the implementation looks like (simplified from amp.dev/boilerplate):

      <amp-list id="codeSnippet"
                width="auto"
                layout="fixed-height"
                [src]="config"
                single-item
                binding="always"
                [is-layout-container]="config.changed"
                hidden [hidden]="!config.changed">
   ....
</amp-list

Adding a dummy height binding [height]="1" fixes the problem.

sebastianbenz added a commit to ampproject/amp.dev that referenced this issue May 29, 2019
* remove ampbyexample references
* fix canonical
* don't generate second amp page
* fix amp-list not being displayed (workaround for
ampproject/amphtml#22552).
@dreamofabear dreamofabear self-assigned this May 29, 2019
@dreamofabear
Copy link

Thanks for the report.

This is due to a change in #22227 that postpones rendering of amp-list triggered by [src] binding with local data from "immediate" to "layout". The problem is that "layout" won't happen if the element has a zero size.

In the boilerplate case, looks like amp-list#codeSnippet has a static height of 0.

@dreamofabear
Copy link

As you mention, giving the amp-list a defined height fixes this issue but we should probably revert this behavior change since it may break other pages.

Related external reports: b/133433229, b/133355484

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Externally Tracked Tracked by Google or other parties Type: Bug WG: runtime
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants