Uh oh!
There was an error while loading. Please reload this page.
Use trait collection to resolve border colors - #32492
Conversation
pull-bot
commented
Oct 28, 2021
PR build artifact for 38d5f6b94114e9e9e0a58943d71de7f64c6cd335 is ready. |
Base commit: f7a66e6 |
Base commit: 384e1a0 |
facebook-github-bot
commented
Jan 27, 2022
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
cortinico
left a comment
There was a problem hiding this comment.
For some reason CLANGFORMAT is flagging those lines:712, 730, 733
I'd say let's rebase this and verify if Circle CI is green. If is still green after the rebase and the internal job I can reformat it manually.
Also cc @sammy-SC for a iOS pass
react@c974cbf changed the border colors to be of UIColor instead of CGColor. This allowed working with dark mode to switch the border colors automatically. However, in certain situation the system can't resolve the current trait collection (see https://stackoverflow.com/a/57177411/2525941). This commit resolves the colors with the current trait collection to ensure the right colors are selected. This matches with the behavior of how the background color is resolved (also in displayLayer:).
danilobuerger
commented
Jan 28, 2022
Hi @cortinico thanks for the review. I rebased it and amended the lines you mentioned. It looks like there were some whitespaces that the linter didn't agree with. |
facebook-github-bot
commented
Jan 28, 2022
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
react-native-bot
commented
Feb 7, 2022
This pull request was successfully merged by @danilobuerger in 9a35818. When will my fix make it into a release? | Upcoming Releases |
danilobuerger
commented
Feb 7, 2022
@cortinico Thank you for taking care of my outstanding PRs. I really do appreciate it. |
cortinico
commented
Feb 8, 2022
Sorry those fell through the cracks 👍 Glad we got to merge them though! |
Summary
c974cbf changed the border colors to be of UIColor instead of CGColor. This allowed working with dark mode to switch the border colors automatically. However, in certain situation the system can't resolve the current trait collection (see https://stackoverflow.com/a/57177411/2525941). This commit resolves the colors with the current trait collection to ensure the right colors are selected. This matches with the behavior of how the background color is resolved (also in displayLayer:).
Changelog
[iOS] [Fixed] - Resolve border platform color based on current trait collection
Test Plan
Same test plan as #29728