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

Make REQUEST_LAUNCH codes public #1713

Merged
merged 3 commits into from
May 21, 2021
Merged

Conversation

kas
Copy link
Contributor

@kas kas commented May 19, 2021

Thanks for submitting a PR! Please read these instructions carefully:

  • Explain the motivation for making this change.
  • Provide a test plan demonstrating that the code is solid.
  • Match the code formatting of the rest of the codebase.
  • Target the master branch, NOT a "stable" branch.

Motivation (required)

Thanks in advance for taking a look. The product I work on uses react-native-image-picker. We would like to hook directly into these REQUEST_LAUNCH codes, but newer versions of this package don't expose them publicly anymore. I looked at the change that took them from public to private, and there didn't seem to be an explicit reason for the change. This change just makes them public again.

Test Plan (required)

Just a minor change to make it easier for consuming apps to use these codes. Just making the 4 codes public.

@kas kas requested a review from Johan-dutoit as a code owner May 19, 2021 21:25
@ravirajn22
Copy link
Contributor

ravirajn22 commented May 20, 2021

Tell us how this hook works, why do you require request codes? The best thing would be just fork this library, make changes and use it. Since this change is simple we might consider it, but I don't think its right.

Since its internal code we will refactor it any time as it requires, so best thing is you just fork it. Already in latest versions some of the request codes are changed after you created this PR.

@kas
Copy link
Contributor Author

kas commented May 20, 2021

Thanks for checking this out Raviraj. Our hook does some native processing on the image after it's picked.

I understand that version changes mean the request codes can change, isn't it fair to let consumers handle that change in their code if they consume the request codes directly? IMO this is just extending functionality that consumers can opt to use.

Cheers

@ravirajn22
Copy link
Contributor

ravirajn22 commented May 20, 2021

ok. Just add a comment why it is public, simple one liner will do above the code. @Johan-dutoit LGTM

@Johan-dutoit Johan-dutoit merged commit b110113 into react-native-image-picker:main May 21, 2021
Johan-dutoit pushed a commit that referenced this pull request May 21, 2021
# [3.8.0](v3.7.0...v3.8.0) (2021-05-21)

### Features

* **android:** expose REQUEST_LAUNCH codes ([#1713](#1713)) ([b110113](b110113))
@Johan-dutoit
Copy link
Collaborator

🎉 This PR is included in version 3.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

rupa982 added a commit to rupa982/react-native-image-picker that referenced this pull request Jun 11, 2021
MattDennyir pushed a commit to MattDennyir/react-native-image-picker that referenced this pull request Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants