Okay, another one: I'm currently integrating the rank data into the Factions table/subviews. At the moment, the changes largely imitate the vanilla behaviour when it comes to ranks (see the attached screenshots from the original CS).
- There are 10 ranks per faction; the amount of rows is fixed. (Easy to change in the future.)
- You can "delete" a rank by giving it an empty name. This sets all requirements of that rank to zero and disables the corresponding cells in the table. (New ranks are also initialised with zeros.)
- The empty rank will stay there until you save and reload the file.
- Saving and loading the add-on file creates the following situation: The list of rank names is filled, i.e. all rank names are shifted upwards until the string array has no empty strings in between existing names. Please note that the requirements stay at the same position.
- Because of this "filling", you end up with a distorted rank list.
I don't like the vanilla behaviour because it is not very intuitive. A more sophisticated approach would be to have two main editing options in that table:
- "Delete Row": Deletes the selected row (moving all higher ranks upwards) and adds a new blank row at the end of the table in order to maintain the fixed amount of rows. Disabled if there are no ranks.
- "Add Row": Adds a new blank row above the selected row. This shifts all higher ranks downwards. Disabled if there already are 10 ranks.
If you insert an empty string, the corresponding requirements are set to zero and disabled in the table. Blank rows in the middle of the rank list are deleted when you save your changes.
What implementation do you prefer? Keeping the vanilla style or improving the usability? Anything to add?
- Ranks in the original CS.
- Deleting a rank disables the requirement fields and sets all values to zero.
- The blank row stays until you save and reload your file. Inserting a new rank name enables the requirement fields again.
- After reloading the file, all rank names have been shifted upwards -- the requirements haven't changed their position. The table's contents are "displaced" now.
- As you can see, we now have a new empty line at the end of the table to make up for the deleted rank.