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

[iOS] Fabric: Fixes LayoutConformanceView not work #48253

Closed

Conversation

zhongwuzw
Copy link
Contributor

Summary:

Fixes iOS LayoutConformanceView not work, seems caused by #48188. @NickGerleman can you help to review please?

Changelog:

[IOS] [FIXED] - Fabric: Fixes LayoutConformanceView not work

Test Plan:

Before:
image

After:
image

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Dec 13, 2024
Comment on lines +19 to +26
class LayoutConformanceShadowNode final
: public ConcreteShadowNode<
LayoutConformanceShadowNodeComponentName,
YogaLayoutableShadowNode,
LayoutConformanceProps> {
public:
using ConcreteShadowNode::ConcreteShadowNode;
};
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this part is required

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@javache Seems this check cannot work if we don't subclass ConcreteShadowNode:

if (auto layoutConformanceNode =
dynamic_cast<const LayoutConformanceShadowNode*>(this)) {

Copy link
Member

Choose a reason for hiding this comment

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

Oh yeah, interesting. Maybe a different behaviour in compilers.

Comment on lines +19 to +26
class LayoutConformanceShadowNode final
: public ConcreteShadowNode<
LayoutConformanceShadowNodeComponentName,
YogaLayoutableShadowNode,
LayoutConformanceProps> {
public:
using ConcreteShadowNode::ConcreteShadowNode;
};
Copy link
Member

Choose a reason for hiding this comment

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

Oh yeah, interesting. Maybe a different behaviour in compilers.

@facebook-github-bot
Copy link
Contributor

@javache has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@NickGerleman
Copy link
Contributor

Huge thanks! This seemed to work for internal Buck build of RNTester for iOS, but I think it may do some things behind the scenes I didn't realize.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Dec 16, 2024
@facebook-github-bot
Copy link
Contributor

@javache merged this pull request in 6076a41.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @zhongwuzw in 6076a41

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants