From a1dc8ce09172b72ad40436785c23f6278388e769 Mon Sep 17 00:00:00 2001 From: superstar54 Date: Fri, 10 Jan 2025 07:41:26 +0000 Subject: [PATCH] Adjust style as suggestion from review --- calculation_history.ipynb | 4 +++- src/aiidalab_qe/app/utils/search_jobs.py | 19 +++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/calculation_history.ipynb b/calculation_history.ipynb index 8d66a1dde..11a1130ff 100644 --- a/calculation_history.ipynb +++ b/calculation_history.ipynb @@ -49,7 +49,9 @@ "from aiidalab_qe.app.static import templates\n", "from aiidalab_qe.common.infobox import InfoBox\n", "\n", - "title = ipw.HTML(\"

🎉 Calculation history 🎉

\")\n", + "title = ipw.HTML(\n", + " \"

Calculation history

\", layout=ipw.Layout(margin=\"0 0 15px 0\")\n", + ")\n", "env = Environment()\n", "guide_template = (\n", " files(templates).joinpath(\"calculation_history_guide.jinja\").read_text()\n", diff --git a/src/aiidalab_qe/app/utils/search_jobs.py b/src/aiidalab_qe/app/utils/search_jobs.py index 4c1bc92bc..9ef4df650 100644 --- a/src/aiidalab_qe/app/utils/search_jobs.py +++ b/src/aiidalab_qe/app/utils/search_jobs.py @@ -232,7 +232,6 @@ def setup_widgets(self): self.job_state_dropdown.observe(self.apply_filters, names="value") display_options = ipw.VBox( children=[ - ipw.HTML("

Display options:

"), ipw.VBox( children=[ self.toggle_time_format, @@ -240,7 +239,14 @@ def setup_widgets(self): # self.toggle_multi_selection, ] ), - ipw.HTML("

Filters:

"), + ], + layout=ipw.Layout( + border="1px solid lightgray", + padding="0.5em", + ), + ) + filters = ipw.VBox( + children=[ ipw.VBox( children=[ self.job_state_dropdown, @@ -251,7 +257,8 @@ def setup_widgets(self): self.properties_box, ], layout=ipw.Layout( - border="1px solid #ddd", # fmt: off + border="1px solid lightgray", # fmt: off + padding="0.5em", margin="5px", ), ), @@ -259,12 +266,16 @@ def setup_widgets(self): ), ], layout=ipw.Layout( - border="1px solid #ddd", + border="1px solid lightgray", + padding="0.5em", ), ) self.main.children = [ + ipw.HTML("

Display options:

"), display_options, + ipw.HTML("

Filters:

"), + filters, self.table, ] self.update_table_value(self.df)