Skip to content

Store story page IDs from the buildCallback.#24764

Merged
gmajoulet merged 2 commits intoampproject:masterfrom
gmajoulet:store_page_ids_build_callback
Sep 26, 2019
Merged

Store story page IDs from the buildCallback.#24764
gmajoulet merged 2 commits intoampproject:masterfrom
gmajoulet:store_page_ids_build_callback

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 force-pushed the store_page_ids_build_callback branch from 621e349 to 72011e2 Compare September 26, 2019 18:30
@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.

3 participants