devhome icon indicating copy to clipboard operation
devhome copied to clipboard

[SDK improvement] Provide a WidgetServer analogous to the ExtensionServer

Open bonzani opened this issue 1 year ago • 0 comments

Suggested new feature or improvement

I'm in the process of writing an extension for DevHome that provides Widgets. The Extensions Readme states that

extensions can provide widgets to Dev Home using Widget providers.

While it was straight forward to use the ExtensionServer, it came as a surprize that I needed to implement my own copy of the WidgetServer. I've also found three places where extensions use the same code for the WidgetServer which might make it a good candidate to be provided by the extension SDK: GitHubExtension WidgetServer, GitHubExtension WidgetServer, GitHubExtension WidgetServer

It might be that there's an architecture or technical reason why this is not desirable, but I have not found anything online so far. I'm aware that this DevHome is still maturing and it also might just be the case that this is still on the todo list.

Scenario

Good examples are the three extensions mentioned in the description, but also additional new extensions that provide widgets need to re-implement the WidgetServer code every time. Providing it as part of the SDK would free extension developers from maintaining this infrastructure code and let them focus on providing features.

The WidgetServer is used in the Program.cs files GitHubExtensionServer, AzureExtensionServer, and CoreWidgetProvider

Additional details

No response

bonzani avatar Nov 28 '24 13:11 bonzani