-
Notifications
You must be signed in to change notification settings - Fork 33
feat: Add shared objects to embed-widget #2189
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
Conversation
mofojed
left a comment
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.
Need to clean up a few things.
mofojed
left a comment
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.
Need to clean up a few things.
| const isLoaded = | ||
| (definition != null || sharedObject != null) && error == null; | ||
| const isLoading = definition == null && sharedObject == null && error == null; | ||
| (definition != null || sharedReady != false) && error == null; |
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.
| (definition != null || sharedReady != false) && error == null; | |
| (definition != null || sharedReady) && error == null; |
| (definition != null || sharedObject != null) && error == null; | ||
| const isLoading = definition == null && sharedObject == null && error == null; | ||
| (definition != null || sharedReady != false) && error == null; | ||
| const isLoading = definition == null && sharedReady == false && error == null; |
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.
| const isLoading = definition == null && sharedReady == false && error == null; | |
| const isLoading = definition == null && !sharedReady && error == null; |
| type ConnectionWithGetSharedObject = dh.IdeConnection & { | ||
| getSharedObject(name: string, type: string): Promise<unknown>; | ||
| }; | ||
|
|
||
| function isConnectionWithGetSharedObject( | ||
| connection: dh.IdeConnection | ||
| ): connection is ConnectionWithGetSharedObject { | ||
| return ( | ||
| 'getSharedObject' in connection && | ||
| typeof connection.getSharedObject === 'function' | ||
| ); | ||
| } |
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.
Move the type definition and typePredicate outside of/above this functional component.
| 'Connection does not have getSharedObject method. Cannot fetch shared object.' | ||
| ); | ||
| } | ||
| if (definition != null) { |
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.
I'd personally put the definition != null case first.
|
There's been no action or direction on this PR for months. Closing, will re-open if we want to pick up shared tickets again. |
Requires deephaven/deephaven-core#5854
Adds ability to fetch shared objects with
embed-widget.nametakes the shared ticket, thensharedspecifies the type of shared object that needs to be fetched, which is required forgetSharedObject.