Open NicolasGrosjean opened 7 years ago
We can let the user choose a weight (integer) when he create/modify a list. It will need a default value (for previous lists or if user don't choose a weight), and symbolize infinity weight (new lists with no weight set will be at the end)
ModLists will be ordered by weight→name→nbOfMods Add arrows next tableview to up/down weight
Put some weights is not user friendly because it is manual and so add more configuration to do, contrary to automatic ordering by frequency usage.
Arrows in columns names of the new table view is more user friendly because very intuitive.
Arrows work only for the last column :
It's because i forgot to disable the column when i added it...
Because in previous versions, sort options caused selection bugs.
Now it looks like to work, except sort is bad :
Sorting is according to ASCII code so the non letters character give a non natural order.
We can maybe add a comparator which doesn't care about non-alphanumeric characters.
From : https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/TableColumnBase.html#setComparator-java.util.Comparator- http://blog.professional-webworkx.de/javafx8-add-a-custom-comparator-to-the-tableviews-column/
// add a new Comparator to the eMail-Column
eMailCol.setComparator((email1, email2) -> email1.compareToIgnoreCase(email2));
personTable.getColumns().addAll(firstNameCol, lastNameCol, eMailCol);
For ModList order (in ListManager) i also found those drag&drop example : https://gist.github.com/jewelsea/7821196 https://stackoverflow.com/questions/12353576/drag-drop-in-javafx-table
Someone in the Discord asked to sort the modlist
The configurations are ordered by their creation date. We can imagine to sort them according
Or we can simply let the user choose the order with arrows.