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

[amp-story] Refactor pagination buttons to use store ♻️ #19655

Merged
merged 5 commits into from Dec 11, 2018

Conversation

Enriqe
Copy link
Contributor

@Enriqe Enriqe commented Dec 5, 2018

Closes #19600

Make pagination buttons use AmpStoryStoreService instead of NavigationState. Also adds visual tests for pagination buttons (only desktop).

Follow up PRs will be made to eventually deprecate navigation state. (#19751)

@Enriqe Enriqe self-assigned this Dec 5, 2018
@Enriqe Enriqe changed the title [amp-story] add TOTAL_PAGES property and move pagination buttons to use store ♻️ [amp-story] add TOTAL_PAGES property to store and move pagination buttons to use store ♻️ Dec 5, 2018
@Enriqe
Copy link
Contributor Author

Enriqe commented Dec 5, 2018

Actually I think I'll split this into two PRs. I'll let you know when it's ready for review.

@Enriqe Enriqe changed the title [amp-story] add TOTAL_PAGES property to store and move pagination buttons to use store ♻️ [amp-story] Make pagination buttons to use store ♻️ Dec 5, 2018
@Enriqe Enriqe changed the title [amp-story] Make pagination buttons to use store ♻️ [amp-story] Refactor pagination buttons to use store ♻️ Dec 7, 2018
@Enriqe Enriqe force-pushed the pagination-btns branch 3 times, most recently from 5f3d646 to 2eced2e Compare December 10, 2018 16:24
</amp-story-grid-layer>
</amp-story-page>


Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: extra line break

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -690,12 +690,10 @@ export class AmpStory extends AMP.BaseElement {
return;
}

this.paginationButtons_ = PaginationButtons.create(this.win);
this.paginationButtons_ =
PaginationButtons.create(this.win, () => this.hasBookend_());
Copy link
Contributor

Choose a reason for hiding this comment

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

Plz add a TODO so we find a way to avoid passing a private function here. I understand that it's way out of the scope of this PR, and is already something we do in other places

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@gmajoulet
Copy link
Contributor

Percy LGTM

@Enriqe
Copy link
Contributor Author

Enriqe commented Dec 11, 2018

Rebased from master to get a green build. Please review Percy again and if it looks good then it's ready to merge :)

@newmuis newmuis merged commit 4692041 into ampproject:master Dec 11, 2018
noranazmy pushed a commit to noranazmy/amphtml that referenced this pull request Mar 22, 2019
…9655)

* move pagination buttons to use store

* ensure buttons work with bookend history state

* add visual tests

* update pr

* reviews
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

4 participants