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

Adding QuickStart Playground experimental feature #2846

Merged
merged 3 commits into from
May 10, 2024

Conversation

manodasanW
Copy link
Member

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

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

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>
Copy link
Contributor

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>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<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>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<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 on lines +550 to +551
<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>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<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"?>
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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

@manodasanW manodasanW merged commit 59ad671 into main May 10, 2024
@manodasanW manodasanW deleted the feature/QuickstartPlayground-GitHub branch May 10, 2024 02:51
ActionIconToolTip="{Binding Header, RelativeSource={RelativeSource Mode=Self}}"
AutomationProperties.AccessibilityView="Control"
ActionIcon="{x:Null}"
Visibility="{x:Bind ViewModel.EnableQuickstartPlayground, Mode=TwoWay, Converter={StaticResource BoolToVisibilityConverter}}" >
Copy link
Collaborator

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.

Copy link
Contributor

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.

@krschau krschau added this to the Dev Home v0.14 milestone May 10, 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.

6 participants