From 2d2dfa26bcef2e11b22c089974180ad8a6865158 Mon Sep 17 00:00:00 2001 From: Gustavo Gard Date: Wed, 4 Oct 2017 14:33:20 -0700 Subject: [PATCH] Correct logo URL Summary: Update logo URL https://facebook.github.io/react/img/logo_og.png (old) to https://facebook.github.io/react/logo-og.png (new) Check that the old URL shows a "Page Not Found" and the new URL the correct image. Closes https://github.com/facebook/react-native/pull/16204 Differential Revision: D5978967 Pulled By: TheSavior fbshipit-source-id: f6af03dfd25d68c96e01054c256d8b6ba9fedba2 --- Libraries/Image/Image.android.js | 2 +- Libraries/Image/Image.ios.js | 2 +- Libraries/Image/ImageBackground.js | 2 +- RNTester/RNTesterUnitTests/RCTImageLoaderTests.m | 4 ++-- RNTester/js/ImageExample.js | 8 ++++---- docs/Images.md | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Libraries/Image/Image.android.js b/Libraries/Image/Image.android.js index 4ff533781f5bfd..b953d085515074 100644 --- a/Libraries/Image/Image.android.js +++ b/Libraries/Image/Image.android.js @@ -55,7 +55,7 @@ function generateRequestId() { * /> * * * ); diff --git a/Libraries/Image/Image.ios.js b/Libraries/Image/Image.ios.js index 16588e63f00d82..8b733822260b37 100644 --- a/Libraries/Image/Image.ios.js +++ b/Libraries/Image/Image.ios.js @@ -53,7 +53,7 @@ const ImageViewManager = NativeModules.ImageViewManager; * /> * * * React * diff --git a/RNTester/RNTesterUnitTests/RCTImageLoaderTests.m b/RNTester/RNTesterUnitTests/RCTImageLoaderTests.m index 1fe160809d7b29..59e8b30080c899 100644 --- a/RNTester/RNTesterUnitTests/RCTImageLoaderTests.m +++ b/RNTester/RNTesterUnitTests/RCTImageLoaderTests.m @@ -54,7 +54,7 @@ - (void)testImageLoading NS_VALID_UNTIL_END_OF_SCOPE RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:_bundleURL moduleProvider:^{ return @[loader]; } launchOptions:nil]; - NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://facebook.github.io/react/img/logo_og.png"]]; + NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://facebook.github.io/react/logo-og.png"]]; [bridge.imageLoader loadImageWithURLRequest:urlRequest size:CGSizeMake(100, 100) scale:1.0 clipped:YES resizeMode:RCTResizeModeContain progressBlock:^(int64_t progress, int64_t total) { XCTAssertEqual(progress, 1); XCTAssertEqual(total, 1); @@ -85,7 +85,7 @@ - (void)testImageLoaderUsesImageURLLoaderWithHighestPriority NS_VALID_UNTIL_END_OF_SCOPE RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:_bundleURL moduleProvider:^{ return @[loader1, loader2]; } launchOptions:nil]; - NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://facebook.github.io/react/img/logo_og.png"]]; + NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://facebook.github.io/react/logo-og.png"]]; [bridge.imageLoader loadImageWithURLRequest:urlRequest size:CGSizeMake(100, 100) scale:1.0 clipped:YES resizeMode:RCTResizeModeContain progressBlock:^(int64_t progress, int64_t total) { XCTAssertEqual(progress, 1); XCTAssertEqual(total, 1); diff --git a/RNTester/js/ImageExample.js b/RNTester/js/ImageExample.js index c4d83012725575..8d858777611f31 100644 --- a/RNTester/js/ImageExample.js +++ b/RNTester/js/ImageExample.js @@ -197,7 +197,7 @@ var MultipleSourcesExample = createReactClass({ source={[ {uri: 'https://facebook.github.io/react/img/logo_small.png', width: 38, height: 38}, {uri: 'https://facebook.github.io/react/img/logo_small_2x.png', width: 76, height: 76}, - {uri: 'https://facebook.github.io/react/img/logo_og.png', width: 400, height: 400} + {uri: 'https://facebook.github.io/react/logo-og.png', width: 400, height: 400} ]} /> @@ -237,7 +237,7 @@ exports.examples = [ render: function() { return ( ); @@ -271,7 +271,7 @@ exports.examples = [ title: 'Error Handler', render: function() { return ( - + ); }, platform: 'ios', @@ -727,7 +727,7 @@ exports.examples = [ }, ]; -var fullImage = {uri: 'https://facebook.github.io/react/img/logo_og.png'}; +var fullImage = {uri: 'https://facebook.github.io/react/logo-og.png'}; var smallImage = {uri: 'https://facebook.github.io/react/img/logo_small_2x.png'}; var styles = StyleSheet.create({ diff --git a/docs/Images.md b/docs/Images.md index d2eca6a996de46..4e05595ebe3452 100644 --- a/docs/Images.md +++ b/docs/Images.md @@ -97,11 +97,11 @@ Many of the images you will display in your app will not be available at compile ```javascript // GOOD - // BAD - + ``` ### Network Requests for Images @@ -110,7 +110,7 @@ Many of the images you will display in your app will not be available at compile ```javascript ```