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 20
Add initial environments creation flow to the machine configuration tool #2493
Merged
bbonaby
merged 28 commits into
main
from
user/bbonaby/add-initial-creation-flow-in-setup-flow
Apr 5, 2024
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
1ad430d
add initial changes
bbonaby 32e23ef
add parsers
bbonaby dd85999
fix build
bbonaby 29a749f
update existing classes and xaml
bbonaby 4daca73
add hyper-v adaptive card for creation
bbonaby 96610fc
add changes for hyper-v
bbonaby 2f82316
fix build
bbonaby 62587bb
add changes to show settings cards from hyper v
bbonaby 3ce765e
update with latest changes
bbonaby 9a3df47
add recent changes
bbonaby d8421ae
fix build
bbonaby f094aa4
Merge branch 'user/bbonaby-add-adaptive-card-updates2' into user/bbon…
bbonaby 4295de0
Merge branch 'user/bbonaby/add-hyper-v-code-for-creation-adaptive-car…
bbonaby c1f6289
add updates for adaptive cards to appear in review page
bbonaby 8c887ff
add creation to experiements page and fix adaptive card not showing u…
bbonaby c9fe61f
add missing message classes
bbonaby 0db3637
Delete tools/SetupFlow/DevHome.SetupFlow/Models/Environments/CreateEn…
bbonaby af8953f
update message passing
bbonaby 50e4b55
update based on comments, and add more comments
bbonaby 599bcef
update comments and itemsviews choice set to prevent the choiceset fr…
bbonaby b5feec4
Merge branch 'main' into user/bbonaby-add-adaptive-card-updates2
bbonaby 975616e
Use adaptive card render service to render adaptive card within conte…
bbonaby 8a6b627
Merge branch 'user/bbonaby-add-adaptive-card-updates2' into user/bbon…
bbonaby 92c3979
Merge branch 'user/bbonaby/add-hyper-v-code-for-creation-adaptive-car…
bbonaby 1a4da8f
add updates
bbonaby 34b31f8
Merge branch 'main' into user/bbonaby/add-initial-creation-flow-in-se…
bbonaby a1b591f
Merge branch 'main' into user/bbonaby/add-initial-creation-flow-in-se…
bbonaby 45ae811
Fix merge conflicts and address comments
bbonaby 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 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
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
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
Binary file added
BIN
+12.2 KB
tools/SetupFlow/DevHome.SetupFlow/Assets/CreateVirtualEnvironment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions
18
tools/SetupFlow/DevHome.SetupFlow/Exceptions/AdaptiveCardNotRetrievedException.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Text; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace DevHome.SetupFlow.Exceptions; | ||
|
|
||
| public class AdaptiveCardNotRetrievedException : Exception | ||
| { | ||
| public AdaptiveCardNotRetrievedException(string message) | ||
| : base(message) | ||
| { | ||
| } | ||
| } |
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
31 changes: 31 additions & 0 deletions
31
...s/SetupFlow/DevHome.SetupFlow/Models/Environments/CreationAdaptiveCardSessionEndedData.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using DevHome.Common.Environments.Models; | ||
|
|
||
| namespace DevHome.SetupFlow.Models.Environments; | ||
|
|
||
| /// <summary> | ||
| /// Data payload for when the <see cref="Microsoft.Windows.DevHome.SDK.IExtensionAdaptiveCardSession2"> | ||
| /// session Ends. This data is used to send the user input from an adaptive card session back to an object | ||
| /// that subscribes to the <see cref="Microsoft.Windows.DevHome.SDK.IExtensionAdaptiveCardSession2.Stopped"> | ||
| /// event. | ||
| /// </summary> | ||
| public class CreationAdaptiveCardSessionEndedData | ||
| { | ||
| /// <summary> | ||
| /// Gets the JSON string of the user input from the adaptive card session | ||
| /// </summary> | ||
| public string UserInputResultJson { get; private set; } | ||
bbonaby marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /// <summary> | ||
| /// Gets the provider details for the compute system provider. <see cref="ComputeSystemProviderDetails"/> | ||
| /// </summary> | ||
| public ComputeSystemProviderDetails ProviderDetails { get; private set; } | ||
|
|
||
| public CreationAdaptiveCardSessionEndedData(string userInputResultJson, ComputeSystemProviderDetails providerDetails) | ||
| { | ||
| UserInputResultJson = userInputResultJson; | ||
| ProviderDetails = providerDetails; | ||
| } | ||
| } | ||
18 changes: 18 additions & 0 deletions
18
...etupFlow/DevHome.SetupFlow/Models/Environments/CreationAdaptiveCardSessionEndedMessage.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using CommunityToolkit.Mvvm.Messaging.Messages; | ||
|
|
||
| namespace DevHome.SetupFlow.Models.Environments; | ||
|
|
||
| /// <summary> | ||
| /// Message for sending the data payload for the <see cref="Microsoft.Windows.DevHome.SDK.IExtensionAdaptiveCardSession2"> | ||
| /// object's session back to a subscriber when the session ends. | ||
| /// </summary> | ||
| public class CreationAdaptiveCardSessionEndedMessage : ValueChangedMessage<CreationAdaptiveCardSessionEndedData> | ||
| { | ||
| public CreationAdaptiveCardSessionEndedMessage(CreationAdaptiveCardSessionEndedData value) | ||
| : base(value) | ||
| { | ||
| } | ||
| } |
20 changes: 20 additions & 0 deletions
20
...Flow/DevHome.SetupFlow/Models/Environments/CreationOptionsReviewPageDataRequestMessage.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using AdaptiveCards.Rendering.WinUI3; | ||
| using CommunityToolkit.Mvvm.Messaging.Messages; | ||
|
|
||
| namespace DevHome.SetupFlow.Models.Environments; | ||
|
|
||
| /// <summary> | ||
| /// Message for requesting a rendered adaptive card that was created from a <see cref="DevHome.Common.Models.ExtensionAdaptiveCard."/> | ||
| /// object in one view model to a view. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// This is used when a view that displays an adaptive card needs to request the rendered adaptive card from the view model. | ||
| /// The view in this case would not want to using Binding to bind to the adaptive card, but instead request it and then manually | ||
| /// add it to its UI. This prevents xaml binding crashes with "Element is already the child of another element" exceptions. | ||
| /// </remarks> | ||
| public sealed class CreationOptionsReviewPageDataRequestMessage : RequestMessage<RenderedAdaptiveCard> | ||
|
Contributor
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. Is this class blank on purpose? |
||
| { | ||
| } | ||
20 changes: 20 additions & 0 deletions
20
.../SetupFlow/DevHome.SetupFlow/Models/Environments/CreationOptionsViewPageRequestMessage.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using AdaptiveCards.Rendering.WinUI3; | ||
| using CommunityToolkit.Mvvm.Messaging.Messages; | ||
|
|
||
| namespace DevHome.SetupFlow.Models.Environments; | ||
|
|
||
| /// <summary> | ||
| /// Message for requesting a rendered adaptive card that was created from a <see cref="DevHome.Common.Models.ExtensionAdaptiveCard."/> | ||
| /// object in one view model to a view. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// This is used when a view that displays an adaptive card needs to request the rendered adaptive card from the view model. | ||
| /// The view in this case would not want to using Binding to bind to the adaptive card, but instead request it and then manually | ||
| /// add it to its UI. This prevents xaml binding crashes with "Element is already the child of another element" exceptions. | ||
| /// </remarks> | ||
| public sealed class CreationOptionsViewPageRequestMessage : RequestMessage<RenderedAdaptiveCard> | ||
| { | ||
| } |
19 changes: 19 additions & 0 deletions
19
tools/SetupFlow/DevHome.SetupFlow/Models/Environments/CreationProviderChangedMessage.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using CommunityToolkit.Mvvm.Messaging.Messages; | ||
| using DevHome.Common.Environments.Models; | ||
|
|
||
| namespace DevHome.SetupFlow.Models.Environments; | ||
|
|
||
| /// <summary> | ||
| /// Message for sending the <see cref="ComputeSystemProviderDetails"/> from one view model to | ||
| /// another view model when the provider changes. | ||
| /// </summary> | ||
| public class CreationProviderChangedMessage : ValueChangedMessage<ComputeSystemProviderDetails> | ||
| { | ||
| public CreationProviderChangedMessage(ComputeSystemProviderDetails value) | ||
| : base(value) | ||
| { | ||
| } | ||
| } |
23 changes: 23 additions & 0 deletions
23
tools/SetupFlow/DevHome.SetupFlow/Models/Environments/NewAdaptiveCardAvailableMessage.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using CommunityToolkit.Mvvm.Messaging.Messages; | ||
|
|
||
| namespace DevHome.SetupFlow.Models.Environments; | ||
|
|
||
| /// <summary> | ||
| /// Message for sending a rendered adaptive card that was created from a <see cref="DevHome.Common.Models.ExtensionAdaptiveCard."/> | ||
| /// object in one view model to a view. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// Since multiple view models can listen for this message in the setup flow, this object is used to to send the rendered adaptive card | ||
| /// as well as the current view model that is being displayed in the setup flow. Listeners can use the current view model in use | ||
| /// by the <see cref="Services.SetupFlowOrchestrator"/> to determine if they should display the adaptive card or not. | ||
| /// </remarks> | ||
| public class NewAdaptiveCardAvailableMessage : ValueChangedMessage<RenderedAdaptiveCardData> | ||
| { | ||
| public NewAdaptiveCardAvailableMessage(RenderedAdaptiveCardData value) | ||
| : base(value) | ||
| { | ||
| } | ||
| } |
23 changes: 23 additions & 0 deletions
23
tools/SetupFlow/DevHome.SetupFlow/Models/Environments/RenderedAdaptiveCardData.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using AdaptiveCards.Rendering.WinUI3; | ||
|
|
||
| namespace DevHome.SetupFlow.Models.Environments; | ||
|
|
||
| /// <summary> | ||
| /// Data object that contains the rendered adaptive card and the current view model being used in | ||
| /// the setup flow by the <see cref="Services.SetupFlowOrchestrator"/>. | ||
| /// </summary> | ||
| public class RenderedAdaptiveCardData | ||
| { | ||
| public object CurrentSetupFlowViewModel { get; private set; } | ||
|
|
||
| public RenderedAdaptiveCard RenderedAdaptiveCard { get; set; } | ||
|
|
||
| public RenderedAdaptiveCardData(object currentSetupFlowViewModel, RenderedAdaptiveCard renderedAdaptiveCard) | ||
| { | ||
| CurrentSetupFlowViewModel = currentSetupFlowViewModel; | ||
| RenderedAdaptiveCard = renderedAdaptiveCard; | ||
| } | ||
| } |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.