mmazzarolo / react-native-dialog

Pure JavaScript React-Native dialog
MIT License
682 stars 111 forks source link

Fix android modal width #152

Open litinskii opened 1 year ago

litinskii commented 1 year ago

For iOS platform we have fixed width

image

in this case when we have dynamic content like input and user type something modal container not increase witdh, so we need to do the same for other platform.

Before https://user-images.githubusercontent.com/10028441/209297979-cc201a21-63e5-4237-ba0d-4a9f7899f094.mov

After https://user-images.githubusercontent.com/10028441/209298011-543a4ed1-f20e-49b2-805a-e84fa27a20da.mov

Overview

Test Plan

litinskii commented 1 year ago

@mmazzarolo ^

litinskii commented 1 year ago

The problem is that now in this lib, you have different behavior for ios/android styles for container, if you check code you will see that for ios you have width style, for android you have minWidth.

image image

I believe behavior should be the same, need to use minWidth or width, but the same in ios/android.

litinskii commented 1 year ago

btw if you check dialog in material https://m2.material.io/components/dialogs#usage dialog not maked wider if child content increasing, which is impossible if you use minWidth and overflow hidden, and there are no point to use overflow hidden if you not use fixed width

litinskii commented 1 year ago

@mmazzarolo do you have take a look ?