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 iframe page navigation when initializeManually=true #804

Merged
merged 1 commit into from
Jun 1, 2021

Conversation

cea2aj
Copy link
Member

@cea2aj cea2aj commented Jun 1, 2021

Ensure that the page initializes upon page navigation when initializeManually=true

This functionality broke during a recent re-factor when I moved the initAnswersExperience boolean out of the runtimeConfig and into the top-level of the message. Since this data was previously inside the runtimeConfig, it would persist and the experience would receive the message to re-initialize during page navigation. After moving that data outside of the runtimeConfig, the page would no longer receive that message and would fail to re-initialize. To fix this, I ensure that the parent indicates to the iframe that it needs to re-initialize.

J=none
TEST=manual

Load an iframe test site with manuallyInitialize=true, and call the init function. See that the experience now initializes when navigating verticals within the iframe.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.006%) to 5.699% when pulling c52db98 on dev/iframe-jwt-fix into 30d2e07 on feature/jwt-support.

@cea2aj
Copy link
Member Author

cea2aj commented Jun 1, 2021

I've created SLAP-1371 to add unit tests for the feature branch as a whole

@cea2aj cea2aj merged commit a70b946 into feature/jwt-support Jun 1, 2021
@cea2aj cea2aj deleted the dev/iframe-jwt-fix branch June 1, 2021 16:36
cea2aj added a commit that referenced this pull request Jun 1, 2021
Ensure that the page initializes upon page navigation when initializeManually=true

This functionality broke during a recent re-factor when I moved the initAnswersExperience boolean out of the runtimeConfig and into the top-level of the message. Since this data was previously inside the runtimeConfig, it would persist and the experience would receive the message to re-initialize during page navigation. After moving that data outside of the runtimeConfig, the page would no longer receive that message and would fail to re-initialize. To fix this, I ensure that the parent indicates to the iframe that it needs to re-initialize.

J=none
TEST=manual

Load an iframe test site with manuallyInitialize=true, and call the init function. See that the experience now initializes when navigating verticals within the iframe.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants