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

Fix Android border clip check #37828

Closed
wants to merge 1 commit into from

Conversation

gabrieldonadel
Copy link
Collaborator

@gabrieldonadel gabrieldonadel commented Jun 12, 2023

Summary:

Instead of requiring all types of border color values to be present we should only take into consideration the left, top, right, bottom, and allEdges values and inject block values into colorBottom and colorTop.

This PR only addresses the first issue described here (#37753 (comment)) by @kelset

Changelog:

[ANDROID] [FIXED] - Fix border clip check

Test Plan:

Test through rn-tester if border color is being applied

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. p: Expo Partner: Expo Partner labels Jun 12, 2023
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,747,820 -14
android hermes armeabi-v7a 8,060,426 -9
android hermes x86 9,239,427 -13
android hermes x86_64 9,089,231 -7
android jsc arm64-v8a 9,310,371 -58
android jsc armeabi-v7a 8,500,308 -55
android jsc x86 9,372,865 -61
android jsc x86_64 9,626,771 -53

Base commit: 03f70bf
Branch: main

Copy link
Contributor

@kelset kelset left a comment

Choose a reason for hiding this comment

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

tested locally in 0.72-stable branch, it addresses the main regression introduced:

Screenshot 2023-06-12 at 14 38 54

Comment on lines +572 to +581
if (isBorderColorDefined(Spacing.BLOCK)) {
colorBottom = colorBlock;
colorTop = colorBlock;
}
if (isBorderColorDefined(Spacing.BLOCK_END)) {
colorBottom = colorBlockEnd;
}
if (isBorderColorDefined(Spacing.BLOCK_START)) {
colorTop = colorBlockStart;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

small nit and def not to address in this PR given the urgency - but this section of the code is repeated 3 times as far as I can see in this file (at L366, L575, L1171), we should look into dedup.

@kelset kelset changed the title Fix Android border clip check on Paper Fix Android border clip check Jun 12, 2023
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jun 12, 2023
@facebook-github-bot
Copy link
Contributor

@cipolleschi merged this pull request in 7d1f7f3.

@gabrieldonadel gabrieldonadel deleted the fix-border-clip branch June 12, 2023 17:32
kelset pushed a commit that referenced this pull request Jun 13, 2023
Summary:
Instead of requiring all  types of border color values to be present we should only take into consideration the left, top, right, bottom, and allEdges values and inject block values into  colorBottom and colorTop.

This PR only addresses the first issue described here (#37753 (comment)) by kelset

## Changelog:

[ANDROID] [FIXED] - Fix border clip check

Pull Request resolved: #37828

Test Plan:
Test through rn-tester if border color is being applied

<img width="482" alt="image" src="https://github.com/facebook/react-native/assets/11707729/c8c8772c-da8d-4393-bc3f-5868eca5df15">

Reviewed By: lunaleaps

Differential Revision: D46643773

Pulled By: cipolleschi

fbshipit-source-id: efb1ea81bf2462c14767a2554880eb7c44989975
Kudo pushed a commit to expo/react-native that referenced this pull request Jun 15, 2023
Summary:
Instead of requiring all  types of border color values to be present we should only take into consideration the left, top, right, bottom, and allEdges values and inject block values into  colorBottom and colorTop.

This PR only addresses the first issue described here (facebook#37753 (comment)) by kelset

## Changelog:

[ANDROID] [FIXED] - Fix border clip check

Pull Request resolved: facebook#37828

Test Plan:
Test through rn-tester if border color is being applied

<img width="482" alt="image" src="https://github.com/facebook/react-native/assets/11707729/c8c8772c-da8d-4393-bc3f-5868eca5df15">

Reviewed By: lunaleaps

Differential Revision: D46643773

Pulled By: cipolleschi

fbshipit-source-id: efb1ea81bf2462c14767a2554880eb7c44989975
(cherry picked from commit 2d15f50)
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. p: Expo Partner: Expo Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants