Skip to content

feat(client): configurable leaderboard and team stats columns#4646

Merged
evanpelle merged 6 commits into
mainfrom
leaderboard-columns
Jul 22, 2026
Merged

feat(client): configurable leaderboard and team stats columns#4646
evanpelle merged 6 commits into
mainfrom
leaderboard-columns

Conversation

@ryanbarlow97

@ryanbarlow97 ryanbarlow97 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Description:

  • rips out some duped code, making tables use the same layout, where the only thing different is the row content.
  • updated text to be emojis to save space
  • updated columns to be as wide as they need to be
  • updated cells to have left/right thin borders to read easier
  • added more supported column types
  • removed the + button to always show everyone, where the current player is either at the bottom or in the top 5
  • added a cogwheel to change options
  • can select different options for each menu type (player/team stats)
image

works fine on mobile, will probably need some future love though (has h-scroll, so all options can be seen by scrolling):

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory

Please put your Discord username so you can be contacted if a bug or regression is found:

w.o.n

Copilot AI review requested due to automatic review settings July 19, 2026 12:46
@ryanbarlow97
ryanbarlow97 requested a review from a team as a code owner July 19, 2026 12:46
@ryanbarlow97 ryanbarlow97 added this to the v33 milestone Jul 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ryanbarlow97 ryanbarlow97 added the UI/UX UI/UX changes including assets, menus, QoL, etc. label Jul 19, 2026
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds shared configurable column definitions for the leaderboard and team statistics. Users can select visible columns through a popover, with selections persisted independently in UserSettings. Both views now sort, aggregate, and render dynamically from the selected columns.

Changes

Configurable leaderboard columns

Layer / File(s) Summary
Column definitions and defaults
src/client/hud/layers/LeaderboardColumns.ts, src/core/game/LeaderboardConstants.ts, tests/LeaderboardColumns.test.ts
Defines typed column metadata, value formatters, registry ordering, lookup, defaults, and registry tests.
Persisted column selections
src/core/game/UserSettings.ts, tests/UserSettings.test.ts
Stores validated leaderboard and team-statistics column IDs separately in local storage and tests defaults, filtering, fallback, ordering, and independence.
Column selection popover
src/client/hud/layers/ColumnPicker.ts, resources/lang/en.json
Adds localized checkbox controls that preserve at least one selected column and emit ordered selection changes.
Configurable leaderboard rendering
src/client/hud/layers/Leaderboard.ts
Uses selected column definitions for sorting, formatting, dynamic headers, grid sizing, and row cells.
Configurable team statistics
src/client/hud/layers/TeamStats.ts, tests/TeamStats.test.ts
Aggregates selected columns across alive players, sorts teams by tiles, renders dynamic headers and cells, and tests aggregation.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ColumnPicker
  participant Leaderboard
  participant TeamStats
  participant UserSettings
  User->>ColumnPicker: select visible columns
  ColumnPicker->>Leaderboard: dispatch columns-changed
  ColumnPicker->>TeamStats: dispatch columns-changed
  Leaderboard->>UserSettings: persist leaderboard columns
  TeamStats->>UserSettings: persist team statistics columns
  Leaderboard->>Leaderboard: sort and render selected cells
  TeamStats->>TeamStats: aggregate and render selected cells
Loading

Possibly related PRs

Suggested labels: Translation

Suggested reviewers: evanpelle

Poem

Columns bloom beneath the gear,
Rows rearrange, crisp and clear.
Gold and troops now choose their place,
Teams sum up with steady grace.
One checkbox stays, the table sings—
Settings save the chosen things.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed It clearly summarizes the main change: configurable leaderboard and team stats columns.
Description check ✅ Passed It matches the PR's UI and settings changes for configurable columns and tests.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@ryanbarlow97
ryanbarlow97 force-pushed the leaderboard-columns branch from 98715cc to ee125d5 Compare July 19, 2026 13:35
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 19, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70da3432d2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/client/components/StatsTable.ts
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 20, 2026
Comment thread src/client/components/StatsTable.ts
Comment thread src/client/hud/layers/lib/StatsColumns.ts
Comment thread src/client/StatsConstants.ts
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 20, 2026
Comment thread src/client/hud/layers/lib/StatsColumns.ts Outdated
@evanpelle
evanpelle merged commit d76a0c4 into main Jul 22, 2026
15 checks passed
@evanpelle
evanpelle deleted the leaderboard-columns branch July 22, 2026 20:13
@github-project-automation github-project-automation Bot moved this from Development to Complete in OpenFront Release Management Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI/UX UI/UX changes including assets, menus, QoL, etc.

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

3 participants