-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add updates to allow for Dev Box creation in Dev Home #2639
Conversation
|
||
private void SetupOperationProgressBasedOnState() | ||
{ | ||
if (IsComputeSystemStateTransitioning(State)) |
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.
NIT: IsOperationInProgress = IsComputeSystemStateTransitioning(State)
tools/Environments/DevHome.Environments/ViewModels/LandingPageViewModel.cs
Show resolved
Hide resolved
tools/SetupFlow/DevHome.SetupFlow/Views/Environments/CreateEnvironmentReviewView.xaml.cs
Outdated
Show resolved
Hide resolved
tools/SetupFlow/DevHome.SetupFlow/Views/Environments/CreateEnvironmentReviewView.xaml.cs
Outdated
Show resolved
Hide resolved
tools/SetupFlow/DevHome.SetupFlow/Views/Environments/EnvironmentCreationOptionsView.xaml
Outdated
Show resolved
Hide resolved
tools/SetupFlow/DevHome.SetupFlow/Views/Environments/EnvironmentCreationOptionsView.xaml.cs
Outdated
Show resolved
Hide resolved
tools/SetupFlow/DevHome.SetupFlow/Views/Environments/EnvironmentCreationOptionsView.xaml.cs
Outdated
Show resolved
Hide resolved
…crosoft/devhome into user/bbonaby/update-actionset
@@ -193,12 +195,16 @@ public void ReleaseRemoteOperationObject() | |||
|
|||
partial void OnCurrentPageViewModelChanging(SetupPageViewModelBase value) => PageChanging?.Invoke(null, EventArgs.Empty); | |||
|
|||
public bool IsNavigatingForward { get; private set; } | |||
|
|||
public bool IsNavigatingBackward { get; private set; } |
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.
Seems unnecessary. Backward is just !Forward.
</InfoBar> | ||
</Grid> | ||
|
||
<!--- Show the adaptive card on the page if its loaded --> | ||
<Grid | ||
<!--- Show the adaptive card on the page if its loaded. -15 Padding added as the adaptive card adds an extra 40px of padding on all sides --> |
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.
Should be 30px, instead of 40. Unless I am understanding this incorrectly.
Summary of the pull request
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:
DevHomeChoiceSetWithDynamicRefresh
is added to allow the choiceset data for choicesets within an adaptive card to be updated dynamically based on the selection of other input elements in the card, without the need to submit the adaptive card. Note: Adaptivecards doesn't support this but there has been a request to add it [Feature Request] ChoiceSet options should dynamically change subsequent ChoiceSet options, or at least, toggle visibility of other ChoiceSets AdaptiveCards#8598. We'll need to follow up on that to see if we can get a native adaptive card implementation working without a custom renderer.devHomeRefreshChildChoiceSetOnSelectionChanged
. This signals to Dev Home that the choice set should be used to refresh data in the card in a selection changed event.devHomeParentChoiceSetId
property, where the parent Id is the Id of the adaptive card element that contains thedevHomeRefreshChildChoiceSetOnSelectionChanged
property and has the data needed to update the adaptive card element that thedevHomeChildChoiceSetId
points to.DevHomeChoiceSetWithDynamicRefresh
also renders a choiceSet that can contain a title, subtitle and value, not just the default title and value. Currently only thecompact
adaptive card styling gets this treatment but the implementation can be updated for the expanded and filter styles as well.DevHomeChoicesData
class has been added which contains the title, subtitle and value properties. Card authors would add these to their json likeThe
devHomeChoicesData
array would appear in the choiceSets "AdditionalProperties" property and Dev Home can thendeserialized them into a list of
DevHomeChoicesData
objects.A new template was added to
AdaptiveCardResourceTemplates.xaml
calledChoiceSetWithSubtitleTemplate
that will display the title and subtitle inside a combo box itemThe DevHomeActionSet renderer has been updated to look for the Id
DevHomeTopLevelActionSet
when making a decision to hide/show a set of actions within an action set. Before had it would hide all other action sets.Updated
EnvironmentCreationOptionsViewModel.cs
so it doesn't get a new adaptive card everytime you move from the review page back to the configure environment pageUpdated the
EnvironmentCreationOptionsView.xaml.cs
andCreateEnvironmentReviewView.xaml.cs
views to remove the elements within the adaptive cards individually before adding it to the grid in its xaml. This is so when moving to and from the configure environment page to the review page no UI elements are still parented to a view of another page, now that we no longer get a new extension adaptive card session when going between the pages. This is to prevent the multi parent xaml exception when an element has multiple parents.updated the
CreateComputeSystemOperationViewModel.cs
to remove the completed operation from the view and add the new compute system to the view after creation. Beforehand we instructed the user to click the sync page, now we'll automatically update it on completion.Changed _isCreationInProgress property to _isOperationInProgress to be more generic so we can reuse it for other operations in
ComputeSystemCardBase.cs
Fixed page contaent margins in the creation flow
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):
DevBoxCreationInDevHome.mp4
Example Json for adaptive card additions:
References and relevant issues
Detailed description of the pull request / Additional comments
Validation steps performed
PR checklist