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

Forward port has_model to the 8.x widget manager #3378

Closed
jasongrout opened this issue Feb 11, 2022 · 0 comments · Fixed by #3389
Closed

Forward port has_model to the 8.x widget manager #3378

jasongrout opened this issue Feb 11, 2022 · 0 comments · Fixed by #3389
Milestone

Comments

@jasongrout
Copy link
Member

jasongrout commented Feb 11, 2022

In #3377, I introduce has_model in the base widget manager class, simplifying logic.

Right now we have a confusing get_model method:

  • In the base widget manager, it returns undefined if the model is not registered, which means that it can be used to synchronously check if a model is registered. This means the function is not purely async.
  • In the jlab widget manager, the function returns a rejected promise if the model is not registered, making the function a truly async function, but leaving us without a way to easily check synchronously if a model is registered.

Once we have has_model by porting #3377 to master, I think we can change the base get_model to be a truly async function like it is in the jlab manager now. This is a breaking change, so would need to be in widgets 8.0.

@jasongrout jasongrout added this to the 8.0 milestone Feb 11, 2022
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 a pull request may close this issue.

1 participant