Skip to content

Commit

Permalink
[native] Get rid of userProfileBottomPadding
Browse files Browse the repository at this point in the history
Summary:
This padding was hardcoded by Ginsu to add additional space at the bottom of the `BottomSheet`. It is obviated by my work to consider `BottomSheetHandle` when setting `snapPoints`.

This diff reduces the padding somewhat, to be consistent with the rest of our `BottomSheet`s.

Depends on D13869

Test Plan: In combination with the rest of the stack, I tested each individual use of our `BottomSheet` component to make sure that the bottom padding was reasonable. In most cases it was unchanged; in other cases, it was changed to be more consistent with the other `BottomSheet`s in our codebase. In all cases, there was enough padding for the "home pill" at the bottom of the screen

Reviewers: bartek

Reviewed By: bartek

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D13870
  • Loading branch information
Ashoat committed Nov 6, 2024
1 parent 17abf48 commit d84f08d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions native/user-profile/user-profile-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

export const userProfileUserInfoContainerHeight = 90;

export const userProfileBottomPadding = 40;

export const userProfileMenuButtonHeight = 24;

export const userProfileActionButtonHeight = 54;
6 changes: 1 addition & 5 deletions native/user-profile/user-profile.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import sleep from 'lib/utils/sleep.js';
import UserProfileAvatar from './user-profile-avatar.react.js';
import {
userProfileUserInfoContainerHeight,
userProfileBottomPadding,
userProfileMenuButtonHeight,
userProfileActionButtonHeight,
} from './user-profile-constants.js';
Expand Down Expand Up @@ -55,10 +54,7 @@ function UserProfile(props: Props): React.Node {
const insets = useSafeAreaInsets();

React.useLayoutEffect(() => {
let height =
insets.bottom +
userProfileUserInfoContainerHeight +
userProfileBottomPadding;
let height = insets.bottom + userProfileUserInfoContainerHeight;

if (userProfileThreadInfo) {
height += userProfileMenuButtonHeight;
Expand Down

0 comments on commit d84f08d

Please sign in to comment.