T12a Data Display: badges, tags, avatars, statistics (review pending: codex 401)

This commit is contained in:
ZacharyZhang-NY committed 2026-09-25 18:41:58 -04:00
1 parent 76da4bd39e
commit dc1d282fca
24 files changed
+1434 -83

No files matched your search

+6 -7
View File
@@ -10,9 +10,9 @@ use super::{
listbox::chosen,
options::{OnValues, Pick, Popup, step},
select::{Picker, measure_anchor, moved},
tags::chip,
};
use crate::{
data_display::Tag,
primitives::{Icon, IconName, tab_stop},
theme::{ActiveTheme, ControlSize, IconSize, Radius, TextSize},
};
@@ -125,14 +125,13 @@ impl RenderOnce for MultiSelect {
.map(|(ix, choice)| {
let (choices, selected, commit) =
(choices.clone(), selected.clone(), commit.clone());
chip(
("chip-remove", ix).into(),
Tag::new(
(self.id.clone(), format!("chip-{ix}")),
choice.label.clone(),
Rc::new(move |window, cx| {
commit(&chosen(&choices, &selected, ix, true), window, cx)
}),
cx,
)
.on_remove(move |window, cx| {
commit(&chosen(&choices, &selected, ix, true), window, cx)
})
})
.collect();
let (click, keys, rows, close) = (