-
-
Notifications
You must be signed in to change notification settings - Fork 653
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
messageActionSheet : using Modal
instead of @expo/react-native-action-sheet
#4490
Conversation
Thanks for the PR, @abhi0504! I see that GitHub is reporting some CI failures; let's get those fixed up. 🙂 If you're not sure how to fix something, please ask. You should start by running Also, could you please post some screenshots of the new UI on Android, in both night and day modes? Here are some for iOS:
|
3a0393e
to
5abbc99
Compare
Thank you so much @chrisbobbe for your reply Here are the screenshots of the new UI on Android, in both night and day modes Also you have mentioned that there is a different UI in you have mentioned that on clicking outside the Android.Emulator.-.Pixel_3_API_29_5554.2021-02-20.14-54-33.mp4Another thing that you have noticed is that in landscape orientation, something weird happens: everything seems to turn sideways when I open the action sheet, as though it's trying to go back to a portrait orientation. Then, when I close the action sheet, things turn right-side-up again but this seems perfectly fine for android device here is an video for that Android.Emulator.-.Pixel_3_API_29_5554.2021-02-20.14-53-21.mp4@chrisbobbe I hope I have cleared all the points can you plz help in solving CI failures on CZO here |
354dae8
to
2ae6bbb
Compare
…ion-sheet` when we long press on any message then `messageActionSheet` opens up and it took a extra black screen on `Share` option when we share our message and this issue is coming from `@expo/react-native-action-sheet` also `@expo/react-native-action-sheet` restricts us upto a certain extent on basis of UI for eg if we use `Modal` instead of `@expo/react-native-action-sheet` then we have many options for eg colored messageActionSheet , popping out with diff animations , can set some icons before any option which and greg have already discussed in #mobile on CZO. fix : tap above the top of the action sheet to make it disappear using `touchableOpacity` outside the `modal` so that if we click outside the `messageActionSheet` then it dismiss the `modal`
2ae6bbb
to
55c0746
Compare
Thanks, @abhi0504!
Ah, good to know this problem doesn't happen on Android. We still need to either debug the issue on iOS, or just decide not to use this new UI on iOS 😉. I currently prefer the latter (keeping the current UI on iOS), for a few reasons:
So, if you're still interested in the new UI on Android, it'll be necessary to write some conditional logic (using That'll likely mean several NFC commits, to refactor the code into a state where adding such a conditional makes sense. In particular, I'm imagining an approach like this:
Then, after that,
That way, we can maintain the invariant that no commits have the new UI active on iOS. Since we know we don't want it right now (for the reasons I mentioned, like because it's buggy), that'll be really helpful for the code review. 🙂 One place the platform-is-Android conditional might go is in I see that |
You might find it helpful to have the |
Also, it's important to note—the approach I've outlined above has more complexity than we'd expect a new contributor to handle (as mentioned, this area of the code is tricky, but it also deserves lots of attention to correctness and readability). You may find it more pleasant and educational to choose something else to work on; it's up to you. 🙂 I do appreciate your efforts so far, though; it's certainly reminded me that we could be friendlier to new contributors by making this code easier to work with. |
Thanks @chrisbobbe for your suggestion and your opinion love to know that you appreciate my efforts 😇 and I also think that this area of the code is already tricky, but it's also quite important, so we should try not to make the code harder to understand than it is now and we could be friendlier to new contributors by making this code easier to work with so I think I should leave this PR for now for future refactoring but once again thank you so much @chrisbobbe and @gnprice for your constant help and support 😊 |
#4407 has now been fixed in Expo upstream (thanks @abhi0504 for making that upstream bug report!). It's possible we'll eventually want to switch anyway to something like |
@nikhilmaske-2001 reported an issue #4407 that is :
when we long press on any message then
messageActionSheet
opens up and it took a extra black screen onShare
option when we share our messagehere i and @gnprice have discussed about the problem and found that this issue coming from
@expo/react-native-action-sheet
for which i have made a tiny app and report this issue on facebook/expo page here and also created a snack for better explaination of the issue herethen we have decide to use
Modal
instead of @expo/react-native-action-sheetas it restricts us upto a certain extent on basis of UI for eg if we use
Modalinstead of
@expo/react-native-action-sheet` then we have many options for eg colored messageActionSheet , popping out with diff animations , can set some icons before any option which and greg havealready discussed here
Also we can do many things if we use
Modal
and can tweak ourmessageActionSheet
's UI to an another level for egmessageActionSheet
messageActionSheet
messageActionSheet
Fixes: #4407