Skip to content

Overlay component borderRadius fix #3058

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

Merged
merged 4 commits into from
May 15, 2024
Merged

Conversation

adids1221
Copy link
Contributor

Description

Overlay component fix borderRadius, when using Image component with overlayType and borderRadius the Overlay is covering the Image and leaks out.
Wrapping the Overlay with View with style fix the issue.
Added an example in the screen.

Changelog

Overlay covering fix when passing borderRadius.

Additional info

ticket 4162

</>
);
}
const isVertical = type === OVERLY_TYPES.VERTICAL;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you need to check this one every render?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see you took it out of the render....

{type && this.renderImage(this.getStyleByType(), imageSource)}
{customContent && this.renderCustomContent()}
</>
<View style={{overflow: 'hidden', borderRadius, ...StyleSheet.absoluteFillObject}}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This style can move to the styleSheet while borderRadiuse can be added to an array

Copy link
Collaborator

Choose a reason for hiding this comment

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

No need for absolute, pass flex

@Inbal-Tish
Copy link
Collaborator

@adids1221 The overlay gradient is messed up in your branch, see screenshots:
Uploading Simulator Screenshot - iPhone 15 - 2024-05-08 at 14.16.58.png…

@adids1221 adids1221 requested a review from Inbal-Tish May 8, 2024 11:42
@Inbal-Tish Inbal-Tish merged commit 3d0cecb into master May 15, 2024
1 check passed
@Inbal-Tish Inbal-Tish deleted the fix/overlay_borderRadius branch May 15, 2024 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants