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 2
Add updates to allow for Dev Box creation in Dev Home #2639
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
fd234e5
Add changes to allow for DevBox creation from Dev Home
bbonaby 904c0f4
Merge branch 'main' into user/bbonaby/update-actionset
bbonaby 7b0a2b8
Merge branch 'main' into user/bbonaby/update-actionset
bbonaby 062a276
remove deleted systems from when done
bbonaby a241b3d
update text
bbonaby 599e001
update based on comments
bbonaby 107837c
update comment based on PR comment
bbonaby c48af6e
Merge branch 'main' into user/bbonaby/update-actionset
bbonaby cad054e
Merge branch 'user/bbonaby/update-actionset' of https://github.com/mi…
bbonaby 9c825fd
Merge branch 'main' into user/bbonaby/update-actionset
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
27 changes: 27 additions & 0 deletions
27
common/DevHomeAdaptiveCards/CardModels/DevHomeChoicesData.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,27 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace DevHome.Common.DevHomeAdaptiveCards.CardModels; | ||
|
||
/// <summary> | ||
/// Represents a choice in an adaptive card choice set. This is the same as the adaptive card choices | ||
/// type in the adaptive card schema with an added subtitle property. This can be updated in the future | ||
/// to add other properties. | ||
/// </summary> | ||
/// <remarks> | ||
/// This class should be kept in sync with the Adaptive card Input.Choice. | ||
/// See: https://www.adaptivecards.io/explorer/Input.Choice.html | ||
/// </remarks> | ||
public class DevHomeChoicesData | ||
bbonaby marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
[JsonPropertyName("title")] | ||
public string Title { get; set; } = string.Empty; | ||
|
||
[JsonPropertyName("subtitle")] | ||
public string Subtitle { get; set; } = string.Empty; | ||
|
||
[JsonPropertyName("value")] | ||
public string Value { get; set; } = string.Empty; | ||
} |
40 changes: 40 additions & 0 deletions
40
common/DevHomeAdaptiveCards/InputValues/CustomComboBoxInputValue.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,40 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System.Globalization; | ||
using AdaptiveCards.ObjectModel.WinUI3; | ||
using AdaptiveCards.Rendering.WinUI3; | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Controls; | ||
|
||
namespace DevHome.Common.DevHomeAdaptiveCards.InputValues; | ||
|
||
public class CustomComboBoxInputValue : IAdaptiveInputValue | ||
{ | ||
private readonly ComboBox _comboBox; | ||
|
||
public CustomComboBoxInputValue(IAdaptiveInputElement input, ComboBox comboBox) | ||
{ | ||
InputElement = input; | ||
_comboBox = comboBox; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the current value of the input element. This is the index of the current item. | ||
/// </summary> | ||
public string CurrentValue => _comboBox.SelectedIndex.ToString(CultureInfo.InvariantCulture); | ||
|
||
public UIElement? ErrorMessage { get; set; } | ||
|
||
public IAdaptiveInputElement InputElement { get; set; } | ||
|
||
public void SetFocus() | ||
{ | ||
_comboBox.Focus(FocusState.Keyboard); | ||
} | ||
|
||
public bool Validate() | ||
{ | ||
return _comboBox.SelectedIndex >= 0; | ||
} | ||
} |
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
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.