noahm/DDRCardDraw

Feature Request - Rename "showPool" and "showLabels" Keys in a Saved JSON File

Closed this issue · 3 comments

Context

I'm preparing some JSON files to save myself and co-TO's time in programming card draws on the computer during the Beast in the East 6 DDR A20+ tournament next Friday (it's my 2nd time doing so); and along the way, I encountered minor confusion during testing to make sure that the display, when loading the JSON, was as I expected.

What I was looking to do was to make sure "Show player & round labels" was enabled from the GUI when loading a JSON file; and although I was successful in doing so by setting configState.showLabels to false, it took me time to realize that as configState.showPool, from the name, made me think that was the option to configure, when it reality it was tied to "Show Eligible Charts" in the GUI.

It took roughly a half-hour to figure out, and perhaps I could've avoided the problem by just configuring the options in the GUI, saving the file, and then blindly forgetting about it, but another issue popped up #207 that impeded that thinking.

The Request

Nevertheless, I think there's value in disambiguating those two checkbox options in the JSON as follows:

  • To toggle "Show player & round labels" in the GUI, instead of "showLabels", use "showPlayerAndRoundLabels" or "showPlayerRoundLabels" in the JSON.
  • To toggle "Show Eligible Charts" in the GUI, instead of "showPool", use "showEligibleCharts" in the JSON.

As presented currently in JSON:

{
  "version": 1,
  "dataSetName": "a20plus",
  "configState": {
    [... other keys omitted for brevity ...]
    "showPool": false,
    "playerNames": [],
    "tournamentRounds": [
      "Pools Level 1"
    ],
    "showLabels": true
  }
}

As I'm suggesting here:

{
  "version": 1,
  "dataSetName": "a20plus",
  "configState": {
    [... other keys omitted for brevity ...]
    "showEligibleCharts": false,
    "playerNames": [],
    "tournamentRounds": [
      "Pools Level 1"
    ],
    "showPlayerAndRoundLabels": true
  }
}

While experiencing this setup confusion, I encountered bug #207

noahm commented

Now that these internal settings names are more exposed to everyday use through the newer JSON settings files, I think you're absolutely right. The names should be much more clear and less confusing, just on the off chance that people are looking to edit them directly. I'll make that change along with the rest of what you reported! (and again, I also appreciate the detailed writeup!)

noahm commented

These two fields are now renamed just as you suggested. The old names will still work when loading config files, so you don't have to go back and update everything if you don't want to. (Or if you just load a config and immediately save back out, they'll be renamed for you)