Fix Android header menu anchoring

This commit is contained in:
Joe Julian
2026-04-08 15:47:34 -07:00
parent 4f9792d027
commit 09e6425b1c
2 changed files with 75 additions and 44 deletions
+11
View File
@@ -367,6 +367,17 @@ func TestAnchoredMenuXAllowsWiderMenusToExtendLeft(t *testing.T) {
}
}
func TestAnchoredMenuOriginXClampsToVisibleContainer(t *testing.T) {
t.Parallel()
if got := anchoredMenuOriginX(360, 312, 360, 140); got != 220 {
t.Fatalf("anchoredMenuOriginX should keep a right-aligned menu visible, got %d want 220", got)
}
if got := anchoredMenuOriginX(360, 0, 44, 160); got != 0 {
t.Fatalf("anchoredMenuOriginX should clamp oversized left overflow to zero, got %d want 0", got)
}
}
func TestUICurrentVaultSummary(t *testing.T) {
t.Parallel()