-
Notifications
You must be signed in to change notification settings - Fork 398
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
More Viewer control in notebooks (recording id, panel states) #8917
Conversation
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
@@ -190,6 +197,78 @@ def _repr_mimebundle_(self, **kwargs: dict) -> tuple[dict, dict] | None: # type | |||
def _repr_keys(self): # type: ignore[no-untyped-def] | |||
return self._viewer._repr_keys() | |||
|
|||
def update_panels( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A "partial update" API felt the most intuitive to me. This means that we need a way to differentiate between "don't update this panel state" (None
) and "please reset this panel state" (default
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice!
There does seem to be a lurking race-condition in here. The first recording only gets its time adjusted like half the time for me.
Related
set_active_recording_id
#8874set_time_ctrl
#8894What
This PR introduces the following notebook-only APIs:
Viewer.set_active_recording
, allowing the user to programmatically choose the active recording in multi-recording scenarios.Viewer.update_panels
, exposing the ability to partially update the state of panels.use_global_recording
param in thererun.notebook.Viewer
constructor, which allows theViewer
to be displayed in a "clean" state, without implicitly capturing any data from any recording. Recordings can then be added later using the existingViewer.add_recording
method.I also discovered that our build script was subtly broken for a while now 😬 specifically, the
CLOSURE_DTORS
finalizer would throw an exception becausewasm
wasnull
. Luckily it didn't cause any issues except for there being some error spam in the console.