Skip to content

Add dynamic featured label shortcuts (Additive)#361

Draft
kaste wants to merge 3 commits intogh-pagesfrom
dynamic-feat-labels
Draft

Add dynamic featured label shortcuts (Additive)#361
kaste wants to merge 3 commits intogh-pagesfrom
dynamic-feat-labels

Conversation

@kaste
Copy link
Copy Markdown
Collaborator

@kaste kaste commented Apr 21, 2026

Build dynamic featured labels under search using active label
filters and co-occurring label usage.

When no label filter is active, keep curated defaults. When labels
are active, show all active labels first, then suggest up to the
remaining slots (max 6 total suggested+active cap logic).
Exclude synthetic status labels.

Sister draft at #362

@kaste
Copy link
Copy Markdown
Collaborator Author

kaste commented Apr 21, 2026

That just came to my mind, example

Bildschirmaufnahme.2026-04-21.181451.mp4

This is fun to click. This is the "add" variant. I also have a less fancy replace variant.

@michaelblyons @braver

@kaste kaste changed the title Add dynamic featured label shortcuts Add dynamic featured label shortcuts (Additive) Apr 21, 2026
@braver
Copy link
Copy Markdown
Member

braver commented Apr 21, 2026

At first glance I like this one better than the other one. It invites you to click more labels to dig deeper, which makes more sense to me than "try this other label". But, having said that, in cases where there are multiple related or similar labels "try something else" might actually be a more common use case. In any case I really like the idea of using those 6 highlighted labels to suggest something dynamically. You could also do that based on search term perhaps, showing the 6 most common labels within the result set (like, oh you typed "lsp" but did you know there's a label like that you can use to filter?).

@kaste
Copy link
Copy Markdown
Collaborator Author

kaste commented Apr 22, 2026

The suggested labels are now based on the search query. Looks freaking promising tbh.

I actually exclude the label if the term is an exact match. E.g. you search "git" or "lsp" or "python", then every time the top label was the search term which is not a good suggestion. So I exclude exact matches and this behaves 👩‍🍳.

@kaste kaste force-pushed the dynamic-feat-labels branch from 5bfded3 to d0d9223 Compare April 22, 2026 09:47
kaste added 3 commits April 23, 2026 09:29
Build dynamic featured labels under search using active label
filters and co-occurring label usage.

When no label filter is active, keep curated defaults. When labels
are active, show all active labels first, then suggest up to the
remaining slots (max 6 total suggested+active cap logic), and
exclude synthetic status labels.

Also update home-page link handling so label and platform links
toggle filters in-place, while author links replace the query.
Clicking homepage filter links already calls goSearch directly.

Previously, the click handler also dispatched synthetic input/change
signals, which triggered a second debounced search pass. That second
pass caused visible UI flicker (active label state blips and card label
icon re-renders).

Remove the synthetic form events in that path and explicitly clear any
pending debounce state before running goSearch.
Compute featured labels from the current query result set instead of the
global package set. This makes the six shortcut labels adapt to any
search term, not only explicit label filters.

Also exclude free-text query terms from suggestions so typing a label
word like "git" or "lsp" does not echo that same label in the featured
row. Active label filters remain pinned so users can still toggle them.
@kaste kaste force-pushed the dynamic-feat-labels branch from d0d9223 to 60c4ee3 Compare April 23, 2026 07:29
@braver
Copy link
Copy Markdown
Member

braver commented Apr 25, 2026

Looks freaking promising tbh.

💯

I like this. Also better than the replacement thing (the other PR) because you're inviting to refine, to dig deeper, and that's what this does consistently. Although results don't become better once you add more than one label, that's typically too specific. But it feels like this makes the most sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants