Skip to content

Conversation

@jnumainville
Copy link
Contributor

Requires deephaven/deephaven-core#5854

Adds ability to fetch shared objects with embed-widget.
name takes the shared ticket, then shared specifies the type of shared object that needs to be fetched, which is required for getSharedObject.

Copy link
Member

@mofojed mofojed left a 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.

Copy link
Member

@mofojed mofojed left a 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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const isLoading = definition == null && sharedReady == false && error == null;
const isLoading = definition == null && !sharedReady && error == null;

Comment on lines +169 to +180
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'
);
}
Copy link
Member

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) {
Copy link
Member

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.

@mofojed
Copy link
Member

mofojed commented Jul 7, 2025

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.

@mofojed mofojed closed this Jul 7, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants