fix: compact mobile bottom navigation
ci / gitleaks (push) Successful in 8s
ci / docker (push) Successful in 3m40s

This commit is contained in:
2026-09-18 08:58:41 +08:00
parent 7bfc5d2a44
commit 4d5d1f46e0
5 changed files with 11 additions and 11 deletions
+4 -4
View File
@@ -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', () => {
+1 -1
View File
@@ -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
}