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

Test: 347 make playwright wait for hydrated not networkidle #354

Merged

Conversation

myieye
Copy link
Contributor

@myieye myieye commented Oct 27, 2023

Resolves #347

Instead of explicitly making Playwright wait for hydration, it seemed more appropriate for the app to block user interaction before hydration.

I initially went for a minimal loading overlay (5b79da9), which I included in the history, because it wasn't terrible.

But, it seemed so weird to cover up loaded HTML...

So, I transitioned to making things that tend to need hydration visibility: hidden and in cases where I know that it's a container (only a form so far), it's possible to add a "loading skeleton".

Out of date

Log.in.-.Google.Chrome.2023-10-27.11-58-36.mp4
Log.in.-.Google.Chrome.2023-10-27.11-59-53.mp4

EDIT: new version (I just couldn't become friends with that weird huge gradient, so I transitioned to a simpler loading animation):

Log.in.-.Google.Chrome.2023-10-27.13-39-09.mp4

image

Instead of covering with overlay, because
(1) it's weird to cover up a loaded page
(2) it doesn't block keypresses
We don't have to wait until NetworkIdle/Hydrated, because the app blocks user interaction automatically.
@github-actions
Copy link

github-actions bot commented Oct 27, 2023

UI unit Tests

1 tests  ±0   1 ✔️ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ±0 

Results for commit 9dad138. ± Comparison against base commit 7a7d781.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 27, 2023

C# Unit Tests

34 tests   34 ✔️  12s ⏱️
  6 suites    0 💤
  1 files      0

Results for commit 9dad138.

♻️ This comment has been updated with latest results.

@myieye myieye force-pushed the test/347-make-playwright-wait-for-hydrated-not-networkidle branch from 159cd96 to 1311e97 Compare October 27, 2023 12:00
Copy link
Collaborator

@hahn-kev hahn-kev left a comment

Choose a reason for hiding this comment

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

it's not my favorite design, but I played with it and my best idea was to just disable inputs and buttons, that greys them out and prevents interaction, but I didn't like that either. It really comes down to the fact that this just sucks and I don't like that the user can't interact with the page once it's rendered.

For the inputs on the admin page can we disable them instead of hiding them? it seems weird to have that void there.

frontend/src/routes/+layout.svelte Outdated Show resolved Hide resolved
@myieye
Copy link
Contributor Author

myieye commented Oct 31, 2023

@hahn-kev The problem with disabling the input fields is that we can't block Playwright unless we actually disable/enable them with JS and I thought it would be nice if we could avoid JS for this.

I also don't think it would be a huge visual improvement to show disabled inputs.

I think some sort of navigation/loading indicator (#197) will likely give us the UX boost we need.

@myieye myieye merged commit d11d232 into develop Nov 2, 2023
11 checks passed
@myieye myieye deleted the test/347-make-playwright-wait-for-hydrated-not-networkidle branch November 2, 2023 16:00
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.

Make Playwright wait for hydrated, not NetworkIdle
2 participants