-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: Document delta updates (DH-18090) #1119
Conversation
- Have a dehydrated document that the changes are applied to, then hydrate afterwards
ui docs preview (Available for 14 days) |
plugins/ui/src/deephaven/ui/object_types/ElementMessageStream.py
Outdated
Show resolved
Hide resolved
- Wire up NodeEncoder and EventEncoder to use it - Add tests for it as well
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.
Looking pretty good. Just a few minor things
def _transform_node(self, key: str, value: Any): | ||
if isinstance(value, RenderedNode): | ||
return self._convert_rendered_node(value) | ||
elif callable(value): | ||
return self._convert_callable(value) | ||
elif not is_serializable(value): | ||
# This is a non-serializable object. We'll store a reference to the object in the objects array. | ||
return self._convert_object(value) | ||
else: | ||
# Just return the value itself, it should be serializable | ||
return value |
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.
There is an edge case here (that we probably don't need to support) if a dict has non-serializable keys. With the previous code this would hit the except block. Here we'd end up returning a dict with non-serializable keys which would fail to serialize later.
Like I said it probably doesn't matter though as I don't think we should support complex keys
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.
Yea in theory I suppose the transform_node
should take an Any
instead of just a str
for the key... though I don't think we want to support that.
- Change name of is_serializable function/functionality - Clean up some other areas
ui docs preview (Available for 14 days) |
DHLog.setLogLevel(10)
, then filtering ondocumentUpdated