Skip to content

Commit 9723830

Browse files
committed
Fixes for migration docs
1 parent 056f1d1 commit 9723830

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

docs/source/migration_guides.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ The ``DOMWidgetView.processPhosphorMessage`` method has been renamed ``DOMWidget
117117
+ }
118118
```
119119

120-
I you're dropping ipywidgets 7.x support, you can simply rename the `processPhosphorMessage` method into `processLuminoMessage`.
120+
If you're dropping ipywidgets 7.x support, you can simply rename the `processPhosphorMessage` method into `processLuminoMessage`.
121121

122122
#### Widget manager import
123123

@@ -128,7 +128,7 @@ As mentioned before, if you depend on the ``ManagerBase`` class, you will **eith
128128
+ import { ManagerBase } from '@jupyter-widgets/base-manager';
129129
```
130130

131-
**or**, siwtch to using the new `IWidgetManager` interface in the `base` package:
131+
**or**, switch to using the new `IWidgetManager` interface in the `base` package:
132132

133133
```diff
134134
- import { ManagerBase } from '@jupyter-widgets/base';
@@ -153,7 +153,7 @@ export async function myDeserializer(
153153

154154
#### Backbone extend
155155

156-
The version of backbone that ipywidgets depend on has changed from 1.2.3 to 1.4.0. If you were extending the base widget model with `var CustomWidgetModel = Widget.extend({ ... });` you will need to update the class definition using the ES6 notation:
156+
The version of [Backbone.js](https://backbonejs.org/) that ipywidgets depends on has changed from 1.2.3 to 1.4.0. If you were extending the base widget model with `var CustomWidgetModel = Widget.extend({ ... });` you will need to update the class definition using the ES6 notation:
157157

158158
```diff
159159
- var CustomWidgetModel = Widget.extend({
@@ -166,6 +166,18 @@ The version of backbone that ipywidgets depend on has changed from 1.2.3 to 1.4.
166166

167167
Note: If you were relying on setting certain instance attributes via the `extend` method, you might now need override the `preinitialize` method in order for their values to be set in time.
168168

169+
#### Custom tag names
170+
171+
If you were changing the base HTML tag by defining the `tagName` property, this can now be done in the `preinitialize` method (see https://github.com/jupyter-widgets/ipywidgets/commit/a342e0dbc7c779bb668e5a21c097d7cec9a6ac44 for example changes in core widgets):
172+
173+
```diff
174+
- get tagName() {
175+
- return 'button';
176+
- }
177+
+ preinitialize() {
178+
+ this.tagName = 'button';
179+
+ }
180+
```
169181

170182
Migrating from 6.0 to 7.0
171183
-------------------------

0 commit comments

Comments
 (0)