Page MenuHomeWildfire Games

Absorb duplicated summary tab code to the tab_buttons gui
Needs ReviewPublic

Authored by bb on Jan 7 2018, 5:59 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

The summary screen handles tabs in a strange way, which seems inefficient and duplicative. So rewriting that to use the tab_buttons objects. For this the tab/-buttons code is extended to allow horizontally aligning the tabs.

refs rP20644/rP20684

Test Plan

Notice duplication is gone,
yell for hiding magical values,
maybe yell for some jsDocs,
make sure panel/chart remember still works, and the front doesn't fall

Event Timeline

bb created this revision.Jan 7 2018, 5:59 PM
Owners added a subscriber: Restricted Owners Package.Jan 7 2018, 5:59 PM
bb updated this revision to Diff 5165.Jan 7 2018, 6:00 PM
elexis added a subscriber: elexis.Jan 7 2018, 6:17 PM
elexis added inline comments.
binaries/data/mods/public/gui/common/tab_buttons.js
9

g_Tab prefix, the variable name sounds like it's very easy to get a naming conflict with some other global.
(Soon there might be sufficient variables to hide them behind a prototype)

85–91

Don't split strings that are filenames, people should be able to search for them

Vulcan added a subscriber: Vulcan.Jan 7 2018, 7:45 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 7 2018, 8:53 PM
Executing section Default...
Executing section Source...
Executing section JS...

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...
Executing section Default...
Executing section Source...
Executing section JS...
bb updated this revision to Diff 5200.Jan 9 2018, 11:07 PM
bb marked 2 inline comments as done.
bb added inline comments.
binaries/data/mods/public/gui/common/tab_buttons.js
9

ffs

85–91

sad we need more code now...

Executing section Default...
Executing section Source...
Executing section JS...

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...
Stan added a subscriber: Stan.Sep 5 2019, 1:57 PM
Stan added inline comments.
binaries/data/mods/public/gui/common/tab_buttons.js
25

https://jsdoc.app/tags-type.html I believe it should be boolean :)

binaries/data/mods/public/gui/summary/layout.js
228

Jsdoc ?