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 rendering from amp-state height fix. #3280

Merged
merged 1 commit into from Dec 12, 2019

Conversation

samouri
Copy link
Member

@samouri samouri commented Dec 11, 2019

summary
The height of each row is actually only 22px.
See the "Rendering amp-list" here.

screenshot
Screen Shot 2019-12-11 at 1 36 36 PM

The height of each row is actually only 22px.
@CrystalOnScript
Copy link
Collaborator

Hi @samouri! Thanks for taking the initiative to fix this - however, the documentation is correct. While the height of the individual items is 22px, the overall size of the amp-list component is calculated as [height]="items.length * 24".
Screen Shot 2019-12-11 at 11 57 21 AM

@samouri
Copy link
Member Author

samouri commented Dec 11, 2019

@CrystalOnScript, I didn't just modify the documentation, I also modified (or at least tried to modify) the code to keep them in sync.

I think it is a bug that the actual item height and the height calculation are off by 2px, because that leads to an increasing margin each time one clicks Add item. For example, by the time that 40 items have been added, the "Add item" button becomes 80px too far down (2px per item).

See
Screen Shot 2019-12-11 at 3 31 12 PM

@CrystalOnScript
Copy link
Collaborator

@samouri - thanks for clarifying, I misunderstood!

@CrystalOnScript CrystalOnScript merged commit 108ad58 into ampproject:future Dec 12, 2019
@samouri samouri deleted the patch-1 branch December 12, 2019 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants