Skip to content

Commit 0eea422

Browse files
authored
Merge pull request #3674 from bollwyvl/gh-3656-follow-up
More docs updates
2 parents 6f6156c + 0a29514 commit 0eea422

25 files changed

+140
-87
lines changed

.binder/README

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
This directory holds configuration files for https://mybinder.org/.
22

33
The interactive notebooks can be accessed with this link:
4-
https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/master?filepath=docs/source/examples
4+
https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/main?filepath=docs/source/examples
55

6-
To check out a different version, just replace "master" with the desired
6+
To check out a different version, just replace `main` with the desired
77
branch/tag name or commit hash.
88

99
To use JupyterLab, use:
10-
https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/master?urlpath=lab/tree/docs/source/examples
10+
https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/main?urlpath=lab/tree/docs/source/examples

.github/workflows/binder-on-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
script: |
1919
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO;
2020
var PR_HEAD_REF = process.env.PR_HEAD_REF;
21-
github.issues.createComment({
21+
github.rest.issues.createComment({
2222
issue_number: context.issue.number,
2323
owner: context.repo.owner,
2424
repo: context.repo.repo,

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build jupyterlab_widgets
22

33
on:
44
push:
5-
branches: master
5+
branches: main
66
pull_request:
77
branches: '*'
88

.github/workflows/devinstall.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Run the dev-install script
22

33
on:
44
push:
5-
branches: master
5+
branches: main
66
pull_request:
77
branches: '*'
88

.github/workflows/packaging.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Packaging
22

33
on:
44
push:
5-
branches: [master]
5+
branches:
6+
- main
67
pull_request:
78
branches: '*'
89

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
| Purpose | Badges |
44
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
5-
| **Latest (master: future 8.0)** | [![Test Status](https://github.com/jupyter-widgets/ipywidgets/actions/workflows/tests.yml/badge.svg?query=branch%3Amaster)](https://github.com/jupyter-widgets/ipywidgets/actions?query=branch%3Amaster) [![Documentation Status: latest](https://img.shields.io/readthedocs/ipywidgets?logo=read-the-docs)](https://ipywidgets.readthedocs.io/en/latest/?badge=latest) [![Binder:master](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/master?urlpath=lab/tree/docs%2Fsource%2Fexamples) |
5+
| **Latest (`main`: future 8.0)** | [![Test Status](https://github.com/jupyter-widgets/ipywidgets/actions/workflows/tests.yml/badge.svg?query=branch%3Amain)](https://github.com/jupyter-widgets/ipywidgets/actions?query=branch%3Amain) [![Documentation Status: latest](https://img.shields.io/readthedocs/ipywidgets?logo=read-the-docs)](https://ipywidgets.readthedocs.io/en/latest/?badge=latest) [![Binder:main](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/main?urlpath=lab/tree/docs%2Fsource%2Fexamples) |
66
| **Stable** | [![Version](https://img.shields.io/pypi/v/ipywidgets.svg?logo=pypi)](https://pypi.python.org/pypi/ipywidgets) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/ipywidgets.svg?logo=conda-forge)](https://anaconda.org/conda-forge/ipywidgets) [![Documentation Status](https://img.shields.io/readthedocs/ipywidgets?logo=read-the-docs)](https://ipywidgets.readthedocs.io/en/stable/?badge=stable) [![Binder:7.x](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/7.x?urlpath=lab/tree/docs%2Fsource%2Fexamples) |
77
| **Communication** | [![Join the chat at https://gitter.im/ipython/ipywidgets](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jupyter-widgets/Lobby) [![Discourse](https://img.shields.io/badge/help_forum-discourse-blue?logo=discourse)](https://discourse.jupyter.org/c/widgets/46) |
88
| | |
99

1010
**ipywidgets**, also known as jupyter-widgets or simply widgets, are
11-
[interactive HTML widgets](https://github.com/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Index.ipynb)
11+
[interactive HTML widgets](https://github.com/jupyter-widgets/ipywidgets/blob/main/docs/source/examples/Index.ipynb)
1212
for Jupyter notebooks and the IPython kernel.
1313

1414
Notebooks come alive when interactive widgets are used. Users gain control of
@@ -21,7 +21,7 @@ ipywidgets to your notebooks, and we're here to help you get started.
2121
## Core Interactive Widgets
2222

2323
The fundamental widgets provided by this library are called core interactive
24-
widgets. A [demonstration notebook](https://github.com/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Index.ipynb)
24+
widgets. A [demonstration notebook](https://github.com/jupyter-widgets/ipywidgets/blob/main/docs/source/examples/Index.ipynb)
2525
provides an overview of the core interactive widgets, including:
2626

2727
- sliders
@@ -87,14 +87,14 @@ see the detailed [developer install](docs/source/dev_install.md) instructions.
8787

8888
If you want to install ipywidgets from source, **you will need the
8989
[yarn](https://yarnpkg.com/) package manager version 1.2.1 or later**.
90-
To install the latest master version from the root directory of the source
90+
To install the latest `main` version from the root directory of the source
9191
code, run `dev-install.sh`. To only build the Python package enter
9292
`pip install -e .`.
9393

9494
## Usage
9595

9696
See the [examples](docs/source/examples.md) section of the documentation. The widgets are being used in a variety of ways; some uses can be seen in these notebooks:
97-
[Demo notebook of interactive widgets](https://github.com/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Index.ipynb)
97+
[Demo notebook of interactive widgets](https://github.com/jupyter-widgets/ipywidgets/blob/main/docs/source/examples/Index.ipynb)
9898

9999
## Change log
100100

@@ -106,13 +106,13 @@ Refer to change log for more detail.
106106

107107
| ipywidgets | JupyterLab | [Classic Notebook](https://github.com/jupyter/notebook) | [nbclassic](https://github.com/jupyterlab/nbclassic) |
108108
| ---------- | :--------: | :-----------------------------------------------------: | :--------------------------------------------------: |
109-
| master | | - | TBD |
110-
| 7.6.3 | | | 0.2.6 |
109+
| `main` | | - | TBD |
110+
| `7.6.3` | | | 0.2.6 |
111111
| **Legacy** | | | |
112-
| 6.x | | | - |
113-
| 5.x | | 4.2 | - |
114-
| 4.1.x | | 4.1 | - |
115-
| 4.0.x | | 4.0 | - |
112+
| `6.x` | | | - |
113+
| `5.x` | | 4.2 | - |
114+
| `4.1.x` | | 4.1 | - |
115+
| `4.0.x` | | 4.0 | - |
116116

117117
## Contributing to ipywidgets
118118

docs/lite/jupyter_lite_config.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
"Layout Templates\\.ipynb",
66
"Variable Inspector\\.ipynb"
77
],
8-
"contents": ["../source/examples"],
8+
"contents": ["../source/examples"]
9+
},
10+
"PipliteAddon": {
911
"piplite_urls": [
10-
"../python/ipywidgets/dist",
11-
"../python/widgetsnbextension/dist",
12-
"../python/jupyterlab_widgets/dist"
12+
"../../python/ipywidgets/dist",
13+
"../../python/widgetsnbextension/dist",
14+
"../../python/jupyterlab_widgets/dist"
1315
]
1416
}
1517
}

docs/source/_static/theme.css

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
1-
.demo-sidebar .demo-title {
2-
font-size: var(--pst-sidebar-header-font-size);
3-
font-weight: var(--pst-sidebar-header-font-weight);
4-
margin-bottom: 0.5rem;
5-
}
6-
1+
/* index */
72
table.indextable tr.cap {
83
background-color: var(--pst-color-on-background) !important;
94
}
5+
6+
/* demo */
7+
#demo-sidebar {
8+
margin: 0;
9+
}
10+
11+
#demo-sidebar .demo-app {
12+
display: inline;
13+
display: flex;
14+
flex-direction: row;
15+
align-items: baseline;
16+
flex-wrap: wrap;
17+
margin: 0.75rem 0.25rem 0 0.25rem;
18+
}
19+
20+
.demo-app > * {
21+
flex: 1 auto;
22+
white-space: nowrap;
23+
}
24+
25+
#demo-sidebar .admonition-title::after {
26+
display: none;
27+
}
28+
29+
#demo-sidebar .admonition-title {
30+
padding-left: 0.75rem;
31+
}

docs/source/_templates/demo.html

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
<div class="demo-sidebar">
2-
<p class="demo-title" role="heading" aria-level="1">
3-
Try Jupyter Widgets <strong>Now</strong>
1+
<div id="demo-sidebar" class="admonition warning">
2+
<p class="demo-title admonition-title" role="heading" aria-level="1">
3+
<img src="https://jupyterlite.readthedocs.io/en/latest/_static/icon.svg" width="16" />
4+
Try Jupyter Widgets
45
</p>
56

6-
<div class="demo-app btn-group btn-group-toggle" data-toggle="buttons">
7-
<label class="btn btn-secondary active">
7+
<div class="demo-app">
8+
<label title="Try Widgets in a multi-document UI">
89
<input
910
type="radio"
1011
name="demo-app"
1112
autocomplete="off"
1213
checked
13-
title="Lab"
14-
value="{{ pathto('try/lab/index') }}?path=Index.ipynb&path=Widget%20List.ipynb"
14+
value="{{ pathto('try/lab/index') }}?path=Widget%20List.ipynb"
1515
>
1616
<i class="fas fa-flask"></i> Lab
1717
</label>
18-
<label class="btn btn-secondary">
18+
<label title="Try Widgets in a single-document UI">
1919
<input
2020
type="radio"
2121
name="demo-app"
22-
title="Notebook"
23-
value="{{ pathto('try/retro/index') }}?path=Index.ipynb&path=Widget%20List.ipynb"
22+
autocomplete="off"
23+
value="{{ pathto('try/retro/index') }}?path=Widget%20List.ipynb"
2424
>
2525
<i class="fas fa-book"></i> Notebook
2626
</label>
27+
<a
28+
href="{{ pathto('try/lab/index') }}?path=Widget%20List.ipynb"
29+
class="btn btn-primary"
30+
target="_blank"
31+
title="Try Jupyter Widgets in your browser."
32+
id="demo-button"
33+
>
34+
<i class="fas fa-play"></i>
35+
Try Now
36+
</a>
2737
</div>
2838

29-
<a
30-
href="{{ pathto('try/lab/index') }}?path=Index.ipynb&path=Widget%20List.ipynb"
31-
class="btn btn-primary"
32-
target="_blank"
33-
title="Try Jupyter Widgets in your browser."
34-
id="demo-button"
35-
>
36-
<i class="fas fa-play"></i>
37-
Try Now
38-
</a>
3939

4040
<script>$(function() {
4141
$('.demo-app input').on('change', (event) => {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<style>
2+
#bd-docs-nav .toctree-toggle,
3+
#bd-docs-nav .toctree-checkbox {
4+
display: none;
5+
}
6+
#bd-docs-nav .toctree-l1 > a{
7+
font-weight: bold;
8+
}
9+
</style>
10+
11+
<nav class="bd-links" id="bd-docs-nav" aria-label="{{ _('Documentation Contents') }}">
12+
<div class="bd-toc-item navbar-nav">
13+
<!-- Specify a startdepth of 0 instead of default of 1 -->
14+
{{ generate_toctree_html(
15+
"sidebar",
16+
startdepth=0,
17+
show_nav_level=4,
18+
maxdepth=4,
19+
collapse=False,
20+
includehidden=True,
21+
titles_only=False
22+
) }}
23+
</div>
24+
</nav>

0 commit comments

Comments
 (0)