Canary "next" badge flashes on page load
The next badge in the header indicates that you're using Gitlab's canary version.
Currently, its visibility is toggled on the client-side: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/assets/javascripts/main.js#L147
The cookie itself is defined when toggling canary on or off at https://next.gitlab.com/
The fact that the badge's visibility is toggled on the client-side causes some flashes in the frontend:
A way of fixing this would be to:
- Set the cookie on the server-side
- Do the cookie check on the server-side and set a class (eg.
.canary-enabled) where appropriate (body/header/...) when rendering pages - Toggle the badge's visibility with CSS
- Cleanup Js responsible for toggling the visibility as it won't be needed anymore