swarm-ui: with an agent open, the list's filters sit behind one filter button
An open agent narrows the list to a column, where the filter boxes and menus took three rows. They now stack in a popover under one button that shows how many filters are active; the full-width list keeps them in the bar.
This commit is contained in:
parent
8d8fcb59cf
commit
e701be870a
1 changed files with 186 additions and 9 deletions
12
frontend/packages/swarm-ui/test/filter-label.test.mjs
Normal file
12
frontend/packages/swarm-ui/test/filter-label.test.mjs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { test } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { filterButtonLabel } from "../src/ui/filterable-view/filter-label.ts";
|
||||
|
||||
test("the filter button shows no count while no filter is active", () => {
|
||||
assert.equal(filterButtonLabel(0), "filter");
|
||||
});
|
||||
|
||||
test("the filter button counts the active filters", () => {
|
||||
assert.equal(filterButtonLabel(1), "filter (1)");
|
||||
assert.equal(filterButtonLabel(3), "filter (3)");
|
||||
});
|
||||
Loading…
Reference in a new issue