superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Fix CSS theme flickering on FAB pages (#5880)
Date Thu, 13 Sep 2018 00:21:27 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 80faa8d  Fix CSS theme flickering on FAB pages (#5880)
80faa8d is described below

commit 80faa8df8031a68c49ac518ee44806b6043013e3
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Wed Sep 12 17:21:24 2018 -0700

    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 500ed0f..f974348 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') %}
       <script src="{{ entry }}"></script>
     {% endfor %}
+  {% endblock %}
+
+  {% block tail_js %}
+    {{super()}}
     {% for entry in js_manifest('common') %}
       <script src="{{ entry }}"></script>
     {% endfor %}


Mime
View raw message