Skip to content

Commit

Permalink
more form
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl committed Dec 2, 2023
1 parent bfab4e0 commit 8d7e1ba
Show file tree
Hide file tree
Showing 11 changed files with 818 additions and 538 deletions.
25 changes: 20 additions & 5 deletions docs/_static/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
--jpyk-color-jupyter-orange: #f37726;
}

html[data-theme="light"],
html[data-theme="dark"] {
--pst-color-primary: #9556cf;
}

html[data-theme="dark"] {
--pst-color-border: #444;
}
Expand Down Expand Up @@ -128,16 +123,36 @@ form#propose textarea {
width: 100%;
min-height: 10rem;
}
form#propose textarea:placeholder-shown ~ button {
display: none;
}
/* form main */
.show-repo-label {
padding-right: 1rem;
}

form#new input[type="text"] {
width: 100%;
}

form#new select {
width: 100%;
height: 2rem;
}

form#new code {
text-wrap: nowrap;
}

form#new input[id*="merge_with"] {
word-wrap: break-word;
word-break: break-all;
}

form#new table {
width: 100%;
}

form#new table label {
display: block;
}
Expand Down
32 changes: 14 additions & 18 deletions docs/_templates/new-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
.bd-sidebar-primary {
padding-bottom: 0;
}
h1 {
display: none;
}
footer {
display: none;
}
Expand All @@ -24,15 +21,16 @@
</div>
<div class="work-sidebar-content">
<form id="propose" method="get" action="https://github.com/deathbeds/jupyak/new/main" target="_blank">
<div>
<label for="toml-preview"><code>jupyak_config.toml</code> contents</label>
<textarea
id="toml-preview"
name="value"
spellcheck="false"
># make choices in the form</textarea>
<input type="hidden" name="filename" value="jupyak_config.toml"/>
</div>
<label for="toml-preview"><code>jupyak_config.toml</code> contents</label>
<textarea
required="true"
id="toml-preview"
name="value"
spellcheck="false"
placeholder="# make choices in the form"
></textarea>
<input type="hidden" name="filename" value="jupyak_config.toml"/>
<br/>
<button class="btn btn-success" form="propose">
<i class="fas fa-code-pull-request"></i> New Pull Request
</button>
Expand All @@ -50,9 +48,9 @@
document.addEventListener('DOMContentLoaded', async () => {
const form = document.querySelector('form#new');
const preview = document.querySelector('#toml-preview');
const selector = 'form#new input[type="text"], form#new textarea'
const selector = 'form#new input[type="text"], form#new select';
const inputs = [...document.querySelectorAll(selector)];
const split_fields = ['merge_with'];
const split_fields = ['merge_with', 'merge_options'];
async function update() {
const json2toml = (await import('json2toml')).default;
const config = find_config();
Expand All @@ -65,8 +63,6 @@
if(document.querySelector(`input[name="${name}"]:invalid`)) {
continue
}
const input = document.querySelector(`input[name="${name}"]`);
const prefix = input.dataset.jpykPrefix || "";
let bits = name.split("|");
if(value.trim() === "" || bits.length == 1){
continue;
Expand All @@ -81,8 +77,8 @@
let last_bit = bits[bits.length - 1];
current[last_bit] = (
split_fields.includes(last_bit) ?
value.split(/[\s\n]+/).map((v) => `${prefix}${v}`) :
prefix + value
value.split(/[\s\n]+/):
value
);
}
return config;
Expand Down
16 changes: 6 additions & 10 deletions docs/graph.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
html_theme.sidebar_secondary.remove: true
---

# task graph
# graph


The graph below shows the current state of the executed graph of tasks to go from
Expand Down Expand Up @@ -338,10 +334,10 @@ subgraph jupyterlab
shave:git:jupyterlab:fetch:pr-15347[("`✅ **fetch pr-15347**`")]:::git
shave:git:jupyterlab:checkout[("`✅ **checkout**`")]:::git
shave:js:jupyterlab:yarn:install{{"`✅ **yarn install**`"}}:::js
shave:js:jupyterlab:yarn:buildutils:.{{"` **yarn buildutils .**`"}}:::js
shave:js:jupyterlab:yarn:builder:.{{"` **yarn builder .**`"}}:::js
shave:js:jupyterlab:yarn:build:metapackage{{"` **yarn build metapackage**`"}}:::js
shave:js:jupyterlab:yarn:build:prod:dev_mode{{"` **yarn build prod dev_mode**`"}}:::js
shave:js:jupyterlab:yarn:buildutils:.{{"`💭 **yarn buildutils .**`"}}:::js
shave:js:jupyterlab:yarn:builder:.{{"`💭 **yarn builder .**`"}}:::js
shave:js:jupyterlab:yarn:build:metapackage{{"`💭 **yarn build metapackage**`"}}:::js
shave:js:jupyterlab:yarn:build:prod:dev_mode{{"`💭 **yarn build prod dev_mode**`"}}:::js
shave:js:jupyterlab:dist{{"`✅ **dist**`"}}:::js
shave:py:jupyterlab:pip:jupyterlab["`✅ **pip jupyterlab**`"]:::py
end
Expand Down Expand Up @@ -478,7 +474,7 @@ subgraph ipywidgets
shave:py:ipywidgets:pip:jupyterlab_widgets["`✅ **pip jupyterlab_widgets**`"]:::py
shave:py:ipywidgets:wheel:jupyterlab_widgets["`✅ **wheel jupyterlab_widgets**`"]:::py
shave:py:ipywidgets:pip:widgetsnbextension["`✅ **pip widgetsnbextension**`"]:::py
shave:py:ipywidgets:labext:jupyterlab_widgets(["`💭 **labext jupyterlab_widgets**`"]):::jupyter
shave:py:ipywidgets:labext:jupyterlab_widgets(["` **labext jupyterlab_widgets**`"]):::jupyter
end
subgraph jupyterlite
shave:git:jupyterlite:init[("`✅ **init**`")]:::git
Expand Down
5 changes: 2 additions & 3 deletions docs/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
"id": "e495cdca-bdc6-4ab4-9a42-69d3c7d9cde6",
"metadata": {},
"source": [
"\n",
"## documentation contents\n",
"\n",
"```{toctree}\n",
":maxdepth: 2\n",
"new\n",
"graph\n",
"work\n",
"new\n",
"```\n"
"```"
]
}
],
Expand Down
Loading

0 comments on commit 8d7e1ba

Please sign in to comment.