necolas / react-native-web

Cross-platform React UI packages
https://necolas.github.io/react-native-web
MIT License
21.64k stars 1.79k forks source link

Consistent with react-native rendering #697

Closed cpunion closed 7 years ago

cpunion commented 7 years ago

Do you want to request a feature or report a bug?

Request Feature: Make some rendering consistent with react-native.

What is the current behavior?

See https://github.com/GeekyAnts/NativeBase-KitchenSink/issues/81, I created a repo to try to make NativeBase-KitchenSink working on react-native-web (Try not to modify code), it works not bad and has some problems that seems difference with on react-native:

  1. Some style problems, e.g. Button's border, it rendered as 3 pixels width, but in Chrome DevTool I didn't see that style. Also reproduce this in a small example, it just render a NativeBase's Button in a View.

  2. Some API it's not supported, I can patch in my environment. e.g. Dimensions, Platform.getInitialURL etc.

So just need fix some style problem. I don't know it should be fixed in react-native-web's or NativeBase's.

If the current behavior is a bug, please provide the steps to reproduce and if a minimal demo of the problem via Glitch or similar (template: https://glitch.com/edit/#!/react-native-web-playground).

See the link above.

What is the expected behavior?

Consistent with react-native.

Environment (include versions). Did this work in previous versions?

necolas commented 7 years ago

Please can you make some isolated test cases and specify which APIs. I'll reopen when there is that actionable info. Thanks

cpunion commented 7 years ago

https://glitch.com/edit/#!/sable-suit

Made a smallest test to reproduce without NativeBase, just show a View with borderWidth: null, it displays a 3-pixel width black border. In NativeBase it also used borderWidth: null.

Code:

      <View style={{width: 300, height: 100, borderWidth: null}} />

Render result:

image

In Chrome DevTool it has 3-pixel width border:

image

Doesn't see the style about 3px border:

image image image

cpunion commented 7 years ago

I will see the other problems and try to make smallest test case.

necolas commented 7 years ago

Thanks. The border issue should be fixed in 0.1.13

cpunion commented 7 years ago

After upgraded to react-native-web@0.1.3 and patched Dimension, I checked more issues and record here to avoid a new post.

And other cases are perfect, I think it's good consistency with react-native. :thumbsup::thumbsup::thumbsup:

So Modal is important to make some components work. And I will try to check and simplify other cases.

Some snapshots: (The picture with a big black border is capture on iOS Simulator, it run in react-native)

2017-11-01 12 06 44 2017-11-01 12 08 01 2017-11-01 11 01 11 2017-11-01 11 01 18 2017-11-01 11 08 53 2017-11-01 11 08 58 2017-11-01 11 09 14 2017-11-01 11 09 20 2017-11-01 11 15 27 2017-11-01 11 15 31 2017-11-01 11 16 29 2017-11-01 11 16 33 2017-11-01 11 16 53 2017-11-01 11 16 58 2017-11-01 11 18 12 2017-11-01 11 18 17 2017-11-01 11 34 55 2017-11-01 11 35 06
murtraja commented 5 years ago

That red bordered box is still present when we have <Root/> component from NativeBase. @cpunion, did you find any workarounds for this since no matter howsoever I style it, it still is visible :)

tonypee commented 5 years ago

Is there an update on the red box issue? Im seeing it also

jmatsushita commented 4 years ago

Also seeing this with ActionSheet on native-base@2.13.8 with react-native-web@0.11.7 CC https://github.com/GeekyAnts/NativeBase-KitchenSink/issues/81

jmatsushita commented 4 years ago

Oh, is it that Modal isn't implemented yet? https://github.com/necolas/react-native-web/issues/1020 ?