Fix type chip showing when hidden; make tags clickable to filter

- [hidden] { display: none !important } prevents CSS display overriding
  the hidden attribute
- Clicking a tag chip in an entry row filters by that tag

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 22:27:53 +00:00
parent 23d5011e56
commit 5b54b58625
2 changed files with 11 additions and 1 deletions

View File

@@ -388,8 +388,14 @@ function make_entry_row(entry, children_map) {
const tags_el = row.querySelector('.task-tags');
for (const tag of entry.tags) {
const span = document.createElement('span');
span.className = 'tag';
span.className = 'tag clickable-tag';
span.textContent = tag;
span.title = `Filter by tag: ${tag}`;
span.addEventListener('click', (e) => {
e.stopPropagation();
state.filter_tag = tag;
render();
});
tags_el.appendChild(span);
}

View File

@@ -1,4 +1,5 @@
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
font-family: system-ui, sans-serif;
@@ -157,6 +158,9 @@ main { padding: 1.25rem; }
color: #8899cc;
}
.clickable-tag { cursor: pointer; }
.clickable-tag:hover { background: #363650; color: #aabbee; }
.task-actions { display: flex; gap: 0.4rem; }
.btn-expand {