Open
Conversation
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).
✅ Deploy Preview for up-for-grabs-test-bench ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
👋 I'm a robot checking the state of this pull request to save the human reviewers time. I don't see any changes under As you make changes to this pull request, I'll re-run these checks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 .