Closed DiegoF90 closed 12 months ago
cc. @maartenbreddels
Please let me know if I can provide more information to pinpoint the issue. I am happy with any workaround too. thnx
Very strange behaviour! I guess this is an ipyaggrid issue. @martinRenou do you have an idea how this can be triggered?
I just looked into the ipyaggrid codebase. It seems it's pulling the entire ipywidgets + JupyterLab CSS variables styling: https://github.com/widgetti/ipyaggrid/tree/master/js/src/styles/ipywidgets
That's probably how it overwrites it?
This seems to happen during the Grid construction, I have tried setting the flag "--VoilaConfiguration.allow_theme_override=NOTEBOOK" but the theme is still changed.
I seem to be able to force it not to override the style by explicitly running something like:
from IPython.core.display import display, HTML
display(HTML("""
<style>
body {
background: black !important;
color: white !important;
}
pre {
background: black !important;
color: white !important;
}
</style>
"""))
So I could set the dark theme explicitly and avoid ipyaggrid changing it. Is there a place I could find the body, div, etc values used by Voila's dark theme?
@maartenbreddels I raised 40 on ipyaggrid a few weeks ago, in case you are able to provide any help there?
I just looked into the ipyaggrid codebase. It seems it's pulling the entire ipywidgets + JupyterLab CSS variables styling: https://github.com/widgetti/ipyaggrid/tree/master/js/src/styles/ipywidgets
That's probably how it overwrites it?
Ok, good to know it's an ipyaggrid issue! Let move over to #40
Description
I have a voila that displays an AG Grid, as soon as the table is created the Voila theme is changed.
Reproduce
See below minimal reproducible example. As can be seen, the Voila page is initially shown with a dark background, after 10 seconds the page automatically turns into white background (as soon as the AG Grid is constructed).
Python 3.8.10
jupyter == 1.0.0
voila == 0.4.0
ipyaggrid == 0.4.0