I253 add counts to team status pane#1092
Conversation
|
I did all the test cases, they all work. I have couple of points I would like to make. |
| @@ -0,0 +1,33 @@ | |||
| package edu.csus.ecs.pc2.core; | |||
There was a problem hiding this comment.
Should files that only contain enums have copyright?
There was a problem hiding this comment.
I agree. This needs a copyright notice.
johnbrvc
left a comment
There was a problem hiding this comment.
I've tested this and it seems to work.
I made some minor comments. I think the spelling errors in the help message should be fixed before approval.
| @@ -0,0 +1,33 @@ | |||
| package edu.csus.ecs.pc2.core; | |||
There was a problem hiding this comment.
I agree. This needs a copyright notice.
| if (showTeamsCheckBox == null) { | ||
| showTeamsCheckBox = new JCheckBox(); | ||
| showTeamsCheckBox.setText("Show enabled teams"); | ||
| showTeamsCheckBox.setText("Show only scoreboard teams"); |
There was a problem hiding this comment.
I might argue that "Show non-hidden teams" is a better description?
| private String statusCountWhatsThisMessage = // | ||
| "\nThe count values (in parentheses) in the STATUS header can be configured in two modes." // | ||
| + "\nIf 'By State' is selected, each count represents the total number of teams in precisely that state." // | ||
| + "\nIf 'Cummulative' is selected, each count represents the total number of teams who are OR WERE AT SOME POINT in that state." // |
| + "\nIf 'Cummulative' is selected, each count represents the total number of teams who are OR WERE AT SOME POINT in that state." // | ||
| + "\n\nFor example, if two teams login in, and then one of those teams submits a run," // | ||
| + "\n'By State' will show one team in the 'Has Logged In' state and one team in the 'Submitted Run(s)' state," // | ||
| + "\nwhereas 'Cummulative' will show that TWO teams have logged in (and one is currently in the 'Submitted Run(s)' state)." // |
Description of what the PR does
Adds "counts" to the Team Status screen labels. Includes a button group that allows toggling between two representations of count values: either the raw number of teams currently in each status category (essentially, a count of the number of teams of each "status color"), or a cummulative total of teams that are or have been in that state.
For example, if two teams have logged in, and one of them has subsequently submitted a run, then the "raw" count display would show one team in the "Has Logged In" state and one team in the "Has Submitted Runs" state, while the "cummulative" count display would show two teams in the "Has Logged In" state and one in the "Has Submitted Runs" state.
The majority of the development (code) in this PR was done by Doug Lane (R.I.P.) and was ported from a branch in his fork (see for reference PR #264, which was closed by Doug without being merged.) The main contribution of the author of this PR (other than porting Doug's work into the current codebase) was to add GUI radio buttons which allow toggling between the two "count modes" (Doug's work already had support for a mouse CTRL-CLICK doing the same thing.)
Issue which the PR addresses
Fixes #253
Environment in which the PR was developed (OS,IDE, Java version, etc.)
Windows 11, Eclipse 2020-12, Java version "11.0.16.1" 2022-08-18 LTS
Precise steps for testing the PR
The above sequence should be sufficient to demonstrate that "By State" shows counts of teams IN EACH STATE (i.e., the counts of teams rendered in the corresponding color), while "Cummulative" shows counts of how many teams are or ever were in that state.