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

🐛 Fixing storyProgress calculation so that values are [0,1] #31024

Merged
merged 2 commits into from Nov 6, 2020

Conversation

raxsha
Copy link
Contributor

@raxsha raxsha commented Nov 6, 2020

Resolving open issue: #30821

storyProgress is currently calculated with currentPageIndex / totalPages, but in order for completed stories to correctly record a value of 1, storyProgress should be calculated with currentPageIndex / (totalPages - 1).

@amp-owners-bot
Copy link

amp-owners-bot bot commented Nov 6, 2020

Hey @gmajoulet, @newmuis, @Enriqe! These files were changed:

extensions/amp-story/1.0/test/test-amp-story-viewer-messaging-handler.js
extensions/amp-story/1.0/test/test-variable-service.js
extensions/amp-story/1.0/variable-service.js

Copy link
Contributor

@gmajoulet gmajoulet left a comment

Choose a reason for hiding this comment

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

🚢 🚢 🚢

@gmajoulet gmajoulet merged commit 7f51eb9 into ampproject:master Nov 6, 2020
@raxsha raxsha deleted the progress branch November 9, 2020 15:54
ed-bird pushed a commit to ed-bird/amphtml that referenced this pull request Dec 10, 2020
…ct#31024)

* Fixing storyProgress calculation

* fixing breaking test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants