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

Store story page IDs from the buildCallback. #24764

Merged
merged 2 commits into from Sep 26, 2019

Conversation

gmajoulet
Copy link
Contributor

Store story page IDs from the buildCallback.

Also, updating the tests so the story is created with its pages already in the DOM.
Our previous implementation wasn't optimal: creating and attaching the story from beforeEach would trigger buildCallback before we append the pages.
In practice, that means that the timeline was

  • buildCallback -> append amp-story-pages -> layoutCallback

and is now

  • append amp-story-pages -> buildCallback -> layoutCallback

@amp-owners-bot
Copy link

Hey @gmajoulet, these files were changed:

  • extensions/amp-story/1.0/amp-story.js
  • extensions/amp-story/1.0/test/test-amp-story.js

Hey @newmuis, these files were changed:

  • extensions/amp-story/1.0/amp-story.js
  • extensions/amp-story/1.0/test/test-amp-story.js

@gmajoulet gmajoulet merged commit f7d720a into ampproject:master Sep 26, 2019
@gmajoulet gmajoulet deleted the store_page_ids_build_callback branch September 26, 2019 19:28
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