-
Notifications
You must be signed in to change notification settings - Fork 10
API package exposing contexts data #409
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
base: main
Are you sure you want to change the base?
Conversation
3c6fd51 to
8b75eed
Compare
| export interface IDisposable { | ||
| dispose(): void; | ||
| } |
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.
question: why redefining a custom interface vs using the one from podman-desktop API ?
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.
The interface IDisposable is not defined in the extension-api.d.ts, only the class Disposable.
IDisposable is only defined in the internal packages/api module in Podman Desktop.
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.
but shouldn't it use that class as all the methods of the main core API ?
Creation of Disposable object here then should use static create(func: () => void): Disposable; ?
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.
Yes, you are right. I'll change this way.
There is also another change I was considering. The kubernetes extension redefines a copy of the Disposable class (in the channel module for the moment). I'm considering to remove this definition, and use the implementation of the core instead (the only drawback is that it is not accessible in the webview). WDYT?
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.
here it could be added into https://github.com/podman-desktop/podman-desktop/tree/main/packages/webview-api
or as part of new TC39, for webview use this "official" Disposable interface rather than bringing a custom one
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 rebased after merging #421, should now use Disposable from extension-api
e3141a5 to
c60d560
Compare
Signed-off-by: Philippe Martin <[email protected]>
Signed-off-by: Philippe Martin <[email protected]>
Signed-off-by: Philippe Martin <[email protected]>
Signed-off-by: Philippe Martin <[email protected]>
Signed-off-by: Philippe Martin <[email protected]>
Signed-off-by: Philippe Martin <[email protected]>
API package exposing contexts data.
Here is a first try, to discuss the structure of the API exposed to the user.
TODO: