-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix bottomSheet bottom insets #8331
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, and thanks for the fixes
@@ -217,7 +217,7 @@ export const useHostMenus = () => { | |||
const props = {closeButtonId: closeUserProfile, location: '', userId: session.userId}; | |||
|
|||
openAsBottomSheet({screen, title, theme, closeButtonId: closeUserProfile, props}); | |||
}, [theme, currentCall?.channelId]); | |||
}, [intl, theme]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
Hi @enahum - please let me know if the screenshots are correct and what is expected |
@lindy65 yup, that is fine.. you can also try with up to 3 teams and see the difference. |
@lindy65 btw even if the ticket does not mention it.. this PR is affecting ALL the bottom sheets across the app. |
Hey @enahum Testing on Android, the first screenshot is first time open from Search and tapping on the Team icon (it doesn't change if I close and reopen) The second screenshot is if I try to swipe up on the bottom sheet to maximise it - it doesn't change size but rather scrolls the contents of the bottom sheet up Does this look correct to you? Behavior in the bottom sheet is different to iOS/iPhone as there, the bottom sheet is maximisable when swiping up on it whereas Android the size of the bottom sheet doesn't change but the contents scroll |
@lindy65 on Android that is not correct.. as I mentioned before please check ALL bottom sheets across the entire app!!!!!!! That said, in the meantime, I'll check if I get the same results on Android. can you share what version of android are you on? |
Yep, I am testing the PR on all mobile platforms @enahum I'm on Samsung S22, Android v14 |
Ooooh, you mean ALL bottom sheets - not just THIS bottom sheet across platforms - got it now :) |
ok that is good,.. but is ALL bottom sheets.. reactions, participants, the plus sign in the home screen, multi-server, three dots in the channel screen, announcement banner, add bookmarks, file search results, long press on at mentions, long press on links, post options, long press on markdown images, pressing on the camera icon when composing a message, post priority, retry a failed post, audio devices for calls, host controls for calls, browse channels (when you tap on switching the channel type), etc.. if you look at the code, the name of the files should give you an idea |
@lindy65 this one should be fixed with the latest commit. |
Thanks @enahum - this is indeed fixed with the latest commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @enahum - I have tested all the bottom sheets according to files changed and they look good to me - I didn't find any issues apart from the issue on Android which you have already fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking at this @enahum. A few things I found:
- On Android 13, on a Pixel 4, bottom sheets look like they need some more breathing room on the bottom. Here's a few examples below. The black gesture bar at the bottom is affecting the appropriate breathing room. I think it's been like this for a while though. Incidently, not all bottom sheets look like this. For example, the call participants bottom sheet has the right spacing on the bottom.
- In the global search, the 'select a team' bottom sheet doesnt' have the correct padding like the other bottom sheets do.
- Not sure if this is related to this PR, but I'm not seeing it in the production app. In global search, when I tested searching for a file, the app crashed and went to a white screen. I was unable to test the file options bottom sheet from here. When testing the Channel-specific Files list, it goes white too.
- Looks like some additional breathing room is needed on the message priority bottom sheet (on iPhone). Comparing that to the servers bottom sheet which also has s footer button, that screen has the right bottom inset. On iPad the message priority modal footer looks uneven as well.
- The ••• bottom sheet for an active call seems to have more space than needed compared to other bottom sheets that only have a few options.
- Not sure if this is a bottom sheet component affected in this PR, but on iPhone, in the start a new DM modal, when I select users, there seems to be extra space at the bottom of the panel that holds the selected users
@matthewbirtch can you provide measurements instead of some space ? why do I ask, cause everything is the same, just move the |
@matthewbirtch changes made :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @enahum. I'm going to approve. Only one minor update on iPad:
@matthewbirtch fixed |
Summary
This PR fixes the all the bottom sheets bottom insets, particularly visible on iOS devices.
Now we don't need to pass the inset to the function or styles but only to the library BottomSheet component as a prop, which also simplifies a lot of code.
Ticket Link
https://mattermost.atlassian.net/browse/MM-55073
Release Note