Skip to content

armgit / kanzo

Public Imported from GitHub
0

Self-hosted, sharable kanban for humans and agents. One 4.7 MB binary, 5 MB of RAM, 10 to 60 tokens per agent reply, starts in 3 ms, zero setup.

Color only the key of a filter qualifier

emanuele-em0529c37ad0a0
diff --git a/src/app.js b/src/app.js
index ea9e3a3..3d21ee1 100644
--- a/src/app.js
+++ b/src/app.js
@@ -621,12 +621,10 @@ function wordsOf(query) {
// A query as text, with its qualifiers marked. Keeps every character, for .query-mirror to line up.
function queryNodes(query) {
- return (query.match(/\s+|(?:[^\s"]+|"[^"]*"?)+/g) || []).map((part) => {
- const qualifier = qualifierIn(part);
- if (!qualifier) return part;
+ return (query.match(/\s+|(?:[^\s"]+|"[^"]*"?)+/g) || []).flatMap((part) => {
+ if (!qualifierIn(part)) return part;
const key = part.indexOf(":") + 1;
- return el("span", { class: qualifier.value ? "qualifier complete" : "qualifier" },
- el("span", { class: "qualifier-key" }, part.slice(0, key)), part.slice(key));
+ return [el("span", { class: "qualifier-key" }, part.slice(0, key)), part.slice(key)];
});
}
diff --git a/src/index.html b/src/index.html
index 8c64a9e..5d87c8e 100644
--- a/src/index.html
+++ b/src/index.html
@@ -161,8 +161,6 @@ header .repo-link .icon svg { width: 14px; height: 14px; }
.query-mirror > span { padding-right: 40px; }
/* Color only, no weight or padding: the text has to stay exactly under the input's caret. */
.qualifier-key { color: var(--link); }
-.qualifier.complete { border-radius: 3px; background: color-mix(in srgb, var(--link) 18%, transparent); }
-.chip .qualifier.complete { background: none; }
.chip .qualifier-key { font-weight: 600; }
/* Stops where the input's text does, before its clear button. */
#filter-box .query-mirror { padding: 0 15px; font-size: 13px; clip-path: inset(0 28px 0 0); }