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

[Master feature] Improved resizing rules for amp-list #14073

Closed
ericlindley-g opened this issue Mar 16, 2018 · 8 comments
Closed

[Master feature] Improved resizing rules for amp-list #14073

ericlindley-g opened this issue Mar 16, 2018 · 8 comments

Comments

@ericlindley-g
Copy link
Contributor

ericlindley-g commented Mar 16, 2018

This issue captures the work needed to address a number of related amp-list resizing issues.

  • Dynamically resizing during page load to accommodate amp-list children with unknown height
  • Dynamically resizing after actions that resize children, such as amp-bind mutation amp-accordion open/close
  • Dynamically resizing at the next opportunity, if it was unable to resize initially before the bottom of amp-list was scrolled into the viewport
@ericlindley-g ericlindley-g added this to the Prioritized FRs milestone Mar 16, 2018
@ericlindley-g ericlindley-g self-assigned this Mar 16, 2018
@ericlindley-g ericlindley-g added this to Feature Backlog in AMP HTML Project Roadmap via automation Mar 16, 2018
@ampprojectbot
Copy link
Member

This issue doesn't have a category which makes it harder for us to keep track of it. @ericlindley-g Please add an appropriate category.

@dulgar
Copy link

dulgar commented Aug 6, 2018

can you add a "windowWIDTH" variable which can be used for calculation in amp-list expression

@ericlindley-g
Copy link
Contributor Author

@dulgar Could you share an example of how you'd like to use this "windowWIDTH" variable?

/cc @cathyxz and @aghassemi for visibility

@dulgar
Copy link

dulgar commented Aug 8, 2018

@ericlindley-g @cathyxz @aghassemi
I use this expression for my product list

<amp-list [height]="300 * products.length" >

If the width of the page is responsive, I do not know how many product will be listed in a row.
My example calculate the height of the amp-list for one product for each row.
Is there a way to calculate with windowWIDTH, something like this

<amp-list [height]="300 * (product.length / (windowWIDTH / 200) )" >

my prodcut boxed are fixed width=200 height=300

thanks

@ericlindley-g
Copy link
Contributor Author

Interesting — adding @choumx for thoughts on exposing something like the windowWIDTH variable you propose. Would this be easy to do? Any tradeoffs aside from the effort to implement?

@dreamofabear
Copy link

I don't think that's the right approach -- you probably want to use CSS flexbox combined with this new resizing feature.

@nainar nainar added this to Needs triage in amp-list-v2 via automation Feb 5, 2019
@ampprojectbot
Copy link
Member

This issue hasn't been updated in awhile. @aghassemi Do you have any updates?

@aghassemi aghassemi moved this from In Development to Shipped in AMP HTML Project Roadmap Jun 19, 2019
@aghassemi
Copy link
Contributor

launched

amp-list-v2 automation moved this from Needs triage to Closed Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
amp-list-v2
  
Closed
Development

No branches or pull requests

6 participants