From 7a0b9219026499ce05a79f43d55462f8b859e5ce Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Tue, 9 Aug 2022 02:10:32 -0600 Subject: [PATCH] Update changelog and migration guide to suggest adapting changes from the new cookiecutter. --- docs/source/changelog.md | 6 +++++- docs/source/migration_guides.md | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/source/changelog.md b/docs/source/changelog.md index 1bf7504520..14d0981ea8 100644 --- a/docs/source/changelog.md +++ b/docs/source/changelog.md @@ -7,6 +7,10 @@ This is a summary of changes in ipywidgets releases. For more detailed informati To see the full list of pull requests and issues, see the [8.0 milestone](https://github.com/jupyter-widgets/ipywidgets/milestone/30?closed=1) on GitHub, or the [full list of changes since 7.x](https://github.com/jupyter-widgets/ipywidgets/compare/7.x...master). +See the [user migration guide](./user_migration_guides.md) for suggestions about migrating your code that uses ipywidgets to 8.0. + +If you author a custom widget, please see the [migration guide](./migration_guides.md) for suggestions about migrating your widget to support ipywidgets 8. + ### Users Here are some highlights of user-visible changes in ipywidgets 8.0. @@ -117,7 +121,7 @@ We have made it easier to load widgets from content delivery networks. - The default CDN is changed from unpkg to jsDelivr ([#3121](https://github.com/jupyter-widgets/ipywidgets/pull/3121), [#1627](https://github.com/jupyter-widgets/ipywidgets/issues/1627)) - You can use the `data-jupyter-widgets-cdn-only` attribute to load modules only from CDN ([#2792](https://github.com/jupyter-widgets/ipywidgets/pull/2792), [#2786](https://github.com/jupyter-widgets/ipywidgets/issues/2786)) -- We have updated the webpack public path settings so the HTMLManager and the Jupyter Notebook extensions pull assets from wherever they are loaded, rather than only from CDN. [#3464](https://github.com/jupyter-widgets/ipywidgets/pull/3464), [#3508](https://github.com/jupyter-widgets/ipywidgets/pull/3508) +- We have updated the webpack public path settings so the HTMLManager and the Jupyter Notebook extensions pull assets from wherever they are loaded, rather than only from CDN. If you author a custom widget, we highly encourage you to apply similar changes to your widget by adapting the changes at https://github.com/jupyter-widgets/widget-cookiecutter/pull/103/files. [#3464](https://github.com/jupyter-widgets/ipywidgets/pull/3464), [#3508](https://github.com/jupyter-widgets/ipywidgets/pull/3508) #### Other changes diff --git a/docs/source/migration_guides.md b/docs/source/migration_guides.md index bf84f441b8..1328a156c6 100644 --- a/docs/source/migration_guides.md +++ b/docs/source/migration_guides.md @@ -27,6 +27,8 @@ than one that contains widgets that you instantiated with ipywidgets 7.x. For a summarized list of relevant changes, please consult the "Developers" section of the [changelog](./changelog). +You may consider updating your widget by generating a new widget from the cookiecutter at https://github.com/jupyter-widgets/widget-cookiecutter and adapting the changes to your widget. The widget cookiecutter has been updated to use best practices in Python packaging and Jupyter Widget infrastructure. + ### Updating setup.py Start by updating the dependency in your `setup.py` or `setup.cfg` to support 8.x. @@ -68,6 +70,10 @@ The ``ManagerBase`` class has been split into an interface type `IWidgetManager` + "@jupyter-widgets/base-manager": "^1", ``` +### Updating the AMD module logic + +We highly encourage you to update your widget's logic around generating AMD modules for the CDN with changes similar to those at https://github.com/jupyter-widgets/widget-cookiecutter/pull/103/files. These changes allow your AMD module to be hosted anywhere, rather than hardcoding the `unpkg.com` CDN, and they remove the differences between the AMD module generated for the notebook extension and the AMD module generated for the CDN. + ### Updating the client-side code #### Phosphor -> Lumino