fix: make more fields, fomatters, ids and languages sorted by alphabetical order#7717
Conversation
fix: make fields sorted by lexicographical order (#7711)
| this.dialogService = dialogService; | ||
| this.stateManager = stateManager; | ||
| fetchers.addAll(WebFetchers.getIdBasedFetchers(preferences.getImportFormatPreferences())); | ||
| fetchers.sort(Comparator.comparing(IdBasedFetcher::getName)); |
There was a problem hiding this comment.
As I said in a comment I don't think it's useful to sort by alphatical order here. DOI fetcher should always be on top because it's the most important one
| secondarySortFieldsProperty.addAll(fieldNames); | ||
| tertiarySortFieldsProperty.addAll(fieldNames); | ||
|
|
||
| primarySortFieldsProperty.sort(Comparator.comparing(Field::getDisplayName)); |
There was a problem hiding this comment.
Simple solution but not effective. You are essentially doing the same sort 3 times.
I would create: List<Field> fieldNames = new ArrayList<>(FieldFactory.getCommonFields())
Then sort it and add it to the properties
|
Thanks for the quick follow up, lgtm to me now. For external contributors a second developer needs to review and approve |
|
@koppor I wanted to check on this, but in https://builds.jabref.org/main/, the files are dating back to May 8. A problem with the automatic build process? |
|
Happens from time to time, most often the mac build fails due to notarization somehow not working at apple's side. |
* upstream/main: (71 commits) [Bot] Update CSL styles (#7735) Fix for issue 6966: open all files of multiple entries (#7709) Add simple unit tests (#7696) Add simple unit tests (#7543) Update check-outdated-dependencies.yml Added preset for new entry keybindings and reintroduced defaults (#7705) Select the entry which has smaller dictonary order when merge (#7708) Update CHANGELOG.md fix: make more fields, fomatters, ids and languages sorted by alphabetical order (#7717) Bump libreoffice from 7.1.2 to 7.1.3 (#7721) Bump unoloader from 7.1.2 to 7.1.3 (#7724) Bump org.beryx.jlink from 2.23.7 to 2.23.8 (#7723) Bump org.openjfx.javafxplugin from 0.0.9 to 0.0.10 (#7725) fix: make fields sorted by lexicographical order (#7711) Fix tests Refactoring existing unit tests (#7687) Refactoring and addition of unit tests (#7581) Refactor simple Unit Tests (#7571) Add simple unit tests (#7544) add and extend unit tests (#7685) ...
Fixes #7716
We fix that more fields, fomatters, ids and languages sorted by alphabetical order. Solving them by either adding sort to relative property or using a
SortedListto wrapper the ObservableList.CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)