Repository navigation
Default Image resizeMode to cover in C++ - #58862
Closed
bartlomiejbloniarz wants to merge 1 commit into
Closed
bartlomiejbloniarz wants to merge 1 commit into
bartlomiejbloniarz wants to merge 1 commit into
Conversation
Summary: `ImageProps` defaulted `resizeMode` to `stretch`, while the JS `Image` default, the documented default and every Android image view use `cover`. On Android, props equal to their C++ default are not sent when a view is created, so an explicit `resizeMode="stretch"` never reached the view and the image rendered as `cover`. The C++ default is now `cover`. `Image` always sends `resizeMode` on every platform, so the value components receive is unchanged, and iOS initializes its content mode from the default props. Changelog: [General][Fixed] - Fix explicit `resizeMode="stretch"` being ignored on newly created Android `Image`s Differential Revision: D123029410
|
@bartlomiejbloniarz has exported this pull request. If you are a Meta employee, you can view the originating Diff in D123029410. |
|
This pull request has been merged in e560782. |
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.
Summary:
ImagePropsdefaultedresizeModetostretch, while the JSImagedefault, the documented default and every Android image view usecover. On Android, props equal to their C++ default are not sent when a view is created, so an explicitresizeMode="stretch"never reached the view and the image rendered ascover.The C++ default is now
cover.Imagealways sendsresizeModeon every platform, so the value components receive is unchanged, and iOS initializes its content mode from the default props.Changelog: [General][Fixed] - Fix explicit
resizeMode="stretch"being ignored on newly created AndroidImagesDifferential Revision: D123029410