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

Add an empty splash screen on notebook launch to avoid a flash of unstyled content #6911

Merged
merged 4 commits into from Jun 9, 2023

Conversation

andrii-i
Copy link
Contributor

@andrii-i andrii-i commented Jun 9, 2023

Add an empty splash screen on notebook launch to avoid a flash of unstyled content while custom CSS is loading.

Fixes #6790.

Without this PR:

(slowed down)
without_new

without_dark

With this PR:

(slowed down)
with_light_new

with_dark

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2023

Binder 👈 Launch a Binder on branch andrii-i/notebook/add_blank_splashscreen

@andrii-i andrii-i added the bug label Jun 9, 2023
@andrii-i andrii-i added this to the 7.0 milestone Jun 9, 2023
@andrii-i andrii-i marked this pull request as ready for review June 9, 2023 02:26
activate: (app: JupyterFrontEnd) => {
const { restored } = app;
const splash = document.createElement('div');
splash.style.position = 'absolute';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Styling has to be inline or it does not load through on time

@andrii-i andrii-i requested a review from jtpio June 9, 2023 02:26
Copy link
Member

@jtpio jtpio left a comment

Choose a reason for hiding this comment

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

Thanks!

@jtpio jtpio merged commit bdcadda into jupyter:main Jun 9, 2023
24 checks passed
@andrii-i
Copy link
Contributor Author

andrii-i commented Jun 9, 2023

Thank you @jtpio

@andrii-i andrii-i deleted the add_blank_splashscreen branch June 9, 2023 06:05
jitseniesen added a commit to jitseniesen/spyder-notebook that referenced this pull request Jun 29, 2023
jitseniesen added a commit to jitseniesen/spyder-notebook that referenced this pull request Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flash of unstyled content when loading pages
2 participants