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

Open
ericlindley-g opened this Issue Mar 16, 2018 · 7 comments

Comments

@ericlindley-g
Copy link
Collaborator

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

This comment has been minimized.

Copy link
Collaborator

ampprojectbot commented Jun 5, 2018

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Collaborator Author

ericlindley-g commented Aug 7, 2018

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

/cc @cathyxz and @aghassemi for visibility

@dulgar

This comment has been minimized.

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

This comment has been minimized.

Copy link
Collaborator Author

ericlindley-g commented Aug 28, 2018

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?

@choumx

This comment has been minimized.

Copy link
Collaborator

choumx commented Aug 28, 2018

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

This comment has been minimized.

Copy link
Collaborator

ampprojectbot commented Feb 13, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.