Skip to content

Commit

Permalink
Fix dark theme (#923)
Browse files Browse the repository at this point in the history
Co-authored-by: Philipp Rudiger <[email protected]>
  • Loading branch information
ahuang11 and philippjfr authored Jan 8, 2025
1 parent 96dc70f commit 5d802d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lumen/ai/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
.gutter {
background-color: #eee;
background-color: var(--panel-surface-color);
background-repeat: no-repeat;
background-position: 50%;
cursor: col-resize;
Expand Down
9 changes: 6 additions & 3 deletions lumen/ai/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import param
import yaml

from panel.config import config
from panel.layout import Column, Row, Tabs
from panel.pane import Alert
from panel.param import ParamMethod
Expand All @@ -14,14 +15,13 @@
)
from param.parameterized import discard_events

from lumen.ai.utils import get_data

from ..base import Component
from ..dashboard import load_yaml
from ..downloads import Download
from ..pipeline import Pipeline
from ..transforms.sql import SQLLimit
from ..views.base import Table
from .utils import get_data


class LumenOutput(Viewer):
Expand All @@ -48,7 +48,10 @@ def __init__(self, **params):
params['spec'] = yaml.dump(component_spec)
super().__init__(**params)
code_editor = CodeEditor(
value=self.param.spec, language=self.language, theme='tomorrow_night_bright', sizing_mode="stretch_both",
value=self.param.spec,
language=self.language,
theme="tomorrow_night" if config.theme == "dark" else "tomorrow",
sizing_mode="stretch_both",
on_keyup=False
)
code_editor.link(self, bidirectional=True, value='spec')
Expand Down

0 comments on commit 5d802d8

Please sign in to comment.