Skip to content

Commit

Permalink
Fix CSS theme flickering on FAB pages (apache#5880)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
mistercrunch authored and kristw committed Sep 18, 2018
1 parent 4edab8c commit 789604e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion superset/templates/superset/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down

0 comments on commit 789604e

Please sign in to comment.