Skip to content
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

Align android image style / source logic with ios #34655

Closed
wants to merge 1 commit into from

Conversation

danilobuerger
Copy link
Contributor

Summary

This aligns the logic of setting style (width / height) and source of Android with iOS.
iOS handles nullish uris with set width and heigth by passing them through. Android did not.

Changelog

[Android] [Fixed] - Align android image style / source logic with ios

Test Plan

<Image source={{width: 100, height: 100}} />

Before this Patch:

  • iOS: Renders a blank image with 100x100
  • Android: Renders a blank image with 0x0

After this Patch:

  • iOS: Renders a blank image with 100x100
  • Android: Renders a blank image with 100x100

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Sep 10, 2022
danilobuerger added a commit to feastr/react-native that referenced this pull request Sep 10, 2022
@react-native-bot react-native-bot added Bug Platform: Android Android applications. labels Sep 10, 2022
danilobuerger added a commit to feastr/react-native that referenced this pull request Sep 10, 2022
@analysis-bot
Copy link

analysis-bot commented Sep 11, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,643,419 +386
android hermes armeabi-v7a 7,055,513 +343
android hermes x86 7,944,991 +406
android hermes x86_64 7,917,030 +326
android jsc arm64-v8a 9,515,968 -53
android jsc armeabi-v7a 8,291,587 -47
android jsc x86 9,455,291 -58
android jsc x86_64 10,046,363 -66

Base commit: 4e70376
Branch: main

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 4e70376
Branch: main

@danilobuerger danilobuerger force-pushed the androidimage branch 2 times, most recently from 65f7532 to ab049d8 Compare September 11, 2022 14:08
@facebook-github-bot
Copy link
Contributor

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

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @danilobuerger in 6bdcb49.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Sep 13, 2022
@danilobuerger danilobuerger deleted the androidimage branch September 13, 2022 13:04
danilobuerger added a commit to feastr/react-native that referenced this pull request Nov 18, 2022
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
This aligns the logic of setting style (width / height) and source of Android with iOS.
iOS handles nullish uris with set width and heigth by passing them through. Android did not.

## Changelog

[Android] [Fixed] - Align android image style / source logic with ios

Pull Request resolved: facebook#34655

Test Plan:
```
<Image source={{width: 100, height: 100}} />
```

Before this Patch:
* iOS: Renders a blank image with 100x100
* Android: Renders a blank image with 0x0

After this Patch:
* iOS: Renders a blank image with 100x100
* Android: Renders a blank image with 100x100

Reviewed By: sammy-SC

Differential Revision: D39423391

Pulled By: cipolleschi

fbshipit-source-id: 997c06dea42e9b69fda12b678a1b82ad8319537f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: Android Android applications. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants