-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: make more fields, fomatters, ids and languages sorted by alphabetical order #7717
Conversation
fix: make fields sorted by lexicographical order (#7711)
@@ -60,6 +61,7 @@ public EntryTypeViewModel(PreferencesService preferences, | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So please revert that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor improvements
@@ -84,6 +85,10 @@ public void setValues() { | |||
secondarySortFieldsProperty.addAll(fieldNames); | |||
tertiarySortFieldsProperty.addAll(fieldNames); | |||
|
|||
primarySortFieldsProperty.sort(Comparator.comparing(Field::getDisplayName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
SortedList
to wrapper the ObservableList.CHANGELOG.md
described in a way that is understandable for the average user (if applicable)