Skip to content

Conversation

@DHANUSHRAJA22
Copy link
Contributor

Summary

This PR fixes an issue where popular tag counts would not update correctly when filters were applied to the project list. Previously, the popular tags always showed frequencies based on all projects, even when filters were active.

Changes Made

1. Updated projectsService.js

  • Modified the getPopularTags function to accept an optional filteredProjects parameter
  • When filteredProjects is provided, the function now recalculates tag frequencies based only on the filtered projects
  • Falls back to the original behavior when no filtered projects are provided

2. Updated main.js

  • Modified the renderProjects function to get the filtered projects first
  • Updated the call to getPopularTags to pass the current filtered projects
  • This ensures popular tag counts reflect the currently visible projects

Result

Now when users apply filters (by name, tags, labels, or date), the popular tags section correctly shows tag frequencies only for the projects that match the applied filters, providing a more accurate and useful user experience.

Fixes #4917

@netlify
Copy link

netlify bot commented Aug 26, 2025

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

Name Link
🔨 Latest commit 0702efb
🔍 Latest deploy log https://app.netlify.com/projects/up-for-grabs-test-bench/deploys/68ae27a7d71483000722a086
😎 Deploy Preview https://deploy-preview-5340--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

👋 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 Tag count not being updated

2 participants