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

Fix bottomSheet bottom insets #8331

Merged
merged 6 commits into from
Nov 29, 2024
Merged

Fix bottomSheet bottom insets #8331

merged 6 commits into from
Nov 29, 2024

Conversation

enahum
Copy link
Contributor

@enahum enahum commented Nov 12, 2024

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

NONE

@enahum enahum added 2: Dev Review Requires review by a core commiter 3: QA Review Requires review by a QA tester 2: UX Review Requires review by a UX Designer labels Nov 12, 2024
@lindy65 lindy65 added the Build Apps for PR Build the mobile app for iOS and Android to test label Nov 12, 2024
Copy link
Member

@cpoile cpoile left a 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]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@enahum enahum added Build Apps for PR Build the mobile app for iOS and Android to test and removed 2: Dev Review Requires review by a core commiter Build Apps for PR Build the mobile app for iOS and Android to test labels Nov 13, 2024
@lindy65
Copy link

lindy65 commented Nov 14, 2024

Hi @enahum - please let me know if the screenshots are correct and what is expected

Bottom sheet expanded
image

Bottom sheet normal
image

@enahum
Copy link
Contributor Author

enahum commented Nov 14, 2024

@lindy65 yup, that is fine.. you can also try with up to 3 teams and see the difference.

@enahum
Copy link
Contributor Author

enahum commented Nov 14, 2024

@lindy65 btw even if the ticket does not mention it.. this PR is affecting ALL the bottom sheets across the app.

@lindy65
Copy link

lindy65 commented Nov 14, 2024

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)
image

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
image

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

@enahum
Copy link
Contributor Author

enahum commented Nov 14, 2024

@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?

@lindy65
Copy link

lindy65 commented Nov 14, 2024

Yep, I am testing the PR on all mobile platforms @enahum

I'm on Samsung S22, Android v14

@lindy65
Copy link

lindy65 commented Nov 14, 2024

Ooooh, you mean ALL bottom sheets - not just THIS bottom sheet across platforms - got it now :)

@enahum
Copy link
Contributor Author

enahum commented Nov 14, 2024

Yep, I am testing the PR on all mobile platforms @enahum

I'm on Samsung S22, Android v14

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

@enahum
Copy link
Contributor Author

enahum commented Nov 14, 2024

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) image

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 image

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 this one should be fixed with the latest commit.

@lindy65 lindy65 added Build Apps for PR Build the mobile app for iOS and Android to test and removed Build Apps for PR Build the mobile app for iOS and Android to test labels Nov 14, 2024
@lindy65
Copy link

lindy65 commented Nov 14, 2024

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) image
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 image
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 this one should be fixed with the latest commit.

Thanks @enahum - this is indeed fixed with the latest commit.

Copy link

@lindy65 lindy65 left a 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.

Copy link
Contributor

@matthewbirtch matthewbirtch left a 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:

  1. 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.
    image
  2. In the global search, the 'select a team' bottom sheet doesnt' have the correct padding like the other bottom sheets do.
    image
  3. 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.
  4. 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.
    • Comparison of server bottom sheet and message priority bottom sheet:
      image
    • iPad message priority modal
      Screenshot 2024-11-15 at 2 51 29 PM
  5. 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.
  6. 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

@enahum
Copy link
Contributor Author

enahum commented Nov 18, 2024

@matthewbirtch can you provide measurements instead of some space ?

why do I ask, cause everything is the same, just move the bottom inset to another more centralized placed in the code.

@matthewbirtch
Copy link
Contributor

👇 add 12 space please on Android
image

👇 For the message priority bottom sheet, it looks good on iPhone/Android phone now, but the iPad now has too much space in the button footer. It should be reduced for iPad by 12.
image

👇 For the DM selection bottom container, remove 20 below the button
image

With the latest update, I just noticed that you fixed the Android search bottom sheet which is great, but on iOS now a scrollbar shows if there are 3 teams. I know anything beyond 3 teams can be visible by expanding the bottom sheet, but I think the scroll bar for 3 teams isn't intended.

ScreenRecording_11-18-2024.10-36-33_1.mov

@enahum
Copy link
Contributor Author

enahum commented Nov 20, 2024

@matthewbirtch changes made :)

@enahum enahum requested a review from matthewbirtch November 20, 2024 02:58
@enahum enahum removed Build Apps for PR Build the mobile app for iOS and Android to test 3: QA Review Requires review by a QA tester labels Nov 20, 2024
@matthewbirtch matthewbirtch added the Build Apps for PR Build the mobile app for iOS and Android to test label Nov 22, 2024
Copy link
Contributor

@matthewbirtch matthewbirtch left a 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:

  • The space at the bottom of the message priority modal is now too small (was too big previously). It should a space of 20, but looks to be 12 on iPad (only on iPad)
  • Screenshot 2024-11-28 at 12 12 34 PM

@enahum
Copy link
Contributor Author

enahum commented Nov 29, 2024

@matthewbirtch fixed

image

@enahum enahum merged commit 7cb2ee7 into main Nov 29, 2024
4 checks passed
@enahum enahum deleted the MM-55073 branch November 29, 2024 04:50
@amyblais amyblais added this to the v2.24.0 milestone Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: UX Review Requires review by a UX Designer Build Apps for PR Build the mobile app for iOS and Android to test release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants