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][New Architecture]: Fix applying of tintColor and progressViewOffset props for RefreshControl component #46628

Conversation

TuTejsy
Copy link
Contributor

@TuTejsy TuTejsy commented Sep 24, 2024

Summary:

While developing my project with New Architecture enabled I've found out that properties tintColor and progressViewOffset of component RefreshControl don't apply on iOS. This happens due to the lack of handling of these properties in the RCTPullToRefreshViewComponentView.mm class.

The bug can be easily reproduced in RNTester app on RefreshControlExample.js screen, since it has property tintColor="#ff0000" (Red color), but RefreshControl renders with gray color:

RefreshControlExample.js gray Refresh Control

This PR is opened to fix that by applying tintColor and progressViewOffset props to _refreshControl in RCTPullToRefreshViewComponentView.mm class.

Changelog:

[IOS][FIXED] - Fix applying of tintColor and progressViewOffset props for RefreshControl component with New Architecture enabled

Test Plan:

  1. Run rn-tester app with New Architecture enabled on iOS
  2. Open screen of RefreshControl component:
Снимок экрана 2024-09-24 в 19 48 49
  1. Open /packages/rn-tester/js/examples/RefreshControl/RefreshControlExample.js file and change properties tintColor and progressViewOffset of RefreshControl components on the line 85:
Снимок экрана 2024-09-24 в 22 01 19
  1. check that your changes applied:
Снимок экрана 2024-09-24 в 19 54 46

…ol component on iOS when newArchitecure enabled
@facebook-github-bot
Copy link
Contributor

Hi @TuTejsy!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@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 Sep 24, 2024
@TuTejsy
Copy link
Contributor Author

TuTejsy commented Sep 24, 2024

Related issue: #46631

Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

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

@TuTejsy thanks for working on the fix!

@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
Copy link
Contributor

@cipolleschi merged this pull request in 19d468f.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @TuTejsy in 19d468f

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

blakef pushed a commit that referenced this pull request Sep 30, 2024
…trol component (#46628)

Summary:
While developing my project with New Architecture enabled I've found out that properties `tintColor` and `progressViewOffset` of component `RefreshControl` don't apply on iOS.  This happens due to the lack of handling of these properties in the `RCTPullToRefreshViewComponentView.mm` class.

The bug can be easily reproduced in RNTester app on RefreshControlExample.js screen, since it has property `tintColor="#ff0000"` (Red color), but RefreshControl renders with gray color:

<img width="300" alt="RefreshControlExample.js" src="https://github.com/user-attachments/assets/10931204-dbe8-4cbd-9adc-d0f38319febd">

<img width="300" alt="gray Refresh Control" src="https://github.com/user-attachments/assets/e5d088e8-b3f5-46b8-9284-9b452232ad10">

<br />
<br />

This PR is opened to fix that by applying `tintColor` and `progressViewOffset` props to `_refreshControl` in `RCTPullToRefreshViewComponentView.mm` class.

Fixes #46628

## Changelog:

[IOS][FIXED] - Fix applying of tintColor and progressViewOffset props for RefreshControl component with New Architecture enabled

Pull Request resolved: #46628

Test Plan:
1. Run rn-tester app with New Architecture enabled on iOS
2. Open screen of RefreshControl component:

<img width="300" alt="Снимок экрана 2024-09-24 в 19 48 49" src="https://github.com/user-attachments/assets/94a2d02d-f3e3-4e18-a345-87c22d4a2620">

3. Open `/packages/rn-tester/js/examples/RefreshControl/RefreshControlExample.js` file and change properties `tintColor` and `progressViewOffset` of  RefreshControl components on the line 85:

<img width="300" alt="Снимок экрана 2024-09-24 в 22 01 19" src="https://github.com/user-attachments/assets/425826a6-d34c-4316-8484-e65f125a8b28">

4. check that your changes applied:

<img width="300" alt="Снимок экрана 2024-09-24 в 19 54 46" src="https://github.com/user-attachments/assets/b97621f1-b553-48c9-bc81-e04a99a7e099">

Reviewed By: cortinico

Differential Revision: D63381050

Pulled By: cipolleschi

fbshipit-source-id: 4f3aed8bd7a1e42ce2a75aa19740fd8be1623c86
@blakef blakef mentioned this pull request Oct 30, 2024
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.

4 participants