Closed twitwi closed 2 months ago
This is indeed a bug - I can look into this.
@manzt, whats the best approach to sync Py with Js?
should i add my own observers to each traitlet? it seems like like widget.on_trait_change
is deprecated.
@manzt, whats the best approach to sync Py with Js?
Hmm, I think I'm missing some context. I haven't look closely at the Python side of mo.ui.anywidget
, but it looks like you are swapping in a custom comm
, and assignment:
counter.msg = "count:"
Should trigger a publish_msg
call since msg is sync=True
Happy to find a time to pair if that would help!
I wonder if this proxying is causing an issue with the underlying behavior of the getters/setters:
It is possible the proxying is causing the issues. My custom comm
may be missing some implementation details too.
It would be great to pair with you, ill message you on Discord.
:heart:
Describe the bug
I made an anywidget and while updates from js to js work, updates from python to js are not (while they are working in jupyter).
NB: besides, it is probably normal but if not "wrapped" with mo.ui.anywidget, updates from js also do not cause cell rerun in marimo neither (but such concept does not exist in jupyter).
Environment
(also tested with older versions)
Code to reproduce