Skip to content

feat(leaderboard): added page indicator (@Repr-dev)#7818

Merged
Miodec merged 2 commits into
monkeytypegame:masterfrom
Repr-dev:master
May 19, 2026
Merged

feat(leaderboard): added page indicator (@Repr-dev)#7818
Miodec merged 2 commits into
monkeytypegame:masterfrom
Repr-dev:master

Conversation

@Repr-dev

@Repr-dev Repr-dev commented Apr 12, 2026

Copy link
Copy Markdown

Description

At the moment, it is impossible to tell which page of monkeytype.com/leaderboards you are on just from the content of the webpage. One must look at the URL parameters (/leaderboards?...&page=X) in order to get this information. So, I added a numerical indicator next to the page control buttons.

All this code does is add a span element in the same container as the page control buttons. The span is placed to the left of the buttons and is given a lot of the same Tailwind classes. The page number in the span comes from the data that is already being passed down to the buttons.

Old:
image

New (replication of my approach, made with Chrome Inspector):
image

Closes

Discussion #7815. My first open source contribution

@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Apr 12, 2026
@Repr-dev Repr-dev marked this pull request as ready for review April 15, 2026 12:57
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label Apr 15, 2026
@Miodec

Miodec commented Apr 30, 2026

Copy link
Copy Markdown
Member

Maybe something like this instead?
image

@Miodec Miodec added the waiting for update Pull requests or issues that require changes/comments before continuing label Apr 30, 2026
@Miodec

Miodec commented Apr 30, 2026

Copy link
Copy Markdown
Member

Or we could go with something more classic
image

@github-actions github-actions Bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Apr 30, 2026
@Repr-dev

Copy link
Copy Markdown
Author

@Miodec 5c9f425, should look like this:
image

I thought I'd go with your first proposition to preserve the clear user page and go-to-page buttons.

@Miodec Miodec merged commit 68c55b7 into monkeytypegame:master May 19, 2026
15 checks passed
@Miodec

Miodec commented May 19, 2026

Copy link
Copy Markdown
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff waiting for review Pull requests that require a review before continuing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants