Giter VIP home page Giter VIP logo

Comments (9)

datakurre avatar datakurre commented on August 29, 2024 1

Thanks for the heads up.

from robotkernel.

datakurre avatar datakurre commented on August 29, 2024 1

Maybe it has been working by accident so far.

Change I'm trying that seems to make it work:

-    display(ui, out, display_id=display_id)
+    display(ipywidgets.widgets.VBox([ui, out]), display_id=f"{display_id}.widgets")

The first issue is that with display(ui, out, display_id=display_id) only the widget execution output ipywidgets.widgets.Out remains displayed.

The second issue is that later rendering of Log | Result hides the widgets. Rendering the widgets (and output) with different display_id keeps them visible after Log | Result. I have no idea why it worked before (why rendering Log | Result with overlapping display_id did not remove them before).

from robotkernel.

bollwyvl avatar bollwyvl commented on August 29, 2024

Sometimes it's better to be lucky than good.

from robotkernel.

datakurre avatar datakurre commented on August 29, 2024

Only worked on my computer https://gist.github.com/datakurre/c1c4c4f31bf3438a4232e082d2af2b4a

from robotkernel.

datakurre avatar datakurre commented on August 29, 2024

Oh, just "accident". Works now.

from robotkernel.

datakurre avatar datakurre commented on August 29, 2024

up to widgets...

I think getting to that fully working is part of the carrot of upgrading to the upcoming ipywidgets 8 stuff? the widget graph usually isn't being serialized to the notebook format fast enough to work well, and i think they had to do something new...

I'd love to be able to persist state of RobotKernel keyword button widgets so that keyword buttons would work from executed notebooks without re-executing the whole notebook. Would make even more sense with Lite (maybe we have ubiquitous Lite rendering for ipynb files some day).

Last time, I tried, I could not find how it could work with back then versions of Classic Notebook or Lab. Will re-read docs and try again, once ipywidgets 8 is ready.

from robotkernel.

RomaCZ avatar RomaCZ commented on August 29, 2024

Hello, thank you for great kernel.
Unfortunately suggested:

-    display(ui, out, display_id=display_id)
+    display(ipywidgets.widgets.VBox([ui, out]), display_id=f"{display_id}.widgets")

modify result of all buttons, not just the pressed one.

Neither code from 1.6rc1

      display(ipywidgets.widgets.VBox([ui, out]), display_id=display_id)

did not work for me, cause Log | Result hides it.

So I ended up with dirty solution:

      display(ipywidgets.widgets.VBox([ui, out]), display_id=str(uuid.uuid4()))

from robotkernel.

datakurre avatar datakurre commented on August 29, 2024

Thanks for the heads up. I have not tried this yet with final ipywidgets release.

from robotkernel.

datakurre avatar datakurre commented on August 29, 2024

@RomaCZ I found the issue and it should be fixed now in 1.6rc2

from robotkernel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.