Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dark theme #923

Merged
merged 2 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading