Skip to content

Commit

Permalink
Correct logo URL
Browse files Browse the repository at this point in the history
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 #16204

Differential Revision: D5978967

Pulled By: TheSavior

fbshipit-source-id: f6af03dfd25d68c96e01054c256d8b6ba9fedba2
  • Loading branch information
gusgard authored and facebook-github-bot committed Oct 4, 2017
1 parent 9c29ee1 commit 2d2dfa2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Libraries/Image/Image.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function generateRequestId() {
* />
* <Image
* style={styles.logo}
* source={{uri: 'http://facebook.github.io/react/img/logo_og.png'}}
* source={{uri: 'https://facebook.github.io/react/logo-og.png'}}
* />
* </View>
* );
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Image/Image.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const ImageViewManager = NativeModules.ImageViewManager;
* />
* <Image
* style={{width: 50, height: 50}}
* source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}}
* source={{uri: 'https://facebook.github.io/react/logo-og.png'}}
* />
* <Image
* style={{width: 66, height: 58}}
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Image/ImageBackground.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import type {NativeMethodsMixinType} from 'ReactNativeTypes';
* return (
* <ImageBackground
* style={{width: 50, height: 50}}
* source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}}
* source={{uri: 'https://facebook.github.io/react/logo-og.png'}}
* >
* <Text>React</Text>
* </ImageBackground>
Expand Down
4 changes: 2 additions & 2 deletions RNTester/RNTesterUnitTests/RCTImageLoaderTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions RNTester/js/ImageExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
]}
/>
</View>
Expand Down Expand Up @@ -237,7 +237,7 @@ exports.examples = [
render: function() {
return (
<Image
source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}}
source={{uri: 'https://facebook.github.io/react/logo-og.png'}}
style={styles.base}
/>
);
Expand Down Expand Up @@ -271,7 +271,7 @@ exports.examples = [
title: 'Error Handler',
render: function() {
return (
<NetworkImageExample source={{uri: 'https://TYPO_ERROR_facebook.github.io/react/img/logo_og.png'}} />
<NetworkImageExample source={{uri: 'https://TYPO_ERROR_facebook.github.io/react/logo-og.png'}} />
);
},
platform: 'ios',
Expand Down Expand Up @@ -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({
Expand Down
8 changes: 4 additions & 4 deletions docs/Images.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ Many of the images you will display in your app will not be available at compile

```javascript
// GOOD
<Image source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}}
<Image source={{uri: 'https://facebook.github.io/react/logo-og.png'}}
style={{width: 400, height: 400}} />

// BAD
<Image source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}} />
<Image source={{uri: 'https://facebook.github.io/react/logo-og.png'}} />
```

### Network Requests for Images
Expand All @@ -110,7 +110,7 @@ Many of the images you will display in your app will not be available at compile

```javascript
<Image source={{
uri: 'https://facebook.github.io/react/img/logo_og.png',
uri: 'https://facebook.github.io/react/logo-og.png',
method: 'POST',
headers: {
Pragma: 'no-cache'
Expand Down Expand Up @@ -147,7 +147,7 @@ to a URL load request, no attempt is made to load the data from the originating
and the load is considered to have failed.

```javascript
<Image source={{uri: 'https://facebook.github.io/react/img/logo_og.png', cache: 'only-if-cached'}}
<Image source={{uri: 'https://facebook.github.io/react/logo-og.png', cache: 'only-if-cached'}}
style={{width: 400, height: 400}} />
```

Expand Down

0 comments on commit 2d2dfa2

Please sign in to comment.