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

[Standalone for NativeComponents] AndroidViewPagers.js #22995

Closed
wants to merge 3 commits into from

Conversation

Kriyszig
Copy link

@Kriyszig Kriyszig commented Jan 15, 2019

[Android][Changed] - All the imports connected to requireNativeComponent in ViewPager was moved to a separate file.
Issue in focus: #22990

Test Plan:

  • yarn test
  • yarn flow
  • yarn lint

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up 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 the corporate CLA signed.

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

@pull-bot
Copy link

Warnings
⚠️

📋 Changelog - This PR appears to be missing Changelog.

Generated by 🚫 dangerJS

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 15, 2019
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@Kriyszig
Copy link
Author

@TheSavior, sorry for the ping but I'm not quite able to comprehend the NSInternalInconsistencyException being thrown during the IOS build. Did this arise as a result of the changes I have made cause I couldn't link them to ViewPager

Copy link
Member

@elicwhite elicwhite left a comment

Choose a reason for hiding this comment

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

I think the iOS errors are unrelated.

Thanks for moving this out into its own file! One of the important parts of this issue is to define the flow type for this component. Can you help do that for this PR? You can probably figure out most of the type by looking at the file that originally included the call site and the props passed to it.

For the syntax of how to do this you can take a look at SwitchNativeComponent.js

@Kriyszig
Copy link
Author

Thanks for the clarification. On it! (^_^)

@elicwhite elicwhite self-assigned this Jan 16, 2019
Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues.

All the imports connected to requireNativeComponent in ViewPager was moved to  a seperate file.
@Kriyszig Kriyszig force-pushed the nativecomp branch 2 times, most recently from 54ffc6d to aa7e02a Compare January 19, 2019 13:49
Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues.

@Kriyszig Kriyszig force-pushed the nativecomp branch 4 times, most recently from e649341 to 943bbc7 Compare January 19, 2019 14:52
Added missing flow type for native component to document.
@Kriyszig
Copy link
Author

@TheSavior, Sorry for the delay, I was having minor trouble with implementing the flow type for the component. I have run into the problem of inexact types and have tried various ways to counter it without any success [ci/circleci: analyze]. I have not made any changes to the part throwing this error and am having a hard time finding a solution. Would love some direction to solve this (^_^)

@Kriyszig
Copy link
Author

Nevermind, I found the error 😅. The PageScrollStateChanged had a flaw right from the beginning where type of actual parameter wasn't matching with what was declared in the formal parameter. Changes made in the latest commit made the two consistent. I'm sorry for the ping, should have looked at the error message harder. Thank you

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Jan 22, 2019
@cpojer
Copy link
Contributor

cpojer commented Jan 22, 2019

Thanks for the PR! While your change is technically breaking, I think you are changing the callback to be consistent so it makes sense to me to change.

@Kriyszig
Copy link
Author

I observed the call to be inconsistent with the rest and found a hard time writing the flow type. When I cross referenced with the other calls, the parameters always seemed to be an event and hence decided to change it. I was waiting for a review to verify whether that decision was right or wrong. Thanks for the approval (^_^)

@react-native-bot
Copy link
Collaborator

@VisibleMarkov merged commit ec488dc into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Jan 22, 2019
@react-native-bot react-native-bot added the Merged This PR has been merged. label Jan 22, 2019
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 6, 2019
matt-oakes pushed a commit to matt-oakes/react-native that referenced this pull request Feb 7, 2019
Summary:
[Android][Changed] - All the imports connected to `requireNativeComponent` in `ViewPager` was moved to  a separate file.
Issue in focus: facebook#22990
Pull Request resolved: facebook#22995

Differential Revision: D13760459

Pulled By: cpojer

fbshipit-source-id: fca1633ce933ea4909ef81d7bbe8123d654e24fb
ferrannp pushed a commit to ferrannp/react-native-viewpager that referenced this pull request Feb 8, 2019
Summary:
[Android][Changed] - All the imports connected to `requireNativeComponent` in `ViewPager` was moved to  a separate file.
Issue in focus: #22990
Pull Request resolved: facebook/react-native#22995

Differential Revision: D13760459

Pulled By: cpojer

fbshipit-source-id: fca1633ce933ea4909ef81d7bbe8123d654e24fb
james-watkin added a commit to james-watkin/react-native-pager-view that referenced this pull request Dec 28, 2021
Summary:
[Android][Changed] - All the imports connected to `requireNativeComponent` in `ViewPager` was moved to  a separate file.
Issue in focus: #22990
Pull Request resolved: facebook/react-native#22995

Differential Revision: D13760459

Pulled By: cpojer

fbshipit-source-id: fca1633ce933ea4909ef81d7bbe8123d654e24fb
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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. Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants