Skip to content

🚮 Remove navigation state#23110

Merged
Enriqe merged 5 commits intoampproject:masterfrom
Enriqe:del-nav-state
Jul 9, 2019
Merged

🚮 Remove navigation state#23110
Enriqe merged 5 commits intoampproject:masterfrom
Enriqe:del-nav-state

Conversation

@Enriqe
Copy link
Contributor

@Enriqe Enriqe commented Jun 28, 2019

Closes #19751
Closes #19768

@calebcordry
Copy link
Member

Story ad changes LGTM

@gmajoulet
Copy link
Contributor

Awesome!!
Waiting for the tests to pass before reviewing :))

@Enriqe
Copy link
Contributor Author

Enriqe commented Jul 8, 2019

Tests finished running in Travis, although Github doesn't seem to know about it yet. But it's ready for review @gmajoulet

this.storeService_.subscribe(
StateProperty.CURRENT_PAGE_ID,
pageId => {
if (pageId.length <= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason why you don't want to test !pageId?
This would throw an error for null or undefined, which isn't used today, but this test makes it look like pageId is an array

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since CURRENT_PAGE_ID is initialized as '' in the store, I thought it might be safer. But both work fine. Changed it to !pageId.

@Enriqe Enriqe merged commit aea52cd into ampproject:master Jul 9, 2019
@Enriqe Enriqe deleted the del-nav-state branch February 4, 2020 19:08
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.

[amp-story] Stop passing private functions as arguments [amp-story] Remove usage of NavigationState in favor of StoreService

5 participants