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

FR : already have a semi working infinite-scroll, please patch stuff up to make this work #17651

Closed
albalak88 opened this issue Aug 22, 2018 · 1 comment
Assignees

Comments

@albalak88
Copy link

albalak88 commented Aug 22, 2018

Hello!

I kinda succeeded in making an infinite scroll for AMP using only amp-list. It uses recursive templates, with a new amp-list at the end of the template.

This works on Chrome desktop but not on Chrome Android.

On Android the loader animation is stuck forever.

Could you patch this up somehow? Also, layout="container" would be really great for amp-list.

Thanks!
Jonathan

`

<amp-list
          src="/amp/listData/bizReviews.php?id=<?=$bizId?>&skip=20"
          layout="fill">

    <div placeholder style="position:absolute;top:0;text-align:center;">
        <i class="fa fa-spinner fa-spin" style="margin-top:20px;font-size:20px;"></i>
    </div>
    <template type="amp-mustache" id="reviewListTemplate" style="position:absolute;top:0;">
        
        <br>
        <br>
        {{userName}}
        <br>
        <br>
        
        {{#moreReviews}}
        <div style="position:relative;height:10000px;">
            <amp-list
                    src="{{moreReviews}}"
                    layout="fill"
                    template="reviewListTemplate"
                    >
                <div placeholder style="position:absolute;top:0;text-align:center;">
                    <i class="fa fa-spinner fa-spin" style="margin-top:20px;font-size:20px;"></i>
                </div>
            </amp-list>
        </div>
        {{/moreReviews}}
    </template>

</amp-list>
`
@aghassemi
Copy link
Contributor

@albalak88 we have started working on first-class infinite list support. Please subscribe to #14060 to updates.

@aghassemi aghassemi self-assigned this Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants