Skip to content

feat: Added objectFit style prop for Image - #34585

Closed
cyrus25 wants to merge 3 commits into
react:mainfrom
cyrus25:feat/object-fit-prop
Closed

feat: Added objectFit style prop for Image#34585
cyrus25 wants to merge 3 commits into
react:mainfrom
cyrus25:feat/object-fit-prop

Conversation

@cyrus25

@cyrus25cyrus25 commented Sep 2, 2022

Copy link
Copy Markdown
Contributor

Summary

This adds objectFit style prop which is partially equivalent to resizeMode as requested in #34425

Changelog

[General] [Added] - Added objectFit style prop partially equivalent to resizeMode

Test Plan

<Imagestyle={[{styles.image,"objectFit":"cover"}]}source={imgScr}/>

@facebook-github-bot

Copy link
Copy Markdown
Contributor

Hi @cyrus25!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@react-native-botreact-native-bot added the Type: Enhancement A new feature or enhancement of an existing feature. label Sep 2, 2022
@analysis-bot

analysis-bot commented Sep 2, 2022

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a7,634,909-1,731
androidhermesarmeabi-v7a7,046,701-1,932
androidhermesx867,936,774-1,833
androidhermesx86_647,908,614-2,026
androidjscarm64-v8a9,512,159-768
androidjscarmeabi-v7a8,287,454-768
androidjscx869,451,729-754
androidjscx86_6410,042,960-758

Base commit: 12e5842
Branch: main

@facebook-github-botfacebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 2, 2022
@facebook-github-bot

Copy link
Copy Markdown
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@cyrus25cyrus25 changed the title feat: Added objectFit prop for Imagefeat: Added objectFit style prop for ImageSep 2, 2022
@facebook-github-botfacebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Sep 2, 2022
@gabrieldonadel

Copy link
Copy Markdown
Collaborator

@cyrus25 I believe we already have a PR for this, please check #34576

@cyrus25

Copy link
Copy Markdown
ContributorAuthor

@gabrieldonadel oh ok, so @necolas should I close this PR?

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@jacdebug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@analysis-bot

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
ios-universaln/a--

Base commit: 12e5842
Branch: main

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.Shared with MetaApplied via automation to indicate that an Issue or Pull Request has been shared with the team.Type: EnhancementA new feature or enhancement of an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@cyrus25@facebook-github-bot@analysis-bot@gabrieldonadel@react-native-bot