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

iOS surface with flex style render weird. #4632

Open
dribble-njr opened this issue Feb 15, 2025 · 5 comments · May be fixed by #4634
Open

iOS surface with flex style render weird. #4632

dribble-njr opened this issue Feb 15, 2025 · 5 comments · May be fixed by #4634

Comments

@dribble-njr
Copy link

dribble-njr commented Feb 15, 2025

Current behaviour

In the source code, I noticed that iOS surface has outerLayer and inner view. However, outerLayerStyleProperties filter flex, than the inner will never has flex style. Therefore, it will never fill the remaining height. In android and web, it renders nomal.

const [filteredStyles, outerLayerStyles, borderRadiusStyles] =
  splitStyles(
    flattenedStyles,
    (style) =>
      outerLayerStyleProperties.includes(style) ||
      style.startsWith('margin'),
    (style) => style.startsWith('border') && style.endsWith('Radius')
  );

Expected behaviour

How to reproduce?

Preview

What have you tried so far?

Your Environment

software version
ios x
android x
react-native x.x.x
react-native-paper 5.13.1
node x.x.x
npm or yarn x.x.x
expo sdk x.x.x
@dribble-njr dribble-njr changed the title iOS surface withflex style render weird. iOS surface with flex style render weird. Feb 15, 2025
@Jerome-Jumah
Copy link

I am also facing a similar issue where on android the surface works well but on iOS it does not seem to work and I keep getting this warning in the console

When setting overflow to hidden on Surface the shadow will not be displayed correctly. Wrap the content of your component in a separate View with the overflow style.

Attached images

Image

Image

Copy link

Hey! Thanks for opening the issue. Can you provide a minimal repro which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible. The easiest way to provide a repro is on snack.expo.dev. If it's not possible to repro it on snack.expo.dev, then you can also provide the repro in a GitHub repository.

@dribble-njr
Copy link
Author

dribble-njr commented Feb 19, 2025

@dribble-njr
Copy link
Author

"react-native-paper": "4.9.1" seems ok.

Image

@BogiKay
Copy link
Contributor

BogiKay commented Feb 19, 2025

Thanks for the repro, appreciate that. I'll investigate the issue

@BogiKay BogiKay linked a pull request Feb 19, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants