ansible-community / ara

ARA Records Ansible and makes it easier to understand and troubleshoot.
https://ara.recordsansible.org
GNU General Public License v3.0
1.86k stars 173 forks source link

dark mode "flashing" when sorting by duration in light mode #545

Open evgeni opened 6 months ago

evgeni commented 6 months ago

What is the issue ?

Screencast from 2024-04-29 18-47-51.webm

What should be happening ?

No flashing. Doesn't happen in darkmode

dmsimard commented 6 months ago

Hi @evgeni and thanks for another good find.

I don't know the fix for this one yet but it likely resides within how we select and load the light or dark bootstrap theme within theme.js: https://github.com/ansible-community/ara/blob/master/ara/ui/static/js/theme.js

We load the css files: https://github.com/ansible-community/ara/blob/8eda9c87086a289cf9bf41a2d4cc4060e2d50ad7/ara/ui/templates/base.html#L16-L21

And then we use theme.js to select the theme here: https://github.com/ansible-community/ara/blob/8eda9c87086a289cf9bf41a2d4cc4060e2d50ad7/ara/ui/templates/base.html#L88-L89

dmsimard commented 6 months ago

https://github.com/twbs/bootstrap/issues/37774 suggests that the javascript theme selection should run as early as possible (instead of at the end of the body like we are doing now) and made blocking in order to resolve or mitigate the issue.

I can look into this eventually if no one gets to it first.