Skip to content

Conversation

@brentvatne
Copy link
Collaborator

This is a WIP, just finished the first bit and wanted to get some feedback to see if this approach seems appropriate, as I haven't done a lot of Android development.

Looks ready for review now.

@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @mkonicek, @kmagiera and @spicyj to be potential reviewers.

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Oct 30, 2015
@mkonicek
Copy link
Contributor

Cool! I'll pass this to Tyrone who works on Fresco to take a look.

@mkonicek
Copy link
Contributor

Should we make it consistent with iOS which has onLoadStart, onLoadEnd etc.?
https://facebook.github.io/react-native/docs/image.html

Copy link
Contributor

Choose a reason for hiding this comment

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

do you plan to actually pass some data here? Otherwise it would be more efficient to send null instead of creating empty map

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it looks like on iOS we just pass null, so unless someone can think of a good reason to do otherwise I'll change it to null here as well

@facebook-github-bot
Copy link
Contributor

@brentvatne updated the pull request.

4 similar comments
@facebook-github-bot
Copy link
Contributor

@brentvatne updated the pull request.

@facebook-github-bot
Copy link
Contributor

@brentvatne updated the pull request.

@facebook-github-bot
Copy link
Contributor

@brentvatne updated the pull request.

@facebook-github-bot
Copy link
Contributor

@brentvatne updated the pull request.

@brentvatne
Copy link
Collaborator Author

@mkonicek @tyronen @kmagiera - thanks for the great tips! I've factored them in and updated this PR. I also added an example to UIExplorer. I don't write a lot of Java so let me know if I did something weird and what you would suggest I do instead, please!

At the moment it supports: onLoadStart, onLoadEnd and onLoad. I added a comment about the absence of onError and onProgress being missing -- we can circle back and add those when support exists in fresco if that sounds good to you guys.

@satya164
Copy link
Contributor

satya164 commented Nov 2, 2015

+1

Copy link
Contributor

Choose a reason for hiding this comment

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

you mentioned onError isn't working on android, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

correct -- this line is actually removing the platform annotation for onLoad

@kmagiera
Copy link
Contributor

kmagiera commented Nov 3, 2015

Getting there - few more comments

@mkonicek
Copy link
Contributor

mkonicek commented Nov 7, 2015

Thanks for working on this!

@brentvatne
Copy link
Collaborator Author

@kmagiera - just on vacation atm so not as much time but I will try to get to this over the next few days :) thanks for the review!

@kmagiera
Copy link
Contributor

Looks great. Just a few more things outlined above. Thanks for your patience

@facebook-github-bot
Copy link
Contributor

@brentvatne updated the pull request.

@brentvatne
Copy link
Collaborator Author

@kmagiera @mkonicek - feedback addressed, thanks guys!

@facebook-github-bot
Copy link
Contributor

@brentvatne updated the pull request.

@kmagiera
Copy link
Contributor

Great job, this PR deserves some cool gif

@facebook-github-bot shipit

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/550311681783433/int_phab to review.

@mkonicek
Copy link
Contributor

Failed to land due to a Flow error. You can also see a repro for that on Travis. I asked the Flow guys about the correct way to fix this.

@brentvatne
Copy link
Collaborator Author

@mkonicek - fixed that and also noticed that f2545ba required me to add the shouldNotifyLoadEvents property to the new cfg at the bottom of Image.android.js

@facebook-github-bot
Copy link
Contributor

@brentvatne updated the pull request.

@mkonicek
Copy link
Contributor

@facebook-github-bot shipit

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/550311681783433/int_phab to review.

@mkonicek
Copy link
Contributor

Finally landed 🎉

The Android PRs often require changes to Buck files in order for them to build internally. This makes merging them quite a bit of work :( Some ideas how to fix this:

  • Have one Buck file for all of OSS RN instead of many granular Buck files
  • Open source all Buck files and report failures back to github (PITA)

sunnylqm pushed a commit to sunnylqm/react-native that referenced this pull request Dec 2, 2015
Summary: ~~This is a WIP, just finished the first bit and wanted to get some feedback to see if this approach seems appropriate, as I haven't done a lot of Android development.~~

Looks ready for review now.
Closes facebook#3791

Reviewed By: svcscm

Differential Revision: D2672262

Pulled By: mkonicek

fb-gh-sync-id: 1e8f1cc6658fb719a68f7da455f30a7c9b1db730
Crash-- pushed a commit to Crash--/react-native that referenced this pull request Dec 24, 2015
Summary: ~~This is a WIP, just finished the first bit and wanted to get some feedback to see if this approach seems appropriate, as I haven't done a lot of Android development.~~

Looks ready for review now.
Closes facebook#3791

Reviewed By: svcscm

Differential Revision: D2672262

Pulled By: mkonicek

fb-gh-sync-id: 1e8f1cc6658fb719a68f7da455f30a7c9b1db730
}

@Override
public void onFailure(String id, Throwable throwable) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You are saying that fresco doesn't support ON_ERROR but you have onFailure here. Is the comment not correct? Any reason why you don't throw ON_ERROR here?

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants