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

Unblock Story navigation after prerendering the education screens. #28440

Merged
merged 1 commit into from May 15, 2020

Conversation

gmajoulet
Copy link
Contributor

Story navigation was completely blocked after prerendering the education screens, because somehow the pointer-events: none; was not respected and the amp-story-education element was acting as a click shield. Hiding it entirely works though, and does not change the animations.

I've also seen race conditions where we try to access the ampdoc too early through the getLocalizationService method.

To verify the fix:

  1. Open the link in mobile emulation
  2. In the console, copy/paste AMP.viewer.receiveMessage('visibilitychange', {'state': 'visible'})
  3. Try to navigate to the next page

This story has the fix
This story should fail 80% of the time (no fix)

@cramforce cramforce merged commit 6f561cb into ampproject:master May 15, 2020
gmajoulet added a commit that referenced this pull request May 15, 2020
Story navigation was completely blocked after prerendering the education screens, because somehow the `pointer-events: none;` was not respected and the `amp-story-education` element was acting as a click shield. Hiding it entirely works though, and does not change the animations.

I've also seen race conditions where we try to access the ampdoc too early through the `getLocalizationService` method.

To verify the fix:
1. Open the link in mobile emulation
2. In the console, copy/paste `AMP.viewer.receiveMessage('visibilitychange', {'state': 'visible'})`
3. Try to navigate to the next page

[This story has the fix](https://stamp-storytime-le.firebaseapp.com/examples/s20/body-painting/index.html?amp_js_v=0.1#origin=https://www.google.com&prerenderSize=1&visibilityState=prerender&paddingTop=0&p2r=0&horizontalScrolling=0&csi=1&aoh=15526927198732&viewerUrl=https://www.google.com&history=1&storage=1&cid=1&cap=swipe,navigateTo,cid,fragment,replaceUrl,education)
[This story should fail 80% of the time (no fix)](https://stamp-storytime-le-fail.firebaseapp.com/examples/s20/body-painting/index.html?amp_js_v=0.1#origin=https://www.google.com&prerenderSize=1&visibilityState=prerender&paddingTop=0&p2r=0&horizontalScrolling=0&csi=1&aoh=15526927198732&viewerUrl=https://www.google.com&history=1&storage=1&cid=1&cap=swipe,navigateTo,cid,fragment,replaceUrl,education)

(cherry picked from commit 6f561cb)
gmajoulet added a commit that referenced this pull request May 15, 2020
Story navigation was completely blocked after prerendering the education screens, because somehow the `pointer-events: none;` was not respected and the `amp-story-education` element was acting as a click shield. Hiding it entirely works though, and does not change the animations.

I've also seen race conditions where we try to access the ampdoc too early through the `getLocalizationService` method.

To verify the fix:
1. Open the link in mobile emulation
2. In the console, copy/paste `AMP.viewer.receiveMessage('visibilitychange', {'state': 'visible'})`
3. Try to navigate to the next page

[This story has the fix](https://stamp-storytime-le.firebaseapp.com/examples/s20/body-painting/index.html?amp_js_v=0.1#origin=https://www.google.com&prerenderSize=1&visibilityState=prerender&paddingTop=0&p2r=0&horizontalScrolling=0&csi=1&aoh=15526927198732&viewerUrl=https://www.google.com&history=1&storage=1&cid=1&cap=swipe,navigateTo,cid,fragment,replaceUrl,education)
[This story should fail 80% of the time (no fix)](https://stamp-storytime-le-fail.firebaseapp.com/examples/s20/body-painting/index.html?amp_js_v=0.1#origin=https://www.google.com&prerenderSize=1&visibilityState=prerender&paddingTop=0&p2r=0&horizontalScrolling=0&csi=1&aoh=15526927198732&viewerUrl=https://www.google.com&history=1&storage=1&cid=1&cap=swipe,navigateTo,cid,fragment,replaceUrl,education)

(cherry picked from commit 6f561cb)
gmajoulet added a commit that referenced this pull request May 15, 2020
Story navigation was completely blocked after prerendering the education screens, because somehow the `pointer-events: none;` was not respected and the `amp-story-education` element was acting as a click shield. Hiding it entirely works though, and does not change the animations.

I've also seen race conditions where we try to access the ampdoc too early through the `getLocalizationService` method.

To verify the fix:
1. Open the link in mobile emulation
2. In the console, copy/paste `AMP.viewer.receiveMessage('visibilitychange', {'state': 'visible'})`
3. Try to navigate to the next page

[This story has the fix](https://stamp-storytime-le.firebaseapp.com/examples/s20/body-painting/index.html?amp_js_v=0.1#origin=https://www.google.com&prerenderSize=1&visibilityState=prerender&paddingTop=0&p2r=0&horizontalScrolling=0&csi=1&aoh=15526927198732&viewerUrl=https://www.google.com&history=1&storage=1&cid=1&cap=swipe,navigateTo,cid,fragment,replaceUrl,education)
[This story should fail 80% of the time (no fix)](https://stamp-storytime-le-fail.firebaseapp.com/examples/s20/body-painting/index.html?amp_js_v=0.1#origin=https://www.google.com&prerenderSize=1&visibilityState=prerender&paddingTop=0&p2r=0&horizontalScrolling=0&csi=1&aoh=15526927198732&viewerUrl=https://www.google.com&history=1&storage=1&cid=1&cap=swipe,navigateTo,cid,fragment,replaceUrl,education)

(cherry picked from commit 6f561cb)
powerivq pushed a commit that referenced this pull request May 28, 2020
Story navigation was completely blocked after prerendering the education screens, because somehow the `pointer-events: none;` was not respected and the `amp-story-education` element was acting as a click shield. Hiding it entirely works though, and does not change the animations.

I've also seen race conditions where we try to access the ampdoc too early through the `getLocalizationService` method.

To verify the fix:
1. Open the link in mobile emulation
2. In the console, copy/paste `AMP.viewer.receiveMessage('visibilitychange', {'state': 'visible'})`
3. Try to navigate to the next page

[This story has the fix](https://stamp-storytime-le.firebaseapp.com/examples/s20/body-painting/index.html?amp_js_v=0.1#origin=https://www.google.com&prerenderSize=1&visibilityState=prerender&paddingTop=0&p2r=0&horizontalScrolling=0&csi=1&aoh=15526927198732&viewerUrl=https://www.google.com&history=1&storage=1&cid=1&cap=swipe,navigateTo,cid,fragment,replaceUrl,education)
[This story should fail 80% of the time (no fix)](https://stamp-storytime-le-fail.firebaseapp.com/examples/s20/body-painting/index.html?amp_js_v=0.1#origin=https://www.google.com&prerenderSize=1&visibilityState=prerender&paddingTop=0&p2r=0&horizontalScrolling=0&csi=1&aoh=15526927198732&viewerUrl=https://www.google.com&history=1&storage=1&cid=1&cap=swipe,navigateTo,cid,fragment,replaceUrl,education)

(cherry picked from commit 6f561cb)
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

4 participants