WIP components (as built)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 15:51:57 -04:00
1 parent 1095ed2b9d
commit 7e4f275f0a
80 files changed
+2754 -132

No files matched your search

+23
View File
@@ -201,3 +201,26 @@ func tabsMode(c *ui.Context) Mode {
}
return Light
}
func TestTabsAncestorDisabledNavigation(t *testing.T) {
for _, key := range []ui.Key{ui.KeyRight, ui.KeyDown, ui.KeyEnd} {
selected, changes := 0, 0
disabled := false
tt := ui.NewTester(func(c *ui.Context) {
Use(c, Settings{})
ui.Column(c).Disabled(disabled).Children(func() {
if Tabs(c, &selected, tabsSample(), TabsOptions{}).Changed() {
changes++
}
})
}, 500, 200)
if err := tt.Click("General"); err != nil {
t.Fatal(err)
}
disabled = true
tt.Key(0, key)
if selected != 0 || changes != 0 {
t.Fatalf("disabled tab navigation: selected=%d events=%d", selected, changes)
}
}
}