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

Does the overflow prop from Image Style Props only work on iOS? #4164

Open
pafry7 opened this issue Jul 19, 2024 · 0 comments
Open

Does the overflow prop from Image Style Props only work on iOS? #4164

pafry7 opened this issue Jul 19, 2024 · 0 comments

Comments

@pafry7
Copy link

pafry7 commented Jul 19, 2024

Description

There is no documentation regarding overflow prop from Image Style Props.

What is the problem?

I've tried to use overflow prop to style the Image component, but it is difficult to find any documentation on its use case:

  1. The default value in the documentation is wrong. It says it is visible, but we can see that it's actually hidden.
  2. We can see that this prop works on iOS, but does nothing on Android. Snack
Screenshot 2024-07-16 at 11 10 41

Clearly, it works differently than View's overflow, as Image component has no children. We can find some explanation in this commit. It states that: "overflow: 'hidden' is needed for network images with cover mode.". I tested this use case above, and it seems to have no effect on Android. I haven't delved too deeply into the code base, but I can guess that it may be related to:

  • different scaling/resizing method (either resizeMethod or Fresco internals),
  • lack of logic related to overflow in ReactImageView.java & friends (at least I couldn't find it).

How can we address it?

We could update the documentation with the explanation when and where this props work or someone with more knowledge on the subject could explain it.

Why is it important?

We should strive to have up-to-date documentation on platform compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant