Skip to content

Feature/display global ranking#215

Merged
jagdish-15 merged 6 commits into
codepvg:mainfrom
Yashaswini-K-P:feature/display-global-ranking
Jun 20, 2026
Merged

Feature/display global ranking#215
jagdish-15 merged 6 commits into
codepvg:mainfrom
Yashaswini-K-P:feature/display-global-ranking

Conversation

@Yashaswini-K-P

Copy link
Copy Markdown
Contributor

Description

Renamed 'Global Rank' references to 'Profile Rank'. This prevents user confusion since LeetCode already provides a separate, contest-specific global ranking system on profiles. create a horizontal layout to store all rankings and displayed profile rank
in user profile page

Linked Issue

Fixes #80

Changes Made

  • Updated HTML layout structure by renaming label text to PROFILE:.
  • Swapped element ID from global-ranking to profile-ranking to reflect the new nomenclature.
  • Adjusted local consumer script (historical-graphs.js) to target the revised element ID.

Type of Change

  • Bug fix
  • New feature
  • UI/Visual update
  • Documentation update
  • Refactor

Testing

  • Tested locally
  • Tested on mobile viewport (if applicable)
  • No console errors introduced

Checklist

  • My code follows the project's coding style
  • I have formatted my code locally by running npx prettier --write . before submitting
  • I am submitting my PR from a dedicated feature/* branch, not the main branch
  • I have performed a self-review of my code
  • My changes generate no new warnings or errors
  • I have updated documentation if required
  • I have linked the relevant issue

Screenshots / Screen Recording

Screenshot 2026-06-18 231750

@github-actions

Copy link
Copy Markdown
Contributor

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.

Formatting and Branching

  • Please confirm you have formatted your code locally using npx prettier --write ., or you can simply comment /format on this PR to have our bot do it for you!
  • Ensure this PR is made from a feature/* branch and not main.

Note: This project is currently maintained by a solo maintainer, so reviews and responses may sometimes take a little time. Thanks for your patience.

Comment thread frontend/js/user/historical-graphs.js Outdated
Comment thread frontend/js/user/historical-graphs.js Outdated
if (!profileRankingEl) return;

if (data && data.ranking) {
profileRankingEl.textContent = `Number(data.ranking).toLocaleString()`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
profileRankingEl.textContent = `Number(data.ranking).toLocaleString()`;
profileRankingEl.textContent = Number(data.ranking).toLocaleString();

This'll cause the variable to be rendered as a string rather than rendering the actual value associated with it

Comment thread frontend/js/user/historical-graphs.js Outdated
Comment on lines +36 to +37
studentHistoryArray = rawPerformanceData.history || [];
console.log("Successfully fetched user data:", studentHistoryArray);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
studentHistoryArray = rawPerformanceData.history || [];
console.log("Successfully fetched user data:", studentHistoryArray);
userDataArray = rawPerformanceData.history || [];

This variable name change causes the graphs to stop rendering entirely. The rest of the file still uses userDataArray, but it was renamed only here and not in the other places where it's referenced.

Let's keep the existing variable name unless all references are updated together.

Also, let's remove this log entry

@jagdish-15 jagdish-15 added type:feature New feature or request level:intermediate Indicates the difficulty gssoc:approved labels Jun 20, 2026
@jagdish-15 jagdish-15 merged commit 4d13e80 into codepvg:main Jun 20, 2026
1 check passed
@Yashaswini-K-P Yashaswini-K-P deleted the feature/display-global-ranking branch June 20, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved level:intermediate Indicates the difficulty type:feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Display LeetCode Profile Ranking in user specific page

2 participants