Implement peer comparison mode with side-by-side stats and interactive charts#116
Implement peer comparison mode with side-by-side stats and interactive charts#116Vachhani-Tapan wants to merge 2 commits into
Conversation
|
Thank you for submitting a pull request. Please ensure your changes comply with the project's contribution guidelines and that all workflow checks pass successfully. A maintainer will review your submission shortly. |
|
@jagdish-15 Sir now i have worked according to the review that you have given in the last PR and now there is no merge conflicts in the files so please review the request . Thank You ! |
|
@jagdish-15 sir please review the pull request and give the review so that i can work on another issue also so sir please review it once asap . Thank You ! |
jagdish-15
left a comment
There was a problem hiding this comment.
The overall comparison feature and UI direction look good, but I noticed a few things that still need adjustment before this is ready to merge:
-
The compare mode toggle/button mentioned earlier does not seem to be present in the current pushed implementation. Right now the selection checkboxes appear by default, but I’d still prefer the compare selection mode to be explicitly enabled first to keep the leaderboard UI cleaner during normal usage.
-
Once users begin selecting people for comparison, there should also be a cancel/reset option alongside the current compare button so users can easily exit comparison mode without manually unchecking everything.
-
There’s currently a dataset consistency issue:
if someone selects one user from the weekly leaderboard and then switches to monthly/daily and selects another user there, the comparison mixes data from different leaderboard contexts, which becomes misleading.
A cleaner approach would be to automatically clear/reset all selected users whenever the active leaderboard tab changes.
- In the
peer_comparison.shpopup itself, it’s currently not immediately obvious whether the displayed stats correspond to the overall/monthly/weekly/daily leaderboard context.
It would help to include the active dataset context in the title itself, for example:
metrics_summary (weekly)
or
metrics_summary (monthly).
- It would also be nice to include:
- global rank (already available through
/api/student/:username) - and the leaderboard rank change indicator relative to the previous day for the active dataset
inside the comparison view as additional metrics.
- One more thing regarding the graphs:
right now the history graph always shows overall progression data. Instead:
- weekly leaderboard comparisons should show weekly progression/history,
- monthly leaderboard comparisons should show monthly progression/history,
- overall can continue using the full overall history graph.
And for the daily leaderboard specifically, a graph does not really make much sense due to the very small time window. Instead, we could either:
- show a simple message like:
No meaningful historical trend available for daily comparison. - or display the problems solved today by the selected users using the same API currently used by the sync logic:
https://leetcode-api-dun.vercel.app/:username
…ank & history fetching bugs
|
@jagdish-15 I am closing this pr and open new pr with all the changes |
Description
This PR introduces a peer comparison feature to the LeetCode leaderboard, allowing students to select up to 3 peers and compare their current stats and daily grinding histories side-by-side.
Linked Issue
Fixes #103
Changes Made
$ compare_modetoggle button next to the search bar to explicitly enable/disable peer selection, showing/hiding checkboxes dynamically and resetting selection on disable..leaderboard-row) and mobile cards (.mobile-card) with cross-view checking state synchronization.Type of Change
Testing
Checklist