-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Fabric] Enable ShadowProps for all Fabric Components #12108
Conversation
@@ -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}; |
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.
@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( |
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.
Maybe this should be called updateShadowProps, since that what it seems to handle. -- There are a lot of style props.
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 agree, best to keep them in groupings so we have view components can be more granular about opting-in.
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp
Outdated
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp
Outdated
Show resolved
Hide resolved
@@ -50,6 +50,10 @@ struct CompositionBaseComponentView : public IComponentView, | |||
void updateBorderProps( | |||
const facebook::react::ViewProps &oldViewProps, | |||
const facebook::react::ViewProps &newViewProps) noexcept; | |||
void updateStyleProps( |
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 agree, best to keep them in groupings so we have view components can be more granular about opting-in.
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h
Outdated
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp
Outdated
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp
Outdated
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp
Outdated
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp
Outdated
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Jon Thysell <thysell@gmail.com>
Description
Finish implementing ShadowProps for other components in Fabric (Text, Image, TextInput, ScrollView, ActivityIndicator, Switch)
Type of Change
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
Testing
tested locally!
Changelog
no
Microsoft Reviewers: Open in CodeFlow