Add updates to allow for Dev Box creation in Dev Home by bbonaby · Pull Request #2639 · microsoft/devhome (original) (raw)
This PR adds the necessary changes to support the creation of Dev Boxes. This PR should be merged before the PR in the Azure extension here: microsoft/DevHomeAzureExtension#154
(Note in a future PR we'll add more documentation surrounding how other card authors can use these changes)
Here are the following changes:
{ "type": "Input.ChoiceSet", "id": "PoolsComboBox", "style": "compact", "devHomeChoicesData": [ { "$data": "${PoolsList}", "title": "${title}", "subtitle": "${subtitle}", "value": "${value}" } ] }
The devHomeChoicesData array would appear in the choiceSets "AdditionalProperties" property and Dev Home can then
deserialized them into a list of DevHomeChoicesData objects.
Video Of DevBox creation once the other change goes in (Creation takes 20 - 30 minutes so I'll update this with another creation operation finishing when done):
{ "type": "AdaptiveCard", "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.5", "body": [ { "type": "ColumnSet", "spacing": "large", "columns": [ { "type": "Column", "width": "auto", "items": [ { "type": "Input.Text", "id": "NewEnvironmentName", "label": "${EnterNewEnvironmentTextBoxLabel}", "maxLength": 100, "isRequired": true, "errorMessage": "${DevBoxTextBoxErrorMessage}", "regex": "${DevBoxNameRegex}", "spacing": "large", "value": "${TextBoxText}" } ] } ] }, { "type": "ColumnSet", "spacing": "large", "columns": [ { "type": "Column", "width": "stretch", "items": [ { "type": "Input.ChoiceSet", "id": "ProjectsComboBox", "label": "${ProjectComboBoxLabel}", "devHomeChildChoiceSetId": "PoolsComboBox", "devHomeSelectionChangedDataForChildChoiceSet": "${SelectionChangedDataForChildChoiceSet}", "devHomeRefreshChildChoiceSetOnSelectionChanged": true, "isRequired": true, "errorMessage": "${DevBoxProjectComboBoxErrorMessage}", "style": "compact", "value": "${SelectedProjectIndex}", "choices": [ { "$data": "${ProjectList}", "title": "${title}", "value": "${value}" } ] } ] } ] }, { "type": "ColumnSet", "spacing": "large", "columns": [ { "type": "Column", "width": "stretch", "items": [
{
"type": "Input.ChoiceSet",
"id": "PoolsComboBox",
"devHomeParentChoiceSetId": "ProjectsComboBox",
"label": "${DevBoxPoolComboBoxLabel}",
"isRequired": true,
"errorMessage": "${DevBoxPoolsComboBoxErrorMessage}",
"placeholder": "${DevBoxPoolsPlaceHolder}",
"style": "compact",
"value": "${SelectedPoolIndex}",
"devHomeChoicesData": [
{
"$data": "${PoolsList}",
"title": "${title}",
"subtitle": "${subtitle}",
"value": "${value}"
}
]
}
]
}
]
},
{
"type": "ActionSet",
"id": "DevHomeTopLevelActionSet",
"actions": [
{
"id": "DevHomeMachineConfigurationNextButton",
"type": "Action.Submit",
"title": "${PrimaryButtonLabelForCreationFlow}"
},
{
"id": "DevHomeMachineConfigurationPreviousButton",
"type": "Action.Submit",
"title": "${SecondaryButtonLabelForCreationFlow}"
}
]
}] }