-
Notifications
You must be signed in to change notification settings - Fork 2
Adding QuickStart Playground experimental feature #2846
Conversation
Related work items: #46195449, #48702845, #48702968, #49293419, #49717358, #49721021, #49721031, #49915277, #49917614
<comment>Body text description for a card than when clicked takes the user to a flow for creating a devcontainer environment for their project idea</comment> | ||
</data> | ||
<data name="MainPage_QuickstartPlayground.Header" xml:space="preserve"> | ||
<value>Quickstart Playground</value> |
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: Might want to lock this string as well (there might be other instances I've missed).
Not a blocker.
<comment>Locked="{Quickstart Playground}" Title text for the Quickstart Playground feature.</comment> | ||
</data> | ||
<data name="QuickstartPlayground_Description" xml:space="preserve"> | ||
<value>Get started in a new devcontainer-based project from a natural language prompt. Enabling this feature installs the Dev Home Azure Extension from the Store.</value> |
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.
<value>Get started in a new devcontainer-based project from a natural language prompt. Enabling this feature installs the Dev Home Azure Extension from the Store.</value> | |
<value>Get started in a new dev container-based project from a natural language prompt. Enabling this feature installs the Dev Home Azure Extension from the Store.</value> |
Searching online looks like its called Dev Container? Could be wrong, but feel free to ignor
</data> | ||
<data name="MainPage_QuickstartPlayground.Header" xml:space="preserve"> | ||
<value>Quickstart Playground</value> | ||
<comment>Header for a card than when clicked takes the user to a flow for creating a devcontainer environment for their project idea</comment> |
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.
<comment>Header for a card than when clicked takes the user to a flow for creating a devcontainer environment for their project idea</comment> | |
<comment>Header for a card that when clicked takes the user to a flow for creating a dev container environment for their project idea</comment> |
<comment>Body text description for a card than when clicked takes the user to a flow for creating a devcontainer environment for their project idea</comment> | ||
</data> |
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.
<comment>Body text description for a card than when clicked takes the user to a flow for creating a devcontainer environment for their project idea</comment> | |
</data> | |
<comment>Body text description for a card that when clicked takes the user to a flow for creating a dev container environment for their project idea</comment> |
@@ -0,0 +1,379 @@ | |||
<?xml version="1.0" encoding="utf-8"?> |
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.
Looks like some of the indentations in this file are 4 spaces and 8 spaces Although it might be GitHub formatting
|
||
// If the feature is turned on, it doesn't show up in the configuration section (toggling it off and on again fixes it) | ||
// It's because this is constructed after ExperimentalFeaturesViewModel, so the handler isn't added yet. | ||
_host.GetService<IExperimentationService>().ExperimentalFeatures.FirstOrDefault(f => string.Equals(f.Id, QuickstartPlaygroundFlowFeatureName, StringComparison.Ordinal))!.PropertyChanged += ExperimentalFeaturesViewModel_PropertyChanged; |
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.
For future update:
Line 42 has a private member variable called _experimentation Service. We can use the service directly with it.
Also we can probably add a method to IExperimentationService
to return the ExperimentalFeature
object based on a name passed in. We'd move the linq statement into the method and then callers like here have a cleaner way to get the IExperimentationService
However, if we're augmenting the IExperimentationService
feature, at the same time we should add an event, callers can subscribe to get ExperimentalFeature
changes
return; | ||
} | ||
|
||
var adapativeCardController = adaptiveCardSessionResult.AdaptiveCardSession; |
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.
for future: we should probably put a try/catch when we use the adaptive card session since the extension could crash and this is an out of proc object
ActionIconToolTip="{Binding Header, RelativeSource={RelativeSource Mode=Self}}" | ||
AutomationProperties.AccessibilityView="Control" | ||
ActionIcon="{x:Null}" | ||
Visibility="{x:Bind ViewModel.EnableQuickstartPlayground, Mode=TwoWay, Converter={StaticResource BoolToVisibilityConverter}}" > |
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.
Converter is unneeded, Visibility can handle booleans.
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.
Yeah, I missed this one when I was cleaning out the others. 😔 I'll fix that in a future PR.
Summary of the pull request
This PR adds the reviewed QuickStart Playground experimental feature. These changes have already been reviewed.
References and relevant issues
https://task.ms/43893185
Detailed description of the pull request / Additional comments
This is the DevHome side of the QuickStartPlayground experimental feature. Dev Home will support extensions providing a QuickStartProject provider. Our initial implementation of this lives in the Azure extension which is in the other PR in that repo. Most of the UI for this feature is in Dev Home itself and is powered via the SDK API surface. There are a couple adaptive card extension points for the extension to provide UI. This is during extension initialization and any additional progress output.
At a high level, a user is able to enable the experiment for it, then go to the page for the feature under Machine Configuration and select an extension to use to generate projects. Then they will be able to see a bunch of sample prompts and choose one of them or enter their own. Then once they click generate, a project will get generated by the extension which the user can then view, launch, or save.
Validation steps performed
PR checklist