Skip to content
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

Feature/heading styles #5736

Merged
merged 16 commits into from
May 21, 2021
Merged

Feature/heading styles #5736

merged 16 commits into from
May 21, 2021

Conversation

RebeccaAnne
Copy link
Contributor

@RebeccaAnne RebeccaAnne commented Apr 27, 2021

Related Issue

Merges feature branch that will contain fixes for #5632, #5633, #5634, and #5631. This branch is not currently ready to merge as not all fixes are in yet.

Description

Feature branch for shared model platforms

Microsoft Reviewers: Open in CodeFlow

RebeccaAnne and others added 5 commits April 22, 2021 09:04
{
return defaultEnumValue;
}
return std::nullopt;
Copy link
Member

Choose a reason for hiding this comment

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

@RebeccaAnne,
Returnnig nullopt for empty value seems to be inconsistent with returnning the default value from the line 157 when the given string value doesn't map to enum values. For example, for "", will return nullopt, but "Hello World" for horizontal alignment will return HorizontalAlignmentLeft. returnning nullopt makes more sense since we have to know if the user set the value or not. But then the renderers have to know what is the proper default values. We could have a util function for returnning the default values for cross platforms.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're first point is a good one, and I updated the enum magic code to not set the default from something like "Hello World". Since most of the callers of this are coming through ParseUtil::GetEnumValue those callers will set the default anyway, but for the ones coming directly through ParseUtil::GetOptionalEnumValue should now get nullopt in that case.

It is correct that with this setup the renderers do need to know the defaults. I'm not opposed to setting something up in shared model to ensure we've got consistent defaults cross platform. Could you log an issue to track adding that?

Copy link
Member

Choose a reason for hiding this comment

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

+1 to this, would love to move the defaults for all optionals back into the object model

* [iOS] Added heading styles

* [iOS] Added heading styles

* [iOS] fixed font family error & adjusted font weight value & fixed isSubtle
@ghost ghost added the no-recent-activity label May 10, 2021
@ghost
Copy link

ghost commented May 10, 2021

Hi @RebeccaAnne. 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.

@ghost ghost removed the no-recent-activity label May 18, 2021
@ghost
Copy link

ghost commented May 18, 2021

Hi @RebeccaAnne; Thanks for taking action on your previously stale pull request. Resetting staleness.

@RebeccaAnne RebeccaAnne marked this pull request as ready for review May 18, 2021 16:57
@golddove golddove enabled auto-merge (squash) May 21, 2021 00:40
@golddove golddove merged commit 60ae712 into main May 21, 2021
@golddove golddove deleted the feature/HeadingStyles branch May 21, 2021 03:16
michaelfarnsworth pushed a commit to michaelfarnsworth/AdaptiveCards that referenced this pull request Nov 10, 2022
* [Shared] Add heading style support (microsoft#5702)

* [UWP] Add Heading Styling support (microsoft#5708)

* [Shared] Add heading style support

* [UWP] Add Heading Styling support

* [Android] Add heading style support (microsoft#5740)

* [Android] Text Heading styles

* Update samples

* PR feedback

* Update tests

* [iOS] Text Styles Changes (microsoft#5759)

* [iOS] Added heading styles

* [iOS] Added heading styles

* [iOS] fixed font family error & adjusted font weight value & fixed isSubtle

* String to enum handling doesn't set default.

* Fix shared model tests from enum changes

* small swig fix

* Fix shared model break

* Re-SWIG after merge

* Re-SWIG

Co-authored-by: Risheek Rajolu <risheekrr@gmail.com>
Co-authored-by: Joseph Woo <Joseph.Woo@microsoft.com>
rankush pushed a commit to rankush/AdaptiveCards that referenced this pull request May 8, 2024
* [Shared] Add heading style support (microsoft#5702)

* [UWP] Add Heading Styling support (microsoft#5708)

* [Shared] Add heading style support

* [UWP] Add Heading Styling support

* [Android] Add heading style support (microsoft#5740)

* [Android] Text Heading styles

* Update samples

* PR feedback

* Update tests

* [iOS] Text Styles Changes (microsoft#5759)

* [iOS] Added heading styles

* [iOS] Added heading styles

* [iOS] fixed font family error & adjusted font weight value & fixed isSubtle

* String to enum handling doesn't set default.

* Fix shared model tests from enum changes

* small swig fix

* Fix shared model break

* Re-SWIG after merge

* Re-SWIG

Co-authored-by: Risheek Rajolu <risheekrr@gmail.com>
Co-authored-by: Joseph Woo <Joseph.Woo@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants