-
Notifications
You must be signed in to change notification settings - Fork 20
Provide API for registering nested pages #2356
Conversation
c5c74f5 to
5351615
Compare
5351615 to
68bd0ef
Compare
68bd0ef to
1ae2610
Compare
| * Dev Home widgets use the [Adaptive Card schema](https://adaptivecards.io/explorer/) version 1.5, which is the most recent schema supported by the WinUI 3 Adaptive Card renderer. | ||
| * There are [HostConfig](https://learn.microsoft.com/adaptive-cards/sdk/rendering-cards/uwp/host-config) files that define common styles (e.g., font family, font sizes, default spacing) and behaviors (e.g., max number of actions) for all the widgets. There is one for [light mode](../tools/Dashboard/DevHome.Dashboard/Assets/HostConfigLight.json) and one for [dark mode](../tools/Dashboard/DevHome.Dashboard/Assets/HostConfigDark.json). | ||
| * Dev Home supports a custom AdaptiveElement type called [`LabelGroup`](../common/Renderers/LabelGroup.cs). This allows a card author to render a set of labels, each with a specified background color. For an example of how to use this type, please see the [GitHub Issues widget](https://github.com/microsoft/devhomegithubextension/blob/main/src/GitHubExtension/Widgets/Templates/GitHubIssuesTemplate.json). | ||
| [Dashboard](./tools/Dashboard.md) |
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.
Would it make sense to keep the tool-specific documentation in the tool's project folder itself? I found this helpful with the Customization tool bring up because the md file will show up in Visual Studio to make it easier to reference, then we could just keep a link to those here.
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.
Keeping here for now, but might move things later. Still have some doc work upcoming.
nieubank
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.
![]()
| { | ||
| Type GetPageType(string key); | ||
|
|
||
| public void Configure<T_VM, T_V>() |
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.
Why the T_?
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 think it's like Type_ViewModel and Type_View. I used the existing function definition and just moved it.
- Update to incorporate #2356 for PageService sub-page registration - Update nuget package based on conflicts with newly added C++ projects that require packages.config - Remove breadcrumb until we figure out if there's going to be a common way to do this without duplicating so much code. The impact here is minimal since Customization doesn't have a ton of sub-pages (yet) - Mark SettingsChanged telemetry event to be a measure, I'm guessing this doesn't need to be Critical?
Summary of the pull request
As more tools and extensions are created, the list of pages to configure in App.xaml.cs could grow quite long. Instead, allow tools to create extension methods for the IPageService, similar to what we do in ServiceExtensions today. This keeps clutter out of the configuration list, and allows tools to stay more contained (internal classes, etc).
References and relevant issues
Detailed description of the pull request / Additional comments
Validation steps performed
PR checklist