Skip to content

Commit

Permalink
fix: height and spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
mariobuikhuizen committed Jul 2, 2024
1 parent a829df0 commit ee95654
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
10 changes: 10 additions & 0 deletions jdaviz/solara.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.solara-content-main {
padding-top: 0 !important;
}
.widget-output {
margin: 0;
}
.v-content.jdaviz__content--not-in-notebook {
height: 100vh;
max-height: 100vh;
}
11 changes: 4 additions & 7 deletions jdaviz/solara.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import os
from pathlib import Path

import solara
import ipygoldenlayout
import ipysplitpanes
Expand Down Expand Up @@ -28,6 +30,8 @@ def Page():

ipyvue.register_component_from_file('g-viewer-tab', "container.vue", jdaviz.__file__)

solara.Style(Path(__file__).parent / "solara.css")

Check warning on line 33 in jdaviz/solara.py

View check run for this annotation

Codecov / codecov/patch

jdaviz/solara.py#L33

Added line #L33 was not covered by tests

if not len(data_list):
from jdaviz.core.launcher import Launcher
launcher = Launcher(height='100%', filepath=(data_list[0] if len(data_list) == 1 else ''))
Expand All @@ -42,11 +46,4 @@ def Page():
else:
viz.load_data(data, **load_data_kwargs)

viz.app.template.template = viz.app.template.template.replace(
'calc(100% - 48px);', '800px' # '80vh !important;'
)

height = '800px'
viz.app.layout.height = height
viz.app.state.settings['context']['notebook']['max_height'] = height
solara.display(viz.app)
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ jdaviz = [
"data/*",
"data/*/*",
"*.vue",
"*.css",
"components/*.vue",
"configs/*/*/*/*.vue",
"configs/*/*.yaml",
Expand Down

0 comments on commit ee95654

Please sign in to comment.