Repository navigation
Description
Context — In the filters panel, the Tags rail shows each tag as #name 3: a # before the name and the number of notes after it, in the same monospace font, the same size and only a shade apart. The # reads oddly in a rail already titled « Tags », and a tag ending in a digit runs into its count: #v2 4 or #sprint12 3 can be read as one word. Reported on 1.2.1.
Change — The rail shows the tag's name alone, and the count is set apart from it as a small badge (its own background, a smaller proportional figure), as for the kinds, priorities and languages rails, which use the same chip.
To do
- Tag pills: drop the
#from the drawn words (facets.rs,tag_pills). -
Chip: draw the count as a badge (roundedbg_3fill,font::CAPTION, proportional,text_2; amber-tinted when the chip is on) after a fixed gap, for every rail that uses it. - Keep the accessible label of the pill the tag's name (the count stays out of it, as today).
- Check the panel's pinned width (
Facetstests hold the rail inside the panel) with the badge's extra room.
Tests — Unit (kittest, header/tests.rs / facets.rs tests): a tag v2 held by 4 notes draws v2 and a separate badge 4 whose rectangle does not touch the name's; no galley in the rail starts with #. e2e 06_search_and_filters (the tag step clicks tag-pill, read by id, unchanged).
Technical analysis
Cause. notes/header/facets.rs, tag_pills (line 399) formats the words as format!("#{tag}"), as the reference's tag-pill.component.html did (#{{ label() }} then <span class="tag-count"> with margin-left: 6px; color: var(--text-2)). Chip::show (lines 104-176) lays out the words and the count as two galleys of the same font (font::META, FontFamily::Monospace), the count painted at count_at = width of the words + 6 px (lines 166-174, 179-190) in text_2 instead of text_1. In a monospace font a 6 px gap is less than one character's advance, so #sprint12 3 looks like #sprint123; only the colour separates them, and the colour difference is small at 11 px.
Fix. In tag_pills, pass tag itself as the words. In Chip::show, replace the plain count galley by a badge: measure the figure in font::CAPTION proportional, add a horizontal padding of gap::TIGHT, paint a CornerRadius::same(u8::MAX) rect filled with p.bg_3 (amber amber_fill at low alpha when on), and widen size accordingly; count_at and the counted width (line 113) follow. Every rail goes through Chip, so the kinds, priorities and languages get the same badge — one look for one meaning.
Decided. The # goes from the filters rail alone. It stays on the cards' chips, in the editor's header (overlays/editor/header.rs:114) and in the tag manager (tag_manager.rs:181, 210): there it is the tag's formatting and does not weigh on a row of pills.
Risk. Low: drawing only. Width of the rail's pills changes, so the horizontal scroll of the rail and the tag-manage button's room (manage_width) must be checked at a narrow window.
Activity
Captures: 1.2.2 #1668, before and after
vmillet-dev commentedon Nov 27, 2026
Fixed by #1679, merged into
dev/1.2.2.