Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/styles/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ const styles = (theme: ThemeColors) =>

// The bottom of the floating action button should align with the bottom of the compose box.
// The value should be equal to the height + marginBottom + marginTop of chatItemComposeSecondaryRow
bottom: 25,
bottom: variables.fabBottom,
},

floatingActionButton: {
Expand Down Expand Up @@ -1395,7 +1395,9 @@ const styles = (theme: ThemeColors) =>
createMenuPositionSidebar: (windowHeight: number) =>
({
horizontal: 18,
vertical: windowHeight - 75,
// Menu should be displayed 12px above the floating action button.
// To achieve that sidebar must be moved by: distance from the bottom of the sidebar to the fab (variables.fabBottom) + fab height (variables.componentSizeLarge) + distance above the fab (12px)
vertical: windowHeight - (variables.fabBottom + variables.componentSizeLarge + 12),
} satisfies AnchorPosition),

createMenuPositionProfile: (windowWidth: number) =>
Expand Down
1 change: 1 addition & 0 deletions src/styles/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default {
avatarSizeMentionIcon: 16,
avatarSizeSmallSubscript: 14,
defaultAvatarPreviewSize: 360,
fabBottom: 25,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What does this mean exactly? It's the distance of the FAB to the bottom of the screen? What was it before we made any of these changes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's this distance. I've added this variable only to use it in a calculation of the menu position. Thanks to that it's easier to understand how we set the menu position

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sounds good.

fontSizeOnlyEmojis: 30,
fontSizeOnlyEmojisHeight: 35,
fontSizeSmall: getValueUsingPixelRatio(11, 17),
Expand Down