Fix Android group browser scrolling
ci / lint-test (push) Successful in 1m16s
ci / build (push) Successful in 2m37s

This commit is contained in:
Joe Julian
2026-04-06 00:04:38 -07:00
parent 1c72a5009f
commit 0c6d707325
2 changed files with 46 additions and 25 deletions
+31
View File
@@ -775,6 +775,37 @@ func TestUIPhoneGroupBrowserToggleDoesNotChangeCurrentGroupToolsState(t *testing
}
}
func TestUIPhoneGroupBarDoesNotClampScrollableContentHeight(t *testing.T) {
t.Parallel()
u := newUIWithModel("phone", vault.Model{
Groups: [][]string{
{"Crew"},
{"Crew", "One"},
{"Crew", "Two"},
{"Crew", "Three"},
{"Crew", "Four"},
{"Crew", "Five"},
{"Crew", "Six"},
{"Crew", "Seven"},
{"Crew", "Eight"},
},
})
u.setCurrentPath([]string{"Crew"})
ops := new(op.Ops)
gtx := layout.Context{
Ops: ops,
Constraints: layout.Exact(image.Pt(1080, 2400)),
}
dims := u.groupBar(gtx)
minOldCap := gtx.Dp(unit.Dp(220))
if dims.Size.Y <= minOldCap {
t.Fatalf("groupBar() phone height = %d, want > %d to avoid nested-scroll clamp", dims.Size.Y, minOldCap)
}
}
func TestUIPhoneStartsWithGroupToolsCollapsed(t *testing.T) {
t.Parallel()