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

[Fabric] Enable ShadowProps for all Fabric Components #12108

Merged

Conversation

TatianaKapos
Copy link
Contributor

@TatianaKapos TatianaKapos commented Sep 5, 2023

Description

Finish implementing ShadowProps for other components in Fabric (Text, Image, TextInput, ScrollView, ActivityIndicator, Switch)

Type of Change

  • New feature (non-breaking change which adds functionality)

Why

Resolves #11754

What

Extracted logic from View Component to Base Component for ShadowProps. Named helper method updateStyleProps so we can extract more logic in the future.

Screenshots

image

Testing

tested locally!

Changelog

no

Microsoft Reviewers: Open in CodeFlow

@TatianaKapos TatianaKapos requested a review from a team as a code owner September 5, 2023 23:28
@microsoft-github-policy-service microsoft-github-policy-service bot added the Area: Fabric Support Facebook Fabric label Sep 5, 2023
@@ -90,7 +90,7 @@ struct ScrollInteractionTrackerOwner : public winrt::implements<
void updateContentVisualSize() noexcept;

facebook::react::Size m_contentSize;
winrt::Microsoft::ReactNative::Composition::IVisual m_visual{nullptr};
winrt::Microsoft::ReactNative::Composition::ISpriteVisual m_visual{nullptr};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@acoates-ms Every other component m_visual was a ISpriteVisual, so changed ScrollView's to match and it seemed to not affect anything on rnTester. Let me know if there was a reason for having this as a IVisual though and I can change it back!

@@ -50,6 +50,10 @@ struct CompositionBaseComponentView : public IComponentView,
void updateBorderProps(
const facebook::react::ViewProps &oldViewProps,
const facebook::react::ViewProps &newViewProps) noexcept;
void updateStyleProps(
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this should be called updateShadowProps, since that what it seems to handle. -- There are a lot of style props.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree, best to keep them in groupings so we have view components can be more granular about opting-in.

@@ -50,6 +50,10 @@ struct CompositionBaseComponentView : public IComponentView,
void updateBorderProps(
const facebook::react::ViewProps &oldViewProps,
const facebook::react::ViewProps &newViewProps) noexcept;
void updateStyleProps(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree, best to keep them in groupings so we have view components can be more granular about opting-in.

Co-authored-by: Jon Thysell <thysell@gmail.com>
@TatianaKapos TatianaKapos merged commit cff3261 into microsoft:main Sep 6, 2023
42 checks passed
@TatianaKapos TatianaKapos deleted the tk-fabric-backfaceVisibility branch September 6, 2023 17:30
@jonthysell jonthysell added the New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Fabric Support Facebook Fabric New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Fabric] Finish implementing ShadowProps for other components
3 participants