This repository was archived by the owner on Jun 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Add updates to allow for Dev Box creation in Dev Home #2639
Merged
Conversation
This file contains hidden or 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
3 tasks
kanismohammed
approved these changes
Apr 16, 2024
dhoehna
reviewed
Apr 16, 2024
dhoehna
reviewed
Apr 16, 2024
dhoehna
reviewed
Apr 16, 2024
dhoehna
reviewed
Apr 16, 2024
dhoehna
reviewed
Apr 16, 2024
|
||
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)
dhoehna
reviewed
Apr 16, 2024
tools/Environments/DevHome.Environments/ViewModels/LandingPageViewModel.cs
Show resolved
Hide resolved
dhoehna
reviewed
Apr 16, 2024
tools/SetupFlow/DevHome.SetupFlow/Views/Environments/CreateEnvironmentReviewView.xaml.cs
Outdated
Show resolved
Hide resolved
dhoehna
reviewed
Apr 16, 2024
tools/SetupFlow/DevHome.SetupFlow/Views/Environments/CreateEnvironmentReviewView.xaml.cs
Outdated
Show resolved
Hide resolved
dhoehna
reviewed
Apr 16, 2024
tools/SetupFlow/DevHome.SetupFlow/Views/Environments/EnvironmentCreationOptionsView.xaml
Outdated
Show resolved
Hide resolved
dhoehna
reviewed
Apr 16, 2024
tools/SetupFlow/DevHome.SetupFlow/Views/Environments/EnvironmentCreationOptionsView.xaml.cs
Outdated
Show resolved
Hide resolved
dhoehna
reviewed
Apr 16, 2024
tools/SetupFlow/DevHome.SetupFlow/Views/Environments/EnvironmentCreationOptionsView.xaml.cs
Outdated
Show resolved
Hide resolved
huzaifa-d
approved these changes
Apr 17, 2024
This was
linked to
issues
Apr 17, 2024
6 tasks
huzaifa-d
reviewed
Apr 17, 2024
@@ -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.
huzaifa-d
reviewed
Apr 17, 2024
</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.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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