Fix <Image> resizeMode="cover"#407
Merged
tom-un merged 38 commits intomicrosoft:masterfrom May 21, 2020
Merged
Conversation
…iew." This reverts commit 5a67ae0.
anandrajeswaran
approved these changes
May 21, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please select one of the following
Summary
The
<Image>propresizeMode="cover"was not working. The reason was due to an incorrect manual merge from upstream. In the past RCTImageView was a subclass of UIImageView. When the macOS port was created it sublcassed NSImageView. About 13 months ago upstream RCTImageView was changed to subclass RCTView. When we merged that subtlety wasn't caught and we continued to sublcass NSImageView. So when the imageScaling property was being mapped from the JS, it was setting it on the RCTImageView/NSImageView instead of the subview which is the real NSImageView that loads the image.Also, the RNTesterExampleContainer has a
platformproperty that upstream is a string, but in the fork can be a string or an Array. During a past merge we lost the changed in RNTesterExampleContainer that understood thatplatformcould be an Array so we were not showing test containers that were['ios', 'macos'].Several of the ImageExample tests couldn't load an image because the facebook image urls are no longer valid. This change cherry picks some changes from react-native master to use the most up-to-date image urls.
The 'Bundled images' test container was duplicated for macOS. This change de-dupes it.
Resolves issue #316
Changelog
[macOS] [Fixed] - Fix
resizeMode="cover"
Test Plan
Tested in RNTester.
Microsoft Reviewers: Open in CodeFlow