department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
97 stars 69 forks source link

Environment indicator color is slow to load #4761

Open kevwalsh opened 3 years ago

kevwalsh commented 3 years ago

Describe the defect

When loading a non-prod environment, the environment indicator appears blue (like prod) until the page is finished loading, and all js on the page, including node link / big pipe.

To Reproduce Steps to reproduce the behavior:

  1. Go to http://staging.cms.va.gov/node/15068
  2. Note the blue environment indicator is present until node link report is finished.

Expected behavior Environment indicator should display correctly (sasparilla on tugboat, green on local, purple on dev, yellow on staging)

Screenshots

COVID-19_vaccines_at_VA___Veterans_Affairs

acrollet commented 3 years ago

I have background on this issue, I believe it is happening because of bigpipe (the CSS/js that makes the switch is getting load asynchronously) - whatever solution we use, we want to make sure that we don't slow pageload times :-)