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

Add children to separate _containerView, if needed #46189

Closed
wants to merge 1 commit into from

Conversation

joevilches
Copy link
Contributor

Summary:
A lot of the style decorators we have (filters, box shadows, borders, etc) use a separate sub-CALayer to accomplish what they want. This becomes an issue if we are clipping the content to the bounds and if these decorators extend beyond the bounds of the view as they are typically unaffected by this clipping. The main things here are box-shadow and outline. However, this implementation will let us fix some issues w.r.t content rendering under borders. See later diffs for that.

To fix this, if needed, we insert a _containerView to contain all of our subviews, and actually apply the clipping to. If this exists, our UIView will only have one subview, this one. But it may have multiple sublayers.

NOTE: This diff does not actually redirect the clipping. It just inserts the subview to test if this breaks anything in and of itself.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D61414649

@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. p: Facebook Partner: Facebook Partner labels Aug 23, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61414649

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61414649

joevilches added a commit to joevilches/react-native that referenced this pull request Aug 23, 2024
Summary:
Pull Request resolved: facebook#46189

A lot of the style decorators we have (filters, box shadows, borders, etc) use a separate sub-CALayer to accomplish what they want. This becomes an issue if we are clipping the content to the bounds and if these decorators extend beyond the bounds of the view as they are typically unaffected by this clipping. The main things here are `box-shadow` and `outline`. However, this implementation will let us fix some issues w.r.t content rendering under borders. See later diffs for that.

To fix this, if needed, we insert a `_containerView` to contain all of our subviews, and actually apply the clipping to. If this exists, our UIView will only have one subview, this one. But it may have multiple sublayers.

NOTE: This diff does not actually redirect the clipping. It just inserts the subview to test if this breaks anything in and of itself.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D61414649
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61414649

joevilches added a commit to joevilches/react-native that referenced this pull request Aug 23, 2024
Summary:
Pull Request resolved: facebook#46189

A lot of the style decorators we have (filters, box shadows, borders, etc) use a separate sub-CALayer to accomplish what they want. This becomes an issue if we are clipping the content to the bounds and if these decorators extend beyond the bounds of the view as they are typically unaffected by this clipping. The main things here are `box-shadow` and `outline`. However, this implementation will let us fix some issues w.r.t content rendering under borders. See later diffs for that.

To fix this, if needed, we insert a `_containerView` to contain all of our subviews, and actually apply the clipping to. If this exists, our UIView will only have one subview, this one. But it may have multiple sublayers.

NOTE: This diff does not actually redirect the clipping. It just inserts the subview to test if this breaks anything in and of itself.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D61414649
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61414649

joevilches added a commit to joevilches/react-native that referenced this pull request Aug 26, 2024
Summary:
Pull Request resolved: facebook#46189

A lot of the style decorators we have (filters, box shadows, borders, etc) use a separate sub-CALayer to accomplish what they want. This becomes an issue if we are clipping the content to the bounds and if these decorators extend beyond the bounds of the view as they are typically unaffected by this clipping. The main things here are `box-shadow` and `outline`. However, this implementation will let us fix some issues w.r.t content rendering under borders. See later diffs for that.

To fix this, if needed, we insert a `_containerView` to contain all of our subviews, and actually apply the clipping to. If this exists, our UIView will only have one subview, this one. But it may have multiple sublayers.

NOTE: This diff does not actually redirect the clipping. It just inserts the subview to test if this breaks anything in and of itself.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D61414649
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61414649

joevilches added a commit to joevilches/react-native that referenced this pull request Aug 27, 2024
Summary:
Pull Request resolved: facebook#46189

A lot of the style decorators we have (filters, box shadows, borders, etc) use a separate sub-CALayer to accomplish what they want. This becomes an issue if we are clipping the content to the bounds and if these decorators extend beyond the bounds of the view as they are typically unaffected by this clipping. The main things here are `box-shadow` and `outline`. However, this implementation will let us fix some issues w.r.t content rendering under borders. See later diffs for that.

To fix this, if needed, we insert a `_containerView` to contain all of our subviews, and actually apply the clipping to. If this exists, our UIView will only have one subview, this one. But it may have multiple sublayers.

NOTE: This diff does not actually redirect the clipping. It just inserts the subview to test if this breaks anything in and of itself.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D61414649
Summary:
Pull Request resolved: facebook#46189

A lot of the style decorators we have (filters, box shadows, borders, etc) use a separate sub-CALayer to accomplish what they want. This becomes an issue if we are clipping the content to the bounds and if these decorators extend beyond the bounds of the view as they are typically unaffected by this clipping. The main things here are `box-shadow` and `outline`. However, this implementation will let us fix some issues w.r.t content rendering under borders. See later diffs for that.

To fix this, if needed, we insert a `_containerView` to contain all of our subviews, and actually apply the clipping to. If this exists, our UIView will only have one subview, this one. But it may have multiple sublayers.

NOTE: This diff does not actually redirect the clipping. It just inserts the subview to test if this breaks anything in and of itself.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D61414649
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61414649

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

This pull request has been merged in 2176866.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @joevilches in 2176866

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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants