Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Conversation

@bbonaby
Copy link
Contributor

@bbonaby bbonaby commented Mar 31, 2024

Summary of the pull request

This is PR 3 of 4 to add the ability to create environments from within Dev Home. I currently have 2 other PRs:

That will go into a feature branch before going into main. Please look at those for context. This PR adds the Create Environments flow to the machine configuration tool. It utilizes adaptive cards that are retrieved from a Dev Home extension to display the provider specific UI to the user. There are 3 pages:

  1. The Select environments page (no adpative card) where the user can select a provider from a list of providers in an items view control
  2. The configure environment page where we display the first adaptive card from the extension. This page is used as a "Form" where the extension can send Dev Home its creation form and the user can enter their details/options the provider can use to create the environment.
  3. The review page. This is the same review page experience that we have in the machine configuration flow today, however the create environment review tab retrieves the extensions review page adaptive card which is displayed in the tab. See the following video:
CreateEnvironmentFlowUpToReviewPage.mp4

We use weak references to send messages between the view model and the views to allow the views to be disposed once they are unloaded. The DevHome Settings card adaptive card control (added in PR #1 above) is used by the Hyper-V extension, to display the list of images that can be used to create a VM just like Hyper-V quick create window.
.

References and relevant issues

  • This adds the changes needed up until the user selects the setup button. The next PR will finish the flow by adding code for the loading page, the summary page and the Environments management page where we'll show the status of the environment creation.

Detailed description of the pull request / Additional comments

Note: The use of the ExtensionAdaptiveCardPanel for this kind of wizard flow causes random xaml crashes due to an exception where xaml sees a control being parented to multiple other controls. So it was not used for this feature

Validation steps performed

PR checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated

@bbonaby bbonaby requested review from huzaifa-d and sshilov7 April 1, 2024 21:46
/// 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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this class blank on purpose?

@bbonaby bbonaby mentioned this pull request Apr 5, 2024
3 tasks
@bbonaby bbonaby changed the base branch from user/bbonaby/add-hyper-v-code-for-creation-adaptive-cards to main April 5, 2024 20:34
@bbonaby bbonaby changed the base branch from main to user/bbonaby/add-hyper-v-code-for-creation-adaptive-cards April 5, 2024 20:35
@bbonaby bbonaby changed the base branch from user/bbonaby/add-hyper-v-code-for-creation-adaptive-cards to main April 5, 2024 22:21
@bbonaby bbonaby merged commit 0db3cfb into main Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants