From 80faa8df8031a68c49ac518ee44806b6043013e3 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Wed, 12 Sep 2018 17:21:24 -0700 Subject: [PATCH] Fix CSS theme flickering on FAB pages (#5880) 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. --- superset/templates/superset/base.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/superset/templates/superset/base.html b/superset/templates/superset/base.html index 500ed0f87aeda..f974348b841a6 100644 --- a/superset/templates/superset/base.html +++ b/superset/templates/superset/base.html @@ -8,11 +8,15 @@ {% endfor %} {% endblock %} - {% block tail_js %} + {% block head_js %} {{super()}} {% for entry in js_manifest('theme') %} {% endfor %} + {% endblock %} + + {% block tail_js %} + {{super()}} {% for entry in js_manifest('common') %} {% endfor %}