Sayali: add Show/Hide Trackers button to Dashboard Tasks tab header#5321
Merged
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…e to fix SonarCloud duplication
|
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.



Description
Implements the Show Trackers and Hide Tasks buttons in the Dashboard Tasks Tab header as requested.
Implements #2 (Priority Medium)
##Main changes explained:
Added "Show Trackers" button to the left of "Hide Tasks" in the Tasks Tab header — trackers hidden by default, clicking expands all users' tracker lists at once
Added "Hide Tasks" button — tasks shown by default, clicking hides the task list for all users
Both buttons toggle their label based on current state (Show Trackers ↔ Hide Trackers, Hide Tasks ↔ Show Tasks)
Updated Warnings.jsx to accept showTrackers prop and sync internal toggle state with the global button
##How to test:
Check into current branch
Do npm install and npm run start to run this PR locally
Clear site data/cache
Log in as admin user
Go to Dashboard → Tasks tab
Verify "Show Trackers" button appears to the left of "Hide Tasks" button below the clock icons
Click "Show Trackers" — all users' tracker lists should expand and button should change to "Hide Trackers"
Click "Hide Trackers" — all tracker lists should collapse
Click "Hide Tasks" — all task lists should hide and button should change to "Show Tasks"
Click "Show Tasks" — all task lists should reappear
Verify this new feature works in dark mode
##Screenshots or videos of changes:




##Note:
Both buttons are placed below the clock icons in the Tasks Tab header. "Show Trackers" is on the left, "Hide Tasks" is on the right.
##Additional Notes (Performance Investigation)
Tried to fix the lag with 2447 users. Approaches tried:
Staggered API calls (0-5000ms delay per user) — reduced crashes but still caused freezes
Batch API to reduce 2447 calls to 1 — backend built and working but React re-render freeze remained
React startTransition to prevent UI freeze — not sufficient
The proper fix requires virtual scrolling (react-window) which renders only visible rows (~15 at a time). This would eliminate both the API flood and React freeze but would take 10+ hours to implement.
If this PR causes lag on production, the recommended fix is virtual scrolling. The staggered delay (index % 5000) spreads API calls over 5 seconds to prevent browser crashes.