You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/examples/Layout Templates.ipynb
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
"source": [
7
7
"# Using Layout Templates\n",
8
8
"\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."
10
10
]
11
11
},
12
12
{
@@ -43,7 +43,7 @@
43
43
"cell_type": "markdown",
44
44
"metadata": {},
45
45
"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: "
47
47
]
48
48
},
49
49
{
@@ -536,7 +536,7 @@
536
536
"cell_type": "markdown",
537
537
"metadata": {},
538
538
"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."
Copy file name to clipboardExpand all lines: docs/source/examples/Widget Low Level.ipynb
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@
49
49
"cell_type": "markdown",
50
50
"metadata": {},
51
51
"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, wellabstracted 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."
53
53
]
54
54
},
55
55
{
@@ -92,7 +92,7 @@
92
92
"cell_type": "markdown",
93
93
"metadata": {},
94
94
"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."
96
96
]
97
97
},
98
98
{
@@ -233,7 +233,7 @@
233
233
}
234
234
},
235
235
"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."
237
237
]
238
238
},
239
239
{
@@ -251,7 +251,7 @@
251
251
}
252
252
},
253
253
"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."
255
255
]
256
256
},
257
257
{
@@ -407,7 +407,7 @@
407
407
"\n",
408
408
"### Custom serialization and de-serialization on the Python side\n",
409
409
"\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",
411
411
"\n",
412
412
" - if the trait attribute is not json serializable\n",
413
413
" - if the trait attribute contains data that is not needed by the JavaScript side.\n",
@@ -429,7 +429,7 @@
429
429
"\n",
430
430
"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",
431
431
"\n",
432
-
"**The case of parentchild relationships between widget models**\n",
432
+
"**The case of parent-child relationships between widget models**\n",
433
433
"\n",
434
434
"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",
435
435
"\n",
@@ -480,7 +480,7 @@
480
480
"cell_type": "markdown",
481
481
"metadata": {},
482
482
"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 builtin 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."
484
484
]
485
485
},
486
486
{
@@ -498,7 +498,7 @@
498
498
"cell_type": "markdown",
499
499
"metadata": {},
500
500
"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."
0 commit comments