Page MenuHomeWildfire Games

Fix the Tributes entry in the Value drop-down of the Charts tab of the game summary
ClosedPublic

Authored by Gallaecio on Jan 6 2018, 5:28 PM.

Details

Summary

I renamed the tributes entry caption to just "Tributes", and added a new property, "captionHeader", containing the old caption.

The code that renders the corresponding header in the Resources tab uses "captionHeader" when available, and "caption" otherwise, so for Tributes the old caption is used. The Charts tab drop-down for Value uses the new caption instead.

Then I did the same for Bribes, on the Misc tab.

Test Plan

After making the changes, I rebuilt and started the game, started a battle game, abandoned, and verified in the summary screen that:

  • The Tributes header in the Resources tab still has "(Send / Received)" as before.
  • The Tributes entry that shows on the Value drop-down of the Charts tab when the Category drop-down is in Resources simply says "Tributes".
  • The Bribes header in the Misc tab still has "(Succeeded / Failed)" as before.
  • The Bribes entry that shows on the Value drop-down of the Charts tab when the Category drop-down is in Misc simply says "Bribes".

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Gallaecio created this revision.Jan 6 2018, 5:28 PM
Gallaecio updated this revision to Diff 5125.Jan 6 2018, 5:32 PM

Fix the indentation of new code

Gallaecio updated this revision to Diff 5129.Jan 6 2018, 5:41 PM

Use || instead of if/else, as suggested by elexis on IRC

Gallaecio updated this revision to Diff 5130.Jan 6 2018, 5:48 PM

Fix Misc / Bribes as well, as requested by elexis on IRC

Gallaecio edited the summary of this revision. (Show Details)Jan 6 2018, 5:52 PM
Gallaecio edited the test plan for this revision. (Show Details)
elexis accepted this revision.Jan 6 2018, 5:54 PM

Thanks for the patch Adrián :-)

binaries/data/mods/public/gui/summary/layout.js
273 ↗(On Diff #5130)

Was wondering if this should support it too for symmetry, but as long as we don't have a use case and don't merge both functions somehow, that's nothing needed to be investigated now.

This revision is now accepted and ready to land.Jan 6 2018, 5:54 PM
Vulcan added a subscriber: Vulcan.Jan 6 2018, 5:56 PM

Successful build - Chance fights ever on the side of the prudent.

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Vulcan added a comment.Jan 6 2018, 5:58 PM
Executing section Default...
Executing section Source...
Executing section JS...
Vulcan added a comment.Jan 6 2018, 7:58 PM

Successful build - Chance fights ever on the side of the prudent.

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Vulcan added a comment.Jan 6 2018, 8:00 PM
Executing section Default...
Executing section Source...
Executing section JS...
Vulcan added a comment.Jan 6 2018, 9:04 PM

Successful build - Chance fights ever on the side of the prudent.

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Vulcan added a comment.Jan 6 2018, 9:06 PM
Executing section Default...
Executing section Source...
Executing section JS...
This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Jan 6 2018, 10:42 PM

Successful build - Chance fights ever on the side of the prudent.

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...