Skip to content

Commit 3686229

Browse files
authored
Add links to the examples and documentation contribution instructions (#741)
* Add links to the examples, some option values, documentation contribution instructions * Apply prettier
1 parent 64171d9 commit 3686229

File tree

7 files changed

+47
-0
lines changed

7 files changed

+47
-0
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,27 @@ To add an example to the static examples:
7676
- Add appropriate link in: `docs/source/examples.rst`
7777
- Add the example name to the `EXAMPLES` in `docs/source/conf.py`
7878
- Add `ignore-links` config in `package.json`
79+
80+
## Documentation
81+
82+
The documentation is built with [sphinx](https://www.sphinx-doc.org/en/master/)
83+
making use of the [PyData Sphinx theme](https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html).
84+
85+
To build it locally
86+
87+
- create and activate an isolated development environment with the necessary dependencies
88+
with
89+
90+
```bash
91+
conda env create -f docs/environment.yml
92+
conda activate lumino_documentation
93+
```
94+
95+
- build, for example the html version, with
96+
97+
```bash
98+
cd docs
99+
make html
100+
```
101+
102+
The HTML pages are then located in the `build/html` directory.

packages/datagrid/src/datagrid.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ import { TextRenderer } from './textrenderer';
5252
* the child widgets of a data grid directly is undefined behavior.
5353
*
5454
* This class is not designed to be subclassed.
55+
*
56+
* See also the related [example](../../examples/datagrid/index.html) and
57+
* its [source](https://github.com/jupyterlab/lumino/tree/main/examples/example-datagrid).
5558
*/
5659
export class DataGrid extends Widget {
5760
/**

packages/widgets/src/accordionpanel.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@ import { Widget } from './widget';
1515
*
1616
* #### Notes
1717
* This class provides a convenience wrapper around {@link AccordionLayout}.
18+
*
19+
* See also the related [example](../../examples/accordionpanel/index.html) and
20+
* its [source](https://github.com/jupyterlab/lumino/tree/main/examples/example-accordionpanel).
1821
*/
1922
export class AccordionPanel extends SplitPanel {
2023
/**
2124
* Construct a new accordion panel.
2225
*
2326
* @param options - The options for initializing the accordion panel.
27+
*
2428
*/
2529
constructor(options: AccordionPanel.IOptions = {}) {
2630
super({ ...options, layout: Private.createLayout(options) });

packages/widgets/src/boxpanel.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,17 @@ export namespace BoxPanel {
120120
/**
121121
* The layout direction of the panel.
122122
*
123+
* Possible values are documented in {@link BoxLayout.Direction}.
124+
*
123125
* The default is `'top-to-bottom'`.
124126
*/
125127
direction?: Direction;
126128

127129
/**
128130
* The content alignment of the panel.
129131
*
132+
* Possible values are documented in {@link BoxLayout.Alignment}.
133+
*
130134
* The default is `'start'`.
131135
*/
132136
alignment?: Alignment;

packages/widgets/src/dockpanel.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ import { Widget } from './widget';
3131

3232
/**
3333
* A widget which provides a flexible docking area for widgets.
34+
*
35+
* #### Notes
36+
* See also the related [example](../../examples/dockpanel/index.html) and
37+
* its [source](https://github.com/jupyterlab/lumino/tree/main/examples/example-dockpanel).
3438
*/
3539
export class DockPanel extends Widget {
3640
/**

packages/widgets/src/menubar.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ import { Widget } from './widget';
3333

3434
/**
3535
* A widget which displays menus as a canonical menu bar.
36+
*
37+
* #### Notes
38+
* See also the related [example](../../examples/menubar/index.html) and
39+
* its [source](https://github.com/jupyterlab/lumino/tree/main/examples/example-menubar).
3640
*/
3741
export class MenuBar extends Widget {
3842
/**

packages/widgets/src/splitlayout.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,13 +744,17 @@ export namespace SplitLayout {
744744
/**
745745
* The orientation of the layout.
746746
*
747+
* Possible values are documented in {@link SplitLayout.Orientation}.
748+
*
747749
* The default is `'horizontal'`.
748750
*/
749751
orientation?: Orientation;
750752

751753
/**
752754
* The content alignment of the layout.
753755
*
756+
* Possible values are documented in {@link SplitLayout.Alignment}.
757+
*
754758
* The default is `'start'`.
755759
*/
756760
alignment?: Alignment;

0 commit comments

Comments
 (0)