-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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-story] Build pagination buttons for pre-rendered stories #30503
Conversation
Hey @gmajoulet, @newmuis! These files were changed:
|
Thanks for catching this Enrique! I see how this ordering is important for pre-rendering now. |
Yep this was done on purpose as the pagination buttons are desktop only, and there's no platform prerendering documents with a desktop view. |
Oh ok got it, they'd actually never build. Do you need to prerender them or do you need them to build once out of prerender? Let's think of when we need them, since we want to do as little as possible during prerender. We have to be super cautious about CPU cycles at this point. |
Yeah, this is no big deal because I don't think we have a platform where we pre-render a story and then make it visible in desktop view. But it is needed for the open source web player since this is a very present use case.
We could wait building them until after |
I moved the building of the buttons to inside amphtml/extensions/amp-story/1.0/amp-story.js Lines 951 to 952 in 8f05773
PTAL @gmajoulet |
Yep that looks great, and that will actually make the accessibility features @processprocess worked on reachable for players using prerendering, like the Discover integration. |
…roject#30503) * build pagination buttons for prerendered stories * prettier * build pagination buttons after doc is visible
While working on #30031 I noticed pagination buttons weren't being built for documents that were initially prerendered. This is because the
layoutCallback()
was being short circuited here for prerendered documents:amphtml/extensions/amp-story/1.0/amp-story.js
Lines 1012 to 1019 in 056f82b
Which is right before the pagination buttons are built.