mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-21 05:26:06 +00:00
Add tooltips to Win/Loss Score columns in clan stats (#2752)
Resolves #2508 ## Description: Adds hover tooltips to the "Win Score" and "Loss Score" column headers in the clan stats table to help players understand what these weighted scores represent. ### Changes Made - Added tooltip to **Win Score** column: "Weighted wins based on clan participation and match difficulty" - Added tooltip to **Loss Score** column: "Weighted losses based on clan participation and match difficulty" - Uses native HTML `title` attribute (follows existing codebase patterns) - Fully i18n-ready via `translateText()` - other languages will be translated via Crowdin ### Implementation Details - **Files Modified**: 2 files, 4 lines total - `resources/lang/en.json`: Added 2 tooltip translation keys - `src/client/StatsModal.ts`: Added `title` attributes to table headers - No breaking changes ### Expected Behavior When hovering over "Win Score" or "Loss Score" column headers, users see a tooltip explaining the weighted scoring system based on clan participation and match difficulty. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced 
This commit is contained in:
@@ -143,10 +143,16 @@ export class StatsModal extends LitElement {
|
||||
<th class="py-2 px-2 text-right">
|
||||
${translateText("stats_modal.games")}
|
||||
</th>
|
||||
<th class="py-2 px-2 text-right">
|
||||
<th
|
||||
class="py-2 px-2 text-right"
|
||||
title=${translateText("stats_modal.win_score_tooltip")}
|
||||
>
|
||||
${translateText("stats_modal.win_score")}
|
||||
</th>
|
||||
<th class="py-2 px-2 text-right">
|
||||
<th
|
||||
class="py-2 px-2 text-right"
|
||||
title=${translateText("stats_modal.loss_score_tooltip")}
|
||||
>
|
||||
${translateText("stats_modal.loss_score")}
|
||||
</th>
|
||||
<th class="py-2 pl-2 text-right">
|
||||
|
||||
Reference in New Issue
Block a user