-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add schema for ControlInfoData.json #1630
Open
HO-COOH
wants to merge
2
commits into
microsoft:main
Choose a base branch
from
HO-COOH:chore/control-info-data-schema
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"$schema": "ControlInfoDataSchema.json", | ||
"Groups": [ | ||
{ | ||
"UniqueId": "Design_Guidance", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,132 @@ | ||||||
{ | ||||||
"$schema": "http://json-schema.org/draft-04/schema#", | ||||||
"type": "object", | ||||||
"properties": { | ||||||
"Groups": { | ||||||
"type": "array", | ||||||
"items": { | ||||||
"type": "object", | ||||||
"properties": { | ||||||
"UniqueId": { | ||||||
"type": "string", | ||||||
"description": "Globally unique id of this group", | ||||||
"uniqueItems": true | ||||||
}, | ||||||
"Title": { | ||||||
"type": "string", | ||||||
"description": "Title appears on the control group page" | ||||||
}, | ||||||
"Subtitle": { | ||||||
"type": "string", | ||||||
"description": "Not used. Can leave empty" | ||||||
}, | ||||||
"Description": { | ||||||
"type": "string", | ||||||
"description": "Not used. Can leave empty" | ||||||
}, | ||||||
"ImagePath": { | ||||||
"type": "string", | ||||||
"description": "Not used. Can leave empty" | ||||||
}, | ||||||
"IconGlyph": { | ||||||
"type": "string", | ||||||
"description": "Appears as an icon for the NavigationViewItem of this control group" | ||||||
}, | ||||||
"ApiNamespace": { | ||||||
"type": "string", | ||||||
"description": "ApiNamespace of a control group is not used. Can leave empty" | ||||||
}, | ||||||
"IsSpecialSection": { | ||||||
"type": "boolean", | ||||||
"description": "Special section is hard-coded in NavigationRootPage.xaml", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"default": true | ||||||
}, | ||||||
"Folder": { | ||||||
"type": "string", | ||||||
"description": "Use to indicate a special child item for this folder. Only used when IsSpecialSection is true" | ||||||
}, | ||||||
"Items": { | ||||||
"type": "array", | ||||||
"description": "Individual control info", | ||||||
"items": { | ||||||
"type": "object", | ||||||
"properties": { | ||||||
"UniqueId": { | ||||||
"type": "string", | ||||||
"description": "Globally unique id of this control", | ||||||
"uniqueItems": true | ||||||
}, | ||||||
"Title": { | ||||||
"type": "string", | ||||||
"description": "Title appears on the overview card and control page of this control" | ||||||
}, | ||||||
"ApiNamespace": { | ||||||
"type": "string", | ||||||
"description": "Namespace of this control will appear below the tile on the control's detail page'" | ||||||
}, | ||||||
"Subtitle": { | ||||||
"type": "string", | ||||||
"description": "Subtitle appears on the overview card of this control" | ||||||
}, | ||||||
"Description": { | ||||||
"type": "string", | ||||||
"description": "Appears on the control page" | ||||||
}, | ||||||
"ImagePath": { | ||||||
"type": "string", | ||||||
"description": "Appears as the image of this control on the overriew card. Should be a uri starts with ms-appx:///Assets/ControlImages/..." | ||||||
}, | ||||||
"IconGlyph": { | ||||||
"type": "string", | ||||||
"description": "Not used. Leave empty" | ||||||
}, | ||||||
"Content": { | ||||||
"type": "string", | ||||||
"description": "Not used. Leave empty" | ||||||
}, | ||||||
"IsNew": { | ||||||
"type": "boolean", | ||||||
"default": true, | ||||||
"description": "Show on the Recently Added Sample section on the main page and will add a dot on the overview card of this control" | ||||||
}, | ||||||
"IsUpdated": { | ||||||
"type": "boolean", | ||||||
"default": true, | ||||||
"description": "Show on the Recently Updated Sample section on the main page and will add a dot on the overview card of this control" | ||||||
}, | ||||||
"Docs": { | ||||||
"type": "array", | ||||||
"items": { | ||||||
"type": "object", | ||||||
"properties": { | ||||||
"Title": { | ||||||
"type": "string", | ||||||
"description": "Link name that appears in the Documentation dropdown" | ||||||
}, | ||||||
"Uri": { | ||||||
"type": "string", | ||||||
"description": "Documentation link url" | ||||||
} | ||||||
}, | ||||||
"required": [ "Title", "Uri" ] | ||||||
}, | ||||||
"description": "Add a link to the doc in the Documentation dropdown on the detail page of this control" | ||||||
}, | ||||||
"RelatedControls": { | ||||||
"type": "array", | ||||||
"items": { | ||||||
"type": "string", | ||||||
"description": "Name of the related control" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
}, | ||||||
"description": "Array of names of the related control" | ||||||
} | ||||||
}, | ||||||
"required": [ "UniqueId", "Title"] | ||||||
} | ||||||
} | ||||||
}, | ||||||
"required": [ "UniqueId", "Title", "Items" ] | ||||||
} | ||||||
} | ||||||
} | ||||||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 would probably write something like "The name of the control group. Will be displayed on the control group page and navigation".
Same for the other descriptions, I think ideally we should tell the intention of the property and then tell where it is being used.