-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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 CSS theme flickering on FAB pages #5880
Conversation
Since the recent PRs around webpack 4 and reloading, FAB pages have been flickering on load, where a themeless Superset is shown for a fraction of a second until the bootstrap theme gets loaded up. This addresses it by moving the theme JS to the head section of the html page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! I just started noticing this.
lgtm
Since you are at this. There is another issue about the entry point. Right now there are duplicate For example in the <script src="/static/assets/dist/vendors-addSlice-common-dashboard-explore-profile-sqllab-theme-welcome.0fe210d7.chunk.js"></script>
<script src="/static/assets/dist/vendors-dashboard-explore-profile-sqllab-theme-welcome.0fe210d7.chunk.js"></script>
<script src="/static/assets/dist/theme.0fe210d7.entry.js"></script>
<script src="/static/assets/dist/vendors-addSlice-common-dashboard-explore-profile-sqllab-theme-welcome.0fe210d7.chunk.js"></script>
<script src="/static/assets/dist/vendors-addSlice-common-dashboard-explore-profile-sqllab-welcome.0fe210d7.chunk.js"></script>
<script src="/static/assets/dist/addSlice-common-dashboard-explore-profile-sqllab-welcome.0fe210d7.chunk.js"></script>
<script src="/static/assets/dist/common.0fe210d7.entry.js"></script> Because each entry in the js manifest lists an array of chunks each entry point needs, independent of other entry points. When we render this directly to FAB template, it does not de-dup. XHR Performance-wise not too bad as browser only fetches and parses once, but for correctness, if the chunk executes something, it executes multiple time. I can open a separate issue if you think this is too big. |
I'll just land this for now as my goal was just to get rid of the flickering. |
Since the recent PRs around webpack 4 and reloading, FAB pages have been flickering on load, where a themeless Superset is shown for a fraction of a second until the bootstrap theme gets loaded up. This addresses it by moving the theme JS to the head section of the html page. (cherry picked from commit 80faa8d)
Since the recent PRs around webpack 4 and reloading, FAB pages have been flickering on load, where a themeless Superset is shown for a fraction of a second until the bootstrap theme gets loaded up. This addresses it by moving the theme JS to the head section of the html page.
Since the recent PRs around webpack 4 and reloading, FAB pages have been flickering on load, where a themeless Superset is shown for a fraction of a second until the bootstrap theme gets loaded up. This addresses it by moving the theme JS to the head section of the html page.
Since the recent PRs around webpack 4 and reloading, FAB pages have been
flickering on load, where a themeless Superset is shown for a fraction
of a second until the bootstrap theme gets loaded up.
This addresses it by moving the theme JS to the head section of the html
page.
related to #5813
@williaster @kristw @betodealmeida