Skip to content

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

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!

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
Contributor

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.

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.

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 <[email protected]>
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