fix: compact mobile bottom navigation
This commit is contained in:
@@ -202,10 +202,10 @@ describe('MVP view utilities', () => {
|
||||
expect(clampFabPosition(120, 300, 390, 844)).toEqual({ x: 120, y: 300 })
|
||||
})
|
||||
|
||||
it('reserves the paper navigation, safe area, and gap below a dragged add button', () => {
|
||||
expect(fabBottomReserved(0)).toBe(76)
|
||||
expect(fabBottomReserved(34)).toBe(110)
|
||||
expect(clampFabPosition(500, 900, 390, 844, 56, 14, fabBottomReserved(34))).toEqual({ x: 320, y: 678 })
|
||||
it('reserves the compact paper navigation, safe area, and gap below a dragged add button', () => {
|
||||
expect(fabBottomReserved(0)).toBe(68)
|
||||
expect(fabBottomReserved(34)).toBe(102)
|
||||
expect(clampFabPosition(500, 900, 390, 844, 56, 14, fabBottomReserved(34))).toEqual({ x: 320, y: 686 })
|
||||
})
|
||||
|
||||
it('snaps the add button to the nearest horizontal edge while preserving its safe vertical position', () => {
|
||||
|
||||
@@ -190,7 +190,7 @@ export async function performTrashMutation(
|
||||
return { mutated: true, refreshed: await refresh() }
|
||||
}
|
||||
|
||||
export function fabBottomReserved(safeAreaBottom = 0, navigationHeight = 64, gap = 12) {
|
||||
export function fabBottomReserved(safeAreaBottom = 0, navigationHeight = 56, gap = 12) {
|
||||
return navigationHeight + Math.max(0, safeAreaBottom) + gap
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user