feat(image): support for resizeMode and objectFit value of 'none'#47110
Closed
mateoguzmana wants to merge 7 commits into
Closed
feat(image): support for resizeMode and objectFit value of 'none'#47110mateoguzmana wants to merge 7 commits into
resizeMode and objectFit value of 'none'#47110mateoguzmana wants to merge 7 commits into
Conversation
Member
|
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. |
Collaborator
Error ReferenceErrorDangerfile |
Collaborator
Author
facebook-github-bot
pushed a commit
that referenced
this pull request
Oct 21, 2024
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
Contributor
|
@javache has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
Collaborator
|
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? |
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:
As part of #34425,
objectFitvalue 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
resizeModeandobjectFitsupport for'none'.Test Plan:
Using the
rn-tester, there is a new image example for bothresizeModeandobjectFit.See below the results for both Android and iOS:
Fabric screenshots
Android:
iOS:
Paper screenshots
Android:
iOS: