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

Fix advancementMode variables for time based advancements. #26581

Merged
merged 1 commit into from Feb 7, 2020

Conversation

gmajoulet
Copy link
Contributor

Fix advancementMode variables for time based advancements. The advancement was set on Advancement.start() which is called when the page starts playing, rather than on Advancement.onAdvance().

Fixes #26579

Copy link
Contributor

@newmuis newmuis left a comment

Choose a reason for hiding this comment

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

Sorry; why is it incorrect to set it when the page starts playing? It should still be set when the story-page-visible trigger gets sent, right?

But for all other triggers, the page is currently auto-advancing, and the analytics variables should reflect that.

@gmajoulet
Copy link
Contributor Author

The name is confusing and could mean either what you said, or what this PR is doing.
We implemented this while working on the branching feature, to have a way to know how the user got to a specific page.

If we wanted to have an API to know if the current page has an auto-advance attribute we'd need to add a new one. This one is used to track which one of the 6 ways to navigate has been used to get to this page.

/** @enum {string} */
export const AdvancementMode = {
GO_TO_PAGE: 'goToPageAction',
AUTO_ADVANCE_TIME: 'autoAdvanceTime',
AUTO_ADVANCE_MEDIA: 'autoAdvanceMedia',
MANUAL_ADVANCE: 'manualAdvance',
ADVANCE_TO_ADS: 'manualAdvanceFromAd',
VIEWER_SELECT_PAGE: 'viewerSelectPage',
};

Changing it would mean refactoring all the other instances where we set the advancementMode

@gmajoulet
Copy link
Contributor Author

Friendly ping
Let's discuss this during standup this morning if more context is needed :))

Copy link
Contributor

@newmuis newmuis left a comment

Choose a reason for hiding this comment

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

Whoops, thought I had already lifted my "request changes"

LGTM ✅

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.

storyAdvancementMode returns incorrect value
5 participants