Misc · Terms and notices: tests for every way out; switch labels wrap

Tests now press Decline and the scrim, see focus return to the opener
after Accept, see necessary cookies stay on and off the Tab path, and
see the license list mark its row and read each version and license.
lists::ListItem marks its description and selected state for tests.
forms::Switch's label wraps in its own block, as Checkbox's does.
Ely's own row in the gallery shows both of its license texts.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-28 04:09:49 -04:00
1 parent 2837c802b5
commit 8794a42d42
7 files changed
+123 -24

No files matched your search

+6 -2
View File
@@ -153,7 +153,10 @@ impl RenderOnce for ListItem {
} else {
gpui::transparent_black()
})
.when(self.selected, |row| row.bg(colors.active))
.when(self.selected, |row| {
row.debug_selector(|| format!("item-selected-{}", self.title))
.bg(colors.active)
})
.when(self.disabled, |row| row.opacity(0.5))
.when_some(self.on_click.filter(|_| pressable), |row, on_click| {
row.cursor_pointer()
@@ -182,7 +185,8 @@ impl RenderOnce for ListItem {
}),
)
.children(self.description.map(|text| {
line(text)
line(text.clone())
.debug_selector(|| format!("item-description-{text}"))
.text_size(theme.text_size(TextSize::Sm))
.text_color(colors.fg_muted)
}))