Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

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.
  • Loading branch information
mistercrunch authored Sep 13, 2018
1 parent 620beed commit 80faa8d
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 80faa8d

Please sign in to comment.