-
Notifications
You must be signed in to change notification settings - Fork 93
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
Fix: Screen blanking on render #2403
Conversation
Azure Static Web Apps: Your stage site is ready! Visit it here: https://jolly-sand-0ac78c710-2403.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://jolly-sand-0ac78c710-2403.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://jolly-sand-0ac78c710-2403.centralus.azurestaticapps.net |
Kudos, SonarCloud Quality Gate passed! |
Feature: add general playwright tests (#2149) Task: Add Graph Support Info on README.md (#2347) Task: Add logging for script errors (#2351) Task: Add language snippet telemetry (#2371) Task: Rename sample query "all the items in my drive" to "list items in my drive" (#2350) Fix: Response area container heights (#2372) Fix: Re-order tests (#2354) Fix: Inform user if URL is incomplete (#2367) Fix: Autocollapsing of history items (#2331) Fix: Screen blanking on render (#2403) Fix: Add method to filter ResizeObserver exceptions (#2342) Fix: enter key runs previous query (#2348) Fix: autocomplete character selection (#2304) Fix: Display beta resources subgroups for admin group (#2364) Fix: Update deprecated aria-label (#2368) Fix: Default overlay on collections review panel (#2377) Chore: December dependabot upgrades (#2296) Chore: Dependabot upgrades February (#2401) chore: Dependabot upgrades (#2335) Chore: Code cleanup (#2251)
Overview
Closes #2402
Demo
Optional. Screenshots,
curl
examples, etc.Notes
React rendering in React18 is a bit different with the other versions. From the documentation,
root.render
clears all HTML before rendering the main component https://beta.reactjs.org/reference/react-dom/client/createRoot#:~:text=The%20first%20time%20you%20call%20root.render%2C%20React%20will%20clear%20all%20the%20existing%20HTML%20content%20inside%20the%20React%20root%20before%20rendering%20the%20React%20component%20into%20it.This is why the screen blanks before the main component is rendered.
Within the componentDidMount method, we are sure that the main component is already in the DOM, so we can safely remove the spinners
Testing Instructions
Load this branch and run GE
Notice that the transition between the loading spinner and the main page is seamless