Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorWidget as fallback when widgets models or views fail - Following up #3304

Merged
merged 14 commits into from
Nov 23, 2021
Merged

ErrorWidget as fallback when widgets models or views fail - Following up #3304

merged 14 commits into from
Nov 23, 2021

Conversation

trungleduc
Copy link
Contributor

References

Initially started in #2960 by @maartenbreddels, this PR resolves the conflicts in #2960 and updates the behavior of the failback widget.

Code changes

  • Based on the loadModelClass and loadViewClass logic on old PR, this PR adds some more try-catch blocks to catch the errors in model creation or view rendering.
  • Add tests for the new error widget.

User-facing changes

  • An error widget is shown on the failed widget, users can click on it to show the error messages.
  • The layout of the parent widget is preserved in case of failed children widgets.
138243743-34a49956-6d54-4aab-ba7d-12713a12c762.mp4

Backwards-incompatible changes

N/A

@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch trungleduc/ipywidgets/feat_error_widget

@trungleduc trungleduc marked this pull request as ready for review October 27, 2021 13:59
@trungleduc
Copy link
Contributor Author

Build extension failed because the Jupyterlab browser_check issue (jupyterlab/jupyterlab#11345)

packages/base-manager/src/manager-base.ts Outdated Show resolved Hide resolved
packages/base-manager/src/manager-base.ts Outdated Show resolved Hide resolved
packages/base-manager/src/manager-base.ts Show resolved Hide resolved
packages/base/src/errorwidget.ts Show resolved Hide resolved
packages/base/src/errorwidget.ts Outdated Show resolved Hide resolved
@martinRenou
Copy link
Member

martinRenou commented Nov 16, 2021

Note: I made a half-baked backport of this PR to the 7.x branch for private needs, putting the link here in case we need it later. Meeseeks will not be able to backport it automatically.

@martinRenou martinRenou merged commit fbdbd00 into jupyter-widgets:master Nov 23, 2021
@jasongrout jasongrout added this to the 8.0 milestone Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants