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

ipyvuetify not working #3501

Open
maartenbreddels opened this issue Mar 15, 2023 · 4 comments
Open

ipyvuetify not working #3501

maartenbreddels opened this issue Mar 15, 2023 · 4 comments

Comments

@maartenbreddels
Copy link

Hi,

Ideally:

from google.colab import output
output.enable_custom_widget_manager()
!pip install ipyvuetify
import ipyvuetify as v
v.Btn(children=["I want to run on colab"])

Runs on colab, but gives the error in the js consoleUnknown dependency jupyter-vue.

In the notebook we 'fix' this by always loading a widget (we call ForceLoad) in ipyvue that will ensures a single widget from ipyvue is created before you can make a ipyvuetify widget (such that the module jupyter-vue is loaded).
However, colab works completely differently, and will probably not try to load this global widget.

Any suggestions for a workaround on how to load jupyter-vue from the jupyter-vuetify package?

cc @Ben-Epstein @mariobuikhuizen

@Ben-Epstein
Copy link

+1 I had the same issue

@maartenbreddels
Copy link
Author

This seems to work:

import ipyvuetify as v
import ipyvue as vue
display(vue.Html(tag="h2", children=["I work"]), v.Btn(children=["I want to run on colab"]))

@blois is this a good workaround do you think? Is a single display call guaranteed to enter in the same iframe?

maartenbreddels added a commit to widgetti/reacton that referenced this issue Mar 15, 2023
@maartenbreddels
Copy link
Author

I can get solara working in colab using widgetti/reacton@cb776b1
image

Too bad for the pydev debugger that gives us a warning, but the second execution it disappears. It's a solara thing that we might be able to get rid of in the future.

cc @MantZ who is probably also interested in this

maartenbreddels added a commit to widgetti/reacton that referenced this issue Mar 15, 2023
maartenbreddels added a commit to widgetti/reacton that referenced this issue Mar 15, 2023
@cperry-goog
Copy link

From blois "all display calls from the same cell are guaranteed to go into the same iFrame"

re: the workaround, we're not quite sure offhand, need to dig more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants