Skip to content

Conversation

camillobruni
Copy link
Contributor

@camillobruni camillobruni commented Oct 14, 2025

There are several elements on the page that have a "nice" startup animation.
While visually nice, it means we have to delay measurements in automation to not run into issues with transitions and svg animations occupying resources in the background.

  • Remove summary fade-in
  • Remove JetStream logo bounce
  • Remove JetStream background swipe animation in svg

@netlify
Copy link

netlify bot commented Oct 14, 2025

Deploy Preview for webkit-jetstream-preview ready!

Name Link
🔨 Latest commit 33bdf3a
🔍 Latest deploy log https://app.netlify.com/projects/webkit-jetstream-preview/deploys/68fa494e84925400087d48ee
😎 Deploy Preview https://deploy-preview-200--webkit-jetstream-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@camillobruni camillobruni requested review from danleh and kmiller68 and removed request for kmiller68 October 14, 2025 16:00
@camillobruni camillobruni changed the title Remove startup animation Remove UI startup animations Oct 14, 2025
@kmiller68
Copy link
Contributor

My preference would be to disable them when startDelay query parameter is passed, if this is even needed at all.

Those animations only take 1-2 seconds to finish which is pretty negligible with respect to the whole process. I also assume you want to wait to start after loading so you get more consistent results.

@camillobruni
Copy link
Contributor Author

We occasionally run each story individually to gather detailed profiles, adding a couple of seconds does sum up quite a bit.

While kinda nice, I don't see any actionable benefit from the animations and IMO the runner harness and page should be as lightweight as possible thus I'm in favour of avoiding unneeded work there.

Copy link
Contributor

@danleh danleh left a comment

Choose a reason for hiding this comment

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

Overall LGTM, with comment. No strong opinion either way.

@camillobruni camillobruni changed the title Remove UI startup animations Skip startup animations with startDelay Oct 22, 2025
@camillobruni
Copy link
Contributor Author

I've noticed that generally the startDelay approach doesn't work for us since we have certain hooks that need to run for our infra before the benchmark is ready. And using time delays is notoriously buggy.

Further updates:

  • Stop all animations when the runner has initialized (this only happens locally or with when running a small subset of stories)
  • Add jetstreams-static.svg that is display after loading
  • Move all .svg to a new img/ folder
  • Remove the start-button animation since we anyway pop-in all workload placeholders without any animations

All in all this will keep the nice jetstreams animations for slow-loading setups.

Comment on lines +52 to +55
const bodyClassList = document.body.classList;
if (JetStreamParams.startDelay !== undefined) {
bodyClassList.remove("animate");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I was thinking you'd do this logic before any animation starts in a new script tag between <script src="params.js"></script> and <script src="JetStreamDriver.js"></script> You'll have to use document.documentElement.classList but I think it should work. At least it seems to locally, modulo other CSS bugs I think happen because I removed the other classList changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've first tried to conditionally start the animation – but then I figured that this wouldn't really solve anything when running with our automation. We pause after setting up the page to inject things, thus we can't really use startDelay anyway since it's not fully clear how long the injection-phase lasts.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would something like an animations=true/false parameter work? My main concern is that the animations are clipped right now if the tests load in < 1s or so, which looks a little janky.

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.

3 participants