-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(image): support for resizeMode
and objectFit
value of 'none'
#47110
feat(image): support for resizeMode
and objectFit
value of 'none'
#47110
Conversation
Thanks for the PR! The native changes seem relatively simple so happy to merge this. Please have a look if you can make this work with Paper too, so we don't need to add a compatibility notice (I think it will already work on Android paper as-is). If it adds additional complexity, let's leave it as-is. |
Error ReferenceError
Dangerfile
|
Summary: While working on #47110, I wanted to disable fabric in the `rn-tester` to test some things in Paper. I followed all the steps but ended up deleting the whole repository locally, cloning it again and explicitly installing the pods `fabric_enabled` in all steps and it didn't work. I ended up disabling the new architecture by passing `RCT_NEW_ARCH_ENABLED=0` and then it worked immediately. Wanted to add this extra hint as it might help other contributors. ## Changelog: [INTERNAL] [ADDED] - extra instructions to disable fabric in the `rn-tester` package Pull Request resolved: #47127 Test Plan: Follow the instructions to disable fabric, try passing `RCT_NEW_ARCH_ENABLED=0` if `fabric_enabled = false` is not enough. Reviewed By: cortinico Differential Revision: D64652149 Pulled By: rshest fbshipit-source-id: 0fc4149832a7973c57161b4fff5815414f304a3c
@javache has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This pull request was successfully merged by @mateoguzmana in d8cfd98 When will my fix make it into a release? | How to file a pick request? |
Summary:
As part of #34425,
objectFit
value of'none'
needs to be supported for the Image component.In order to support this, a new value must also be added to support the equivalent in
resizeMode
. With this new value, the image will not be resized at all and keeping it in the initial position within a container (see in the screenshots).In this PR the support is added for both Fabric and Paper.
Changelog:
[GENERAL] [ADDED] - image
resizeMode
andobjectFit
support for'none'
.Test Plan:
Using the
rn-tester
, there is a new image example for bothresizeMode
andobjectFit
.See below the results for both Android and iOS:
Fabric screenshots
Android:
iOS:
Paper screenshots
Android:
iOS: