zadjii-msft / PowerToys

Windows system utilities to maximize productivity
MIT License
2 stars 2 forks source link

Add support for DetailsData in details control #117

Open zadjii-msft opened 2 days ago

zadjii-msft commented 2 days ago

As spec'd

interface ITag {
    IconDataType Icon { get; };
    String Text { get; };
    Windows.UI.Color Color { get; };
    String ToolTip { get; };
    ICommand Command { get; };
};

[uuid("6a6dd345-37a3-4a1e-914d-4f658a4d583d")]
interface IDetailsData {}
interface IDetailsElement {
    String Key { get; };
    IDetailsData Data { get; };
}
interface IDetails {
    IconDataType HeroImage { get; };
    String Title { get; };
    String Body { get; };
    IDetailsElement[] Metadata { get; };
}
interface IDetailsTags requires IDetailsData {
    ITag[] Tags { get; };
}
interface IDetailsLink requires IDetailsData {
    Windows.Foundation.Uri Link { get; };
    String Text { get; };
}
[uuid("58070392-02bb-4e89-9beb-47ceb8c3d741")]
interface IDetailsSeparator requires IDetailsData {}

IDetails can have any number of IDetailsElement pieces of metadata. These IDetailsElement have

and the Data can be one of:

zadjii-msft commented 2 days ago

Doing this before #73 feels like it would be throwaway work