-
Notifications
You must be signed in to change notification settings - Fork 17
Skip startup animations with startDelay #200
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
base: main
Are you sure you want to change the base?
Changes from all commits
0c06efe
54dc3c7
d4f1b08
4d42ec9
3626407
d362da1
e2c1870
b578b11
74ccb99
3c52814
e0971d1
86d95d1
b074b9d
cea65b8
33bdf3a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,25 +51,32 @@ | |
| } | ||
|
|
||
| async function initialize() { | ||
| const bodyClassList = document.body.classList; | ||
| if (JetStreamParams.startDelay !== undefined) { | ||
| bodyClassList.remove("animate"); | ||
| } | ||
|
Comment on lines
+54
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would something like an |
||
| if (!JetStreamParams.isDefault) { | ||
| showNonDefaultParams(); | ||
| } | ||
| if (globalThis.allIsGood) { | ||
| try { | ||
| await JetStream.initialize(); | ||
| document.body.classList.add("ready"); | ||
| } catch (e) { | ||
| globalThis.allIsGood = false; | ||
| console.error(e); | ||
| } finally { | ||
| bodyClassList.remove("loading"); | ||
| bodyClassList.remove("animate-loading"); | ||
| } | ||
| } | ||
| if (!globalThis.allIsGood) { | ||
| bodyClassList.add('error'); | ||
| let statusElement = document.getElementById("status"); | ||
| statusElement.classList.remove('loading'); | ||
| statusElement.classList.add('error'); | ||
| statusElement.innerHTML = "<h2>ERROR</h2><p>Errors were encountered during page load. Refusing to run a partial benchmark suite.</p>"; | ||
| } | ||
| } | ||
|
|
||
| function showNonDefaultParams() { | ||
| document.body.classList.add("nonDefaultParams"); | ||
| const body = document.querySelector("#non-standard-params-table tbody"); | ||
|
|
@@ -87,7 +94,7 @@ | |
| <script src="JetStreamDriver.js"></script> | ||
|
|
||
| </head> | ||
| <body onload="initialize()"> | ||
| <body onload="initialize()" class="loading animate"> | ||
| <h1 class="logo"> | ||
| <div id="jetstreams"> | ||
| <a href="index.html" class="logo-image">JetStream 3</a> | ||
|
|
@@ -116,7 +123,7 @@ <h2>Non-standard Parameters</h2> | |
| <p class="summary" id="mode-description"></p> | ||
|
|
||
| <div id="result-summary"></div> | ||
| <div id="status" class="loading">Loading Benchmark...</div> | ||
| <div id="status">Loading Benchmark...</div> | ||
|
|
||
| <div id="results"></div> | ||
| </main> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.