-
Notifications
You must be signed in to change notification settings - Fork 540
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
Updated handling missing text property of TextBlock #4765
Conversation
Hi @jwoo-msft. This non-spec pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along. |
Hi @jwoo-msft; Thanks for taking action on your previously stale pull request. Resetting staleness. |
* Change default value and change rendering behavior * Add skip to failing test
…Cards into jwoo/factset-update
{ | ||
SetText(ParseUtil::GetString(json, AdaptiveCardSchemaKey::Text, true)); | ||
SetText(ParseUtil::GetString(json, AdaptiveCardSchemaKey::Text, false)); |
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.
GetString [](start = 23, length = 9)
We actually want this behavior for all required properties going forward now, right (#4565)? Rather than adding this code here specifically in TextBlock, do we want to update GetString to not throw and to instead add a warning when a required property is missing? That probably requires some follow up in the renderers to make sure that we don't crash on missing properties. But otherwise we'll end up with all "required" properties having this block of code and never passing true
to the ParseUtil functions.
#Resolved
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.
source/dotnet/Library/AdaptiveCards.Rendering.Wpf/AdaptiveTextBlockRenderer.cs
Show resolved
Hide resolved
@@ -0,0 +1,55 @@ | |||
{ |
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.
Can we give this file a more descriptive name? #Resolved
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.
I will remove this card, and merge this card with one in the FactSet into a new card on a new PR.
In reply to: 494599048 [](ancestors = 494599048)
…rds into jwoo/factset-update
* perf investigation * investigation changes * Updated Default Value Handling * Updated app to have explicit render button * reverted button changes * addressed review comments
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.
…ards into jwoo/TextBlockUpdate
* work in progress * updated ChoiceSetInput.cpp * changed the code such that missing text doesn't throw exception * updated TextBlock Test * uwp changes * android changes * Updated Shared Model to include parse warnings * [WPF] Change TextBlock to render only when text is not empty (microsoft#4799) * Change default value and change rendering behavior * Add skip to failing test * perf investigation * investigation changes * Updated Default Value Handling * Updated app to have explicit render button * changed the code such that missing text doesn't throw exception * updated TextBlock Test * uwp changes * android changes * Updated Shared Model to include parse warnings * more changes * Android Changes * work in progress * FactSet for dotnet * ios change * Remove warnings for elements that failed to render and don't perform fallback on them * addressed CR review comments * Updated dotnet Additional Properties Handling (microsoft#4800) * perf investigation * investigation changes * Updated Default Value Handling * Updated app to have explicit render button * reverted button changes * addressed review comments * removed FactSet.Test.json to include comprehensive cards from a new PR * Removed TextBlock.Test.json for udpated card which will be added in separate PR * updated idl * updated factset test Co-authored-by: shalinijoshi19 <shalinij@microsoft.com> Co-authored-by: almedina-ms <35784165+almedina-ms@users.noreply.github.com> Co-authored-by: Alberto Medina Gutierrez <almedina@microsoft.com>
Related Issue
reference #4478
reference #4801
reference #4305
Description
Updated Android / UWP to respect the new parsing / rendering scheme.
Renderers don't fail to render the entire card. Renders make rendering decisions per element.
Renderers will try to render card after they encounter a TextBlock with no text.
How Verified
How you verified the fix, including one or all of the following:
will aid in code reviews or corresponding fixes on other platforms for eg.***
Microsoft Reviewers: Open in CodeFlow