This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Merging input and action data jsons for Adaptive Cards in Widgets#3759
Merged
Merging input and action data jsons for Adaptive Cards in Widgets#3759
Conversation
krschau
reviewed
Sep 4, 2024
Comment on lines
+327
to
+328
| var objA = JObject.Parse(jsonStringA); | ||
| var objB = JObject.Parse(jsonStringB); |
Collaborator
There was a problem hiding this comment.
Can we use System.Text.Json instead of Newtonsoft here? https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/migrate-from-newtonsoft?pivots=dotnet-8-0
tools/Dashboard/DevHome.Dashboard/ViewModels/WidgetViewModel.cs
Outdated
Show resolved
Hide resolved
vineeththomasalex
approved these changes
Sep 11, 2024
krschau
approved these changes
Sep 11, 2024
| @@ -406,7 +429,7 @@ private void AnnounceWarnings(AdaptiveCard card) | |||
| // we may add Caroussels, Tables and Facts to this list. | |||
Collaborator
There was a problem hiding this comment.
nit:
Suggested change
| // we may add Caroussels, Tables and Facts to this list. | |
| // we may add Carousels, Tables and Facts to this list. |
| using Microsoft.UI.Xaml.Controls; | ||
| using Microsoft.Windows.Widgets; | ||
| using Microsoft.Windows.Widgets.Hosts; | ||
| using Newtonsoft.Json.Linq; |
Collaborator
There was a problem hiding this comment.
To encourage not overusing newtonsoft (and making it more clear where we do), can we remove the using and explicitly qualify where we need to down in the code?
1 task
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary of the pull request
The default behavior for Adaptive Cards is to add the data JSON of an action altogether with the existent input data. This change implemented this behavior.
References and relevant issues
Detailed description of the pull request / Additional comments
When a action had data embed in it, it would override all the inputs data from the Adaptive Card. From the documentation, the data is actually intended to be combined with the existent input. This was limiting how widgets could behave and future changes.
Validation steps performed
PR checklist