Skip to content

Fix click on popular tags#5380

Open
mkazin wants to merge 1 commit intoup-for-grabs:gh-pagesfrom
mkazin:issue/5216-click-popular-tag
Open

Fix click on popular tags#5380
mkazin wants to merge 1 commit intoup-for-grabs:gh-pagesfrom
mkazin:issue/5216-click-popular-tag

Conversation

@mkazin
Copy link

@mkazin mkazin commented Oct 1, 2025

Fixes #5216

This PR restores the functionality of clicking on Popular Tags by correcting a bug in tag parsing. It also enables a second click to remove the tag from the filter list.

The existing code uses code to handle the project count element nested within the anchor containing the tag. This new code is more conservative by extracting the tag from the first TEXT_NODE, to avoid making assumptions about other child elements which was necessary by using innerText.

Unlike #5217, this PR does not conflict with the existing event listener or the override already-filtered tags introduced by #1121 (and later fixed in #1179). If the other approach is preferred, it should be amended to remove the popular handling from main.js .

Fixes up-for-grabs#5216

This PR restores the functionality of clicking on Popular Tags by correcting a bug in the popular tag parsing.
It also enables a second click to remove the tag from the filter list.

The existing code uses code to handle the project count element nested within the anchor containing the tag.
This new code is more conservative by extracting the tag from the first TEXT_NODE, to avoid making assumptions about other child elements which was necessary by using innerText.

Unlike up-for-grabs#5217, this PR does not conflict with the existing event listener or the override already-filtered tags introduced by up-for-grabs#1121 (and later fixed in up-for-grabs#1179).
@netlify
Copy link

netlify bot commented Oct 1, 2025

Deploy Preview for up-for-grabs-test-bench ready!

Name Link
🔨 Latest commit 2a37613
🔍 Latest deploy log https://app.netlify.com/projects/up-for-grabs-test-bench/deploys/68dd7ab232878e000891e54e
😎 Deploy Preview https://deploy-preview-5380--up-for-grabs-test-bench.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@shiftbot
Copy link
Contributor

shiftbot commented Oct 1, 2025

👋 I'm a robot checking the state of this pull request to save the human reviewers time. I don't see any changes under _data/projects/ so I don't have any feedback here.

As you make changes to this pull request, I'll re-run these checks.

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.

Popular tags appear clickable but are not functional

2 participants