-
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
Finish UI for environments creation #2539
Finish UI for environments creation #2539
Conversation
…aby/add-hyper-v-code-for-creation-adaptive-cards
…ds' into user/bbonaby/add-initial-creation-flow-in-setup-flow
…p after moving to a different page
…om holding onto items view control internally
…aby/add-hyper-v-code-for-creation-adaptive-cards
…ds' into user/bbonaby/add-initial-creation-flow-in-setup-flow
…ds' into user/bbonaby/finish-ui-for-environments-creation
…nto user/bbonaby/finish-ui-for-environments-creation
|
||
public Exception Exception { get; } | ||
|
||
public event TypedEventHandler<ICreateComputeSystemOperation, CreateComputeSystemProgressEventArgs> Progress = (s, e) => { }; |
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.
This hurts my eyes as it's completely unnecessary.
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.
Interestingly stylecop is the reason for this one. I think it might be time to standardize which stylecop errors we care about or not in Dev Home.
...VExtension/src/HyperVExtension/Models/VirtualMachineCreation/VMGalleryVMCreationOperation.cs
Show resolved
Hide resolved
tools/Environments/DevHome.Environments/ViewModels/CreateComputeSystemOperationViewModel.cs
Show resolved
Hide resolved
tools/SetupFlow/DevHome.SetupFlow/Models/Environments/CreateEnvironmentTask.cs
Show resolved
Hide resolved
{ | ||
var repoConfigTasksTotal = _setupFlowOrchestrator.GetTaskGroup<RepoConfigTaskGroup>()?.CloneTasks.Count ?? 0; | ||
var appManagementTasksTotal = _setupFlowOrchestrator.GetTaskGroup<AppManagementTaskGroup>()?.SetupTasks.Count() ?? 0; | ||
if (_setupFlowOrchestrator.IsSettingUpATargetMachine && repoConfigTasksTotal == 0 && appManagementTasksTotal == 0) |
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.
Coding guidelines: "Use parentheses to make clauses in an expression apparent".
This is in Windows C++ guidelines and in C# Common code conventions.
…is made when you click the create environment button
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.
Looked at it from a high level as it's quite long.
@@ -19,10 +20,11 @@ public static class StreamExtensions | |||
/// <param name="progressProvider">The object that progress will be reported to</param> | |||
/// <param name="bufferSize">The size of the buffer which is used to read data from the source stream and write it to the destination stream</param> | |||
/// <param name="cancellationToken">A cancellation token that will allow the caller to cancel the operation</param> | |||
public static async Task CopyToAsync(this Stream source, Stream destination, IProgress<long> progressProvider, int bufferSize, CancellationToken cancellationToken) | |||
public static async Task CopyToAsync(this Stream source, Stream destination, IProgress<ByteTransferProgress> progressProvider, int bufferSize, long totalBytesToExtract, CancellationToken cancellationToken) | |||
{ | |||
var buffer = new byte[bufferSize]; | |||
long totalRead = 0; |
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: Use var everywhere.
...VExtension/src/HyperVExtension/Models/VirtualMachineCreation/VMGalleryVMCreationOperation.cs
Show resolved
Hide resolved
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; |
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.
Unnecessary
Summary of the pull request
This PR is PR 4 of 4 that completes the create environment flow in machine configuration flow and the UI to show the operation progress in the Environments page. It allows us to start the create compute system operation provided by an extension, keep track of the operation and show progress of the operation in the UI.
Please see previous PRs for context:
Things added:
Here is a small video of the flow up to the start of the archive extraction
Video.Showing.start.of.creation.flow.from.Environments.page.mp4
Here is a small video of the flow when the archive extraction from the Hyper-V extension starts taking place.:
Video.showing.update.messages.from.the.hyper-v.extension.when.its.extracting.a.file.mp4
References and relevant issues
Design/PM wanted the cards that show progress to always stay at the top of the UI. To do that I'd have to change the way we sort the cards. I didn't have time to change it so I'll create an issue to track that work as a bug fix
We also want to give the users the ability to switch accounts e.g azure accounts in both the environment and setup target page. Currently we only show the first account, I'll create another issue to address that as a bug fix.
Detailed description of the pull request / Additional comments
Validation steps performed
PR checklist