Skip to content

Commit 36e50a4

Browse files
authored
Merge pull request #2824 from umerhasan17/documentation
Documentation Fixes
2 parents 29ff441 + 1bbef3e commit 36e50a4

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

docs/source/embedding.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ This HTML snippet is composed of multiple `<script>` tags embedded into an HTML
5151

5252
- Then there are a number of script tags, each with mime type
5353
`application/vnd.jupyter.widget-view+json`, corresponding to the views which
54-
you want to display in the web page. These script tags must be in the body of
54+
you want to display on the web page. These script tags must be in the body of
5555
the page, and are replaced with the rendered widgets. The JSON schema for the
5656
content of these script tags is found in the `@jupyter-widgets/schema` npm
5757
package.
@@ -73,7 +73,7 @@ the `application/vnd.jupyter.widget-state+json` format specified in the
7373

7474
Embeddable code for the widgets can also be produced from Python. The
7575
`ipywidgets.embed` module provides several functions for embedding widgets
76-
into HTML documents programatically.
76+
into HTML documents programmatically.
7777

7878
Use `embed_minimal_html` to create a simple, stand-alone HTML page:
7979

docs/source/examples/Layout Example.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,4 +316,4 @@
316316
},
317317
"nbformat": 4,
318318
"nbformat_minor": 2
319-
}
319+
}

docs/source/examples/Layout Templates.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"source": [
77
"# Using Layout Templates\n",
88
"\n",
9-
"As we showed in [Layout and Styling of Jupyter widgets](Widget%20Styling.ipynb) multiple widgets can be aranged together using the flexible [GridBox](Widget%20Styling.ipynb#The-Grid-Layout) specification. However, use of the specification involves some understanding of CSS properties and may impose sharp learning curve. Here, we will describe layout templates built on top of `GridBox` that simplify creation of common widget layouts."
9+
"As we showed in [Layout and Styling of Jupyter widgets](Widget%20Styling.ipynb) multiple widgets can be arranged together using the flexible [GridBox](Widget%20Styling.ipynb#The-Grid-Layout) specification. However, use of the specification involves some understanding of CSS properties and may impose sharp learning curve. Here, we will describe layout templates built on top of `GridBox` that simplify creation of common widget layouts."
1010
]
1111
},
1212
{
@@ -43,7 +43,7 @@
4343
"cell_type": "markdown",
4444
"metadata": {},
4545
"source": [
46-
"You can easily create a layout with 4 widgets aranged on 2x2 matrix using the `TwoByTwoLayout` widget: "
46+
"You can easily create a layout with 4 widgets arranged on 2x2 matrix using the `TwoByTwoLayout` widget: "
4747
]
4848
},
4949
{
@@ -536,7 +536,7 @@
536536
"cell_type": "markdown",
537537
"metadata": {},
538538
"source": [
539-
"In this examples, we will demonstrate how to use `GridspecLayout` and `bqplot` widget to create a multipanel scatter plot. To run this example you will need to install the [bqplot](https://bqplot.readthedocs.io/en/latest/) package."
539+
"In these examples, we will demonstrate how to use `GridspecLayout` and `bqplot` widget to create a multipanel scatter plot. To run this example you will need to install the [bqplot](https://bqplot.readthedocs.io/en/latest/) package."
540540
]
541541
},
542542
{
@@ -715,4 +715,4 @@
715715
},
716716
"nbformat": 4,
717717
"nbformat_minor": 4
718-
}
718+
}

docs/source/examples/Widget Low Level.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"cell_type": "markdown",
5050
"metadata": {},
5151
"source": [
52-
"Jupyter interactive widgets are interactive elements, think sliders, textboxes, buttons, that have representations both in the kernel (place where code is executed) and the front-end (the Notebook web interface). To do this, a clean, well abstracted communication layer must exist."
52+
"Jupyter interactive widgets are interactive elements, think sliders, text boxes, buttons, that have representations both in the kernel (place where code is executed) and the front-end (the Notebook web interface). To do this, a clean, well-abstracted communication layer must exist."
5353
]
5454
},
5555
{
@@ -92,7 +92,7 @@
9292
"cell_type": "markdown",
9393
"metadata": {},
9494
"source": [
95-
"Using comms, the widget base layer is designed to keep state in sync. In the kernel, a Widget instance exists. This Widget instance has a corresponding WidgetModel instance in the front-end. The Widget and WidgetModel store the same state. The widget framework ensures both models are kept in sync with eachother. If the WidgetModel is changed in the front-end, the Widget receives the same change in the kernel. Vise versa, if the Widget in the kernel is changed, the WidgetModel in the front-end receives the same change. There is no single source of truth, both models have the same precedence. Although a notebook has the notion of cells, neither Widget or WidgetModel are bound to any single cell."
95+
"Using comms, the widget base layer is designed to keep state in sync. In the kernel, a Widget instance exists. This Widget instance has a corresponding WidgetModel instance in the front-end. The Widget and WidgetModel store the same state. The widget framework ensures both models are kept in sync with each other. If the WidgetModel is changed in the front-end, the Widget receives the same change in the kernel. Vice versa, if the Widget in the kernel is changed, the WidgetModel in the front-end receives the same change. There is no single source of truth, both models have the same precedence. Although a notebook has the notion of cells, neither Widget or WidgetModel are bound to any single cell."
9696
]
9797
},
9898
{
@@ -233,7 +233,7 @@
233233
}
234234
},
235235
"source": [
236-
"The WidgetModel class is specified by module and name. Require.js is then used to asynchronously load the WidgetModel class. The message triggers a comm to be created in the front-end with same GUID as the back-end. Then, the new comm gets passed into the WidgetManager in the front-end, which creates an instance of the WidgetModel class, linked to the comm. Both the Widget and WidgetModel repurpose the comm GUID as their own."
236+
"The WidgetModel class is specified by module and name. Require.js is then used to asynchronously load the WidgetModel class. The message triggers a comm to be created in the front-end with the same GUID as the back-end. Then, the new comm gets passed into the WidgetManager in the front-end, which creates an instance of the WidgetModel class, linked to the comm. Both the Widget and WidgetModel repurpose the comm GUID as their own."
237237
]
238238
},
239239
{
@@ -251,7 +251,7 @@
251251
}
252252
},
253253
"source": [
254-
"Asynchronously, the kernel sends an initial state push, containing all of the initial state of the Widget, to the front-end, immediately after the comm-open message. This state message may or may not be received by the time the WidgetModel is constructed. Regardless, the message is cached and gets processed once the WidgetModel has been constructed. The initial state push is what causes the WidgetModel in the front-end to become in sync with the Widget in the kernel."
254+
"Asynchronously, the kernel sends an initial state push, containing the initial state of the Widget, to the front-end, immediately after the comm-open message. This state message may or may not be received by the time the WidgetModel is constructed. Regardless, the message is cached and gets processed once the WidgetModel has been constructed. The initial state push is what causes the WidgetModel in the front-end to become in sync with the Widget in the kernel."
255255
]
256256
},
257257
{
@@ -407,7 +407,7 @@
407407
"\n",
408408
"### Custom serialization and de-serialization on the Python side\n",
409409
"\n",
410-
"In many cases, a custom serialization must be specified for trait attributes. For example\n",
410+
"In many cases, a custom serialization must be specified for trait attributes. For example,\n",
411411
"\n",
412412
" - if the trait attribute is not json serializable\n",
413413
" - if the trait attribute contains data that is not needed by the JavaScript side.\n",
@@ -429,7 +429,7 @@
429429
"\n",
430430
"where `datetime_to_json(value, widget)` and `datetime_from_json(value, widget)` return or handle json data-structures that are amenable to the front-end.\n",
431431
"\n",
432-
"**The case of parent child relationships between widget models**\n",
432+
"**The case of parent-child relationships between widget models**\n",
433433
"\n",
434434
"When a widget model holds other widget models, you must use the serializers and deserializers provided in ipywidgets packed into the `widget_serialization` dictionary.\n",
435435
"\n",
@@ -480,7 +480,7 @@
480480
"cell_type": "markdown",
481481
"metadata": {},
482482
"source": [
483-
"Because the API of any given widget **must exist in the kernel**, the kernel is the natural place for widgets to be installed. However, **kernels, as of now, don’t host static assets**. Instead, static assets are hosted by the webserver, which is the entity that sits between the kernel and the front-end. This is a problem, because it means widgets have components that need to be **installed both in the webserver and the kernel**. The kernel components are easy to install, because you can rely on the language’s built in tools. The static assets for the webserver complicate things, because an extra step is required to let the webserver know where the assets are."
483+
"Because the API of any given widget **must exist in the kernel**, the kernel is the natural place for widgets to be installed. However, **kernels, as of now, don’t host static assets**. Instead, static assets are hosted by the webserver, which is the entity that sits between the kernel and the front-end. This is a problem because it means widgets have components that need to be **installed both in the webserver and the kernel**. The kernel components are easy to install, because you can rely on the language’s built-in tools. The static assets for the webserver complicate things, because an extra step is required to let the webserver know where the assets are."
484484
]
485485
},
486486
{
@@ -498,7 +498,7 @@
498498
"cell_type": "markdown",
499499
"metadata": {},
500500
"source": [
501-
"In the case of the classic Jupyter notebook, static assets are made available to the Jupyter notebook in the form of a Jupyter extensions. JavaScript bundles are copied in a directory accessible through the `nbextensions/` handler. Nbextensions also have a mechanism for running your code on page load. This can be set using the install-nbextension command."
501+
"In the case of the classic Jupyter notebook, static assets are made available to the Jupyter notebook in the form of a Jupyter extension. JavaScript bundles are copied in a directory accessible through the `nbextensions/` handler. Nbextensions also have a mechanism for running your code on page load. This can be set using the install-nbextension command."
502502
]
503503
},
504504
{
@@ -548,4 +548,4 @@
548548
},
549549
"nbformat": 4,
550550
"nbformat_minor": 2
551-
}
551+
}

0 commit comments

Comments
 (0)