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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 [Story performance] Disable animations on first page if story is transformed #37135

Merged

Conversation

mszylkowski
Copy link
Contributor

We want to disable the animations on the first page if the story is transformed, to prepare for the CSS split that would glitch (show + hide + animate in) animated elements on the first page.

@mszylkowski mszylkowski self-assigned this Dec 7, 2021
@amp-owners-bot
Copy link

amp-owners-bot bot commented Dec 7, 2021

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

extensions/amp-story/1.0/amp-story.js
extensions/amp-story/1.0/animation.js
extensions/amp-story/1.0/utils.js

@mszylkowski mszylkowski added this to In progress in wg-stories Sprint via automation Dec 7, 2021
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.

Plz also update this:

if (
isExperimentOn(this.win, 'story-disable-animations-first-page') ||
isPreviewMode(this.win) ||
prefersReducedMotion(this.win)
) {
Services.performanceFor(this.win).addEnabledExperiment(
'story-disable-animations-first-page'
);
}

@mszylkowski mszylkowski enabled auto-merge (squash) December 7, 2021 18:24
@mszylkowski mszylkowski merged commit 788b14d into ampproject:main Dec 7, 2021
wg-stories Sprint automation moved this from In progress to Done Dec 7, 2021
@dreamofabear
Copy link

We received a bug report about this recently. Is there any additional context? E.g. is this a permanent change?

@mszylkowski
Copy link
Contributor Author

I've mentioned on Slack recently:

...we have temporarily turned on the experiment that disables animations on the first page for now in order to check the performance improvements on all stories with animations as we test other improvements in parallel (...) until the beginning of January (if all goes well, no promises) but we might eventually think of a smarter / more long term approach with better UX.

Hope that gives some context, but I'm happy to also answer any more questions on Slack or here.

@dreamofabear
Copy link

Cool, thanks.

Is there some public live documentation we can point non-technical users to re: the current state of experiments? E.g. even a markdown file in amphtml would be nice.

@mszylkowski
Copy link
Contributor Author

Yes, there's a JSON file here with the fast-rollout experiments, and here for prod (slow-rollout) experiments

@dreamofabear
Copy link

Not great for non-technical users but maybe this is a special case that won't happen too often.

@mszylkowski
Copy link
Contributor Author

Could be potentially easy to make a dashboard that parses these JSONs and shows them in a table, not sure if it's worth it for the couple of people that might be interested in them

@ampproject/wg-infra

@swissspidy
Copy link
Contributor

Did someone say dashboard?

I took your suggestion as a challenge to whip up something very simple:

https://amp-experiments-dashboard.vercel.app/

Source code: https://github.com/swissspidy/amp-experiments-dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

6 participants