Skip to content

Fix game history action button overlap in translated layouts - #4824

Merged
evanpelle merged 4 commits into
openfrontio:mainfrom
Aotumuri:fix-icon
Aug 2, 2026
Merged

Fix game history action button overlap in translated layouts#4824
evanpelle merged 4 commits into
openfrontio:mainfrom
Aotumuri:fix-icon

Conversation

@Aotumuri

@Aotumuri Aotumuri commented Aug 2, 2026

Copy link
Copy Markdown
Member

Description:

The game history card originally displayed the Game ID, Stats button, and Watch Replay button in a single row using text labels.

This worked in English, but longer translations caused the action buttons to overlap the Game ID.
The same issue affected both player and clan game history pages.

To fix this, the Stats and Watch Replay buttons were replaced with icons.

before
スクリーンショット 2026-08-02 15 59 02

after
スクリーンショット 2026-08-02 15 58 50

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:

aotumuri

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fff73095-c333-4d19-8265-a4e633454086

📥 Commits

Reviewing files that changed from the base of the PR and between ed24752 and f41be01.

📒 Files selected for processing (3)
  • resources/lang/en.json
  • src/client/components/baseComponents/stats/PlayerGameHistoryView.ts
  • src/client/components/clan/ClanGameHistoryView.ts
💤 Files with no reviewable changes (1)
  • resources/lang/en.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/client/components/baseComponents/stats/PlayerGameHistoryView.ts
  • src/client/components/clan/ClanGameHistoryView.ts

Walkthrough

The player and clan game history views replace text action labels with stats and replay icons. They remove game ID copy controls and retain click handlers, localized titles, ARIA labels, and screen-reader text.

Changes

Game history action icons

Layer / File(s) Summary
Accessible stats and replay actions
src/client/components/baseComponents/stats/PlayerGameHistoryView.ts, src/client/components/clan/ClanGameHistoryView.ts, resources/lang/en.json
The views resolve stats and replay assets, render accessible 18px icon buttons, and remove game ID copy controls. The English localization removes the unused game ID label.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: UI/UX

Suggested reviewers: evanpelle

Poem

Stats and replay wear icons bright,
Game ID controls leave the sight.
Labels remain for screens to hear,
Handlers guide each action clear.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the fix for overlapping game history action buttons in translated layouts.
Description check ✅ Passed The description explains the overlap issue, the icon-based fix, affected pages, screenshots, and related tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

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.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 2, 2026
@ryanbarlow97

ryanbarlow97 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

theres a part of me that wants to scrap the game id text and only show it in the stats part anyway, thoughts?

Maybe just like

"Game Info" (Or Stats) and "Replay"

or if not wide enough

"Game Info"
"Replay"

@Aotumuri

Aotumuri commented Aug 2, 2026

Copy link
Copy Markdown
Member Author

theres a part of me that wants to scrap the game id text and only show it in the stats part anyway, thoughts?

Maybe just like

"Game Info" (Or Stats) and "Replay"

or if not wide enough

"Game Info" "Replay"

スクリーンショット 2026-08-03 7 18 35 How about this?

@evanpelle evanpelle added this to the v33 milestone Aug 2, 2026
@github-project-automation github-project-automation Bot moved this from Triage to Final Review in OpenFront Release Management Aug 2, 2026
@evanpelle
evanpelle merged commit 9f3423d into openfrontio:main Aug 2, 2026
10 of 11 checks passed
@github-project-automation github-project-automation Bot moved this from Final Review to Complete in OpenFront Release Management Aug 2, 2026
@ryanbarlow97

ryanbarlow97 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor
image @Aotumuri do you mind having a play around? this is a lot of dead space and looks a bit odd to me

maybe move the buttons around, or put them in the game, or move some text outta the image and make the image taller idk

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

Labels

None yet

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

4 participants