Skip to content

Commit b281e47

Browse files
authored
Merge branch 'main' into fix/add-buttons
2 parents 8b96e6b + fac8c55 commit b281e47

File tree

72 files changed

+1061
-637
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1061
-637
lines changed

.github/workflows/tests-code.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,8 @@ jobs:
483483
with:
484484
files: |
485485
jablib/src/main/java/**/*.java
486+
files_ignore: |
487+
jablib/src/main/java/**/*-*.java
486488
487489
- name: Build ${{ matrix.launcher }} launcher including changed classes
488490
shell: bash

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
2828
- We added a new ID based fetcher for [EuropePMC](https://europepmc.org/). [#13389](https://github.com/JabRef/jabref/pull/13389)
2929
- We added quick settings for welcome tab. [#12664](https://github.com/JabRef/jabref/issues/12664)
3030
- We added an initial [cite as you write](https://retorque.re/zotero-better-bibtex/citing/cayw/) endpoint. [#13187](https://github.com/JabRef/jabref/issues/13187)
31+
- We added pagination support for the web search entries dialog, improving navigation for large search results. [#5507](https://github.com/JabRef/jabref/issues/5507)
3132
- We added "copy preview as markdown" feature. [#12552](https://github.com/JabRef/jabref/issues/12552)
3233
- In case no citation relation information can be fetched, we show the data providers reason. [#13549](https://github.com/JabRef/jabref/pull/13549)
3334
- When relativizing file names, symlinks are now taken into account. [#12995](https://github.com/JabRef/jabref/issues/12995)
@@ -83,6 +84,8 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
8384
- The Welcome tab now has a responsive layout. [#12664](https://github.com/JabRef/jabref/issues/12664)
8485
- We introduced a donation prompt in the Welcome tab. [#12664](https://github.com/JabRef/jabref/issues/12664)
8586
- We changed to syntax for the websearch to the one of the main search bar. [#13607](https://github.com/JabRef/jabref/issues/13607)
87+
- We improved the for the web search tab in the preferences dialog [#13791](https://github.com/JabRef/jabref/pull/13791)
88+
- We improved the event viewer for debugging [#13783](https://github.com/JabRef/jabref/pull/13783).
8689

8790
### Fixed
8891

@@ -118,6 +121,8 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
118121
- We fixed an issue where the groups were still displayed after closing all libraries. [#13382](https://github.com/JabRef/jabref/issues/13382)
119122
- Enhanced field selection logic in the Merge Entries dialog when fetching from DOI to prefer valid years and entry types. [#12549](https://github.com/JabRef/jabref/issues/12549)
120123
- We improved consistency in the Add Buttons. [#13791](https://github.com/JabRef/jabref/pull/13791)
124+
- We fixed an issue where theme or font size are not respected for all dialogs [#13558](https://github.com/JabRef/jabref/issues/13558)
125+
- We removed unnecessary spacing and margin in the AutomaticFieldEditor. [#13792](https://github.com/JabRef/jabref/pull/13792)
121126

122127
### Removed
123128

build-logic/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repositories {
1010

1111
dependencies {
1212
implementation("com.adarshr:gradle-test-logger-plugin:4.0.0")
13-
implementation("com.autonomousapps:dependency-analysis-gradle-plugin:3.0.0")
13+
implementation("com.autonomousapps:dependency-analysis-gradle-plugin:3.0.1")
1414
implementation("com.github.andygoossens:gradle-modernizer-plugin:1.11.0")
1515
implementation("org.gradlex:extra-java-module-info:1.13")
1616
implementation("org.gradlex:java-module-dependencies:1.9.2")

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
// This is the behavior when applied in the root project (https://docs.openrewrite.org/reference/gradle-plugin-configuration#multi-module-gradle-projects)
1010

1111
dependencies {
12-
rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:3.13.0"))
12+
rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:3.14.0"))
1313
rewrite("org.openrewrite.recipe:rewrite-static-analysis")
1414
rewrite("org.openrewrite.recipe:rewrite-logging-frameworks")
1515
rewrite("org.openrewrite.recipe:rewrite-testing-frameworks")

docs/code-howtos/fetchers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Fetchers are the implementation of the [search using online services](https://do
1212
| [SAO/NASA Astrophysics Data System](https://docs.jabref.org/collect/import-using-online-bibliographic-database#sao-nasa-astrophysics-data-system) | [ADS UI](https://ui.adsabs.harvard.edu/user/settings/token) | `AstrophysicsDataSystemAPIKey` | 5000 calls/day |
1313
| [ScienceDirect](https://www.sciencedirect.com) | | `ScienceDirectApiKey` | |
1414
| [SemanticScholar](https://www.semanticscholar.org/) | <https://www.semanticscholar.org/product/api#api-key-form> | `SemanticScholarApiKey` | |
15-
| [Springer Nature](https://docs.jabref.org/collect/import-using-online-bibliographic-database#springer) | [Springer Nature API Portal](https://dev.springernature.com) | `SpringerNatureAPIKey` | 5000 calls/day |
15+
| [Springer Nature](https://docs.jabref.org/collect/import-using-online-bibliographic-database#springer) | [Springer Nature API Portal](https://dev.springernature.com). Use the "Meta API" API key. | `SpringerNatureAPIKey` | 5000 calls/day |
1616
| [Zentralblatt Math](https://www.zbmath.org) | (none) | (none) | Depending on the current network |
1717
| [Biodiversity Heritage Library](https://www.biodiversitylibrary.org/) | [Biodiversitylibrary](https://about.biodiversitylibrary.org/tools-and-services/developer-and-data-tools/#APIs) | `BiodiversityHeritageApiKey` | - |
1818

jabgui/src/main/java/org/jabref/gui/consistency/ConsistencyCheckDialogViewModel.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import java.util.ArrayList;
99
import java.util.Collection;
1010
import java.util.Comparator;
11-
import java.util.LinkedHashSet;
1211
import java.util.List;
1312
import java.util.Map;
1413
import java.util.Optional;
@@ -46,15 +45,13 @@
4645
public class ConsistencyCheckDialogViewModel extends AbstractViewModel {
4746

4847
private static final Logger LOGGER = LoggerFactory.getLogger(ConsistencyCheckDialogViewModel.class);
49-
private static final int EXTRA_COLUMNS_COUNT = 2;
5048

5149
private final BibliographyConsistencyCheck.Result result;
5250
private final DialogService dialogService;
5351
private final GuiPreferences preferences;
5452
private final BibEntryTypesManager entryTypesManager;
5553

5654
private final List<Field> allReportedFields;
57-
private final int columnCount;
5855
private final ObservableList<ConsistencyMessage> tableData = FXCollections.observableArrayList();
5956
private final StringProperty selectedEntryType = new SimpleStringProperty();
6057

@@ -72,7 +69,6 @@ public ConsistencyCheckDialogViewModel(DialogService dialogService,
7269
.sorted(Comparator.comparing(Field::getName))
7370
.distinct()
7471
.toList();
75-
this.columnCount = getColumnNames().size();
7672

7773
result.entryTypeToResultMap().entrySet().stream()
7874
.sorted(Comparator.comparing(entry -> entry.getKey().getName()))
@@ -93,8 +89,8 @@ public ObservableList<ConsistencyMessage> getTableData() {
9389
return tableData;
9490
}
9591

96-
public Set<String> getColumnNames() {
97-
Set<String> result = LinkedHashSet.newLinkedHashSet(columnCount + EXTRA_COLUMNS_COUNT);
92+
public List<String> getColumnNames() {
93+
List<String> result = new ArrayList<>(allReportedFields.size() + 2); // there are two extra columns
9894
result.add("Entry Type");
9995
result.add("CitationKey");
10096
allReportedFields.forEach(field-> result.add(field.getDisplayName().trim()));
@@ -138,7 +134,7 @@ private void writeBibEntry(BibEntry bibEntry, String entryType, Set<Field> requi
138134
}
139135

140136
private List<String> getFindingsAsList(BibEntry bibEntry, String entryType, Set<Field> requiredFields, Set<Field> optionalFields) {
141-
List<String> result = new ArrayList<>(columnCount + EXTRA_COLUMNS_COUNT);
137+
List<String> result = new ArrayList<>(allReportedFields.size() + 2);
142138
result.add(entryType);
143139
result.add(bibEntry.getCitationKey().orElse(""));
144140
allReportedFields.forEach(field ->
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package org.jabref.gui.edit.automaticfiededitor;
22

3-
import javafx.scene.layout.AnchorPane;
3+
import javafx.scene.layout.VBox;
44

5-
public abstract class AbstractAutomaticFieldEditorTabView extends AnchorPane implements AutomaticFieldEditorTab {
5+
public abstract class AbstractAutomaticFieldEditorTabView extends VBox implements AutomaticFieldEditorTab {
66

77
@Override
8-
public AnchorPane getContent() {
8+
public VBox getContent() {
99
return this;
1010
}
1111
}

jabgui/src/main/java/org/jabref/gui/edit/automaticfiededitor/AutomaticFieldEditorDialog.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,11 @@ public AutomaticFieldEditorDialog(StateManager stateManager, UndoManager undoMan
6060
}
6161
return "";
6262
});
63-
64-
// This will prevent all dialog buttons from having the same size
65-
// Read more: https://stackoverflow.com/questions/45866249/javafx-8-alert-different-button-sizes
66-
getDialogPane().getButtonTypes().stream()
67-
.map(getDialogPane()::lookupButton)
68-
.forEach(btn -> ButtonBar.setButtonUniformSize(btn, false));
6963
}
7064

7165
@FXML
7266
public void initialize() {
73-
viewModel = new AutomaticFieldEditorViewModel(selectedEntries, database, undoManager, stateManager);
67+
viewModel = new AutomaticFieldEditorViewModel(database, undoManager, stateManager);
7468

7569
for (AutomaticFieldEditorTab tabModel : viewModel.getFieldEditorTabs()) {
7670
NotificationPaneAdapter notificationPane = new NotificationPaneAdapter(tabModel.getContent());

jabgui/src/main/java/org/jabref/gui/edit/automaticfiededitor/AutomaticFieldEditorViewModel.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package org.jabref.gui.edit.automaticfiededitor;
22

3-
import java.util.List;
4-
53
import javax.swing.undo.UndoManager;
64

75
import javafx.collections.FXCollections;
@@ -14,7 +12,6 @@
1412
import org.jabref.gui.edit.automaticfiededitor.renamefield.RenameFieldTabView;
1513
import org.jabref.gui.undo.NamedCompound;
1614
import org.jabref.model.database.BibDatabase;
17-
import org.jabref.model.entry.BibEntry;
1815

1916
public class AutomaticFieldEditorViewModel extends AbstractViewModel {
2017
public static final String NAMED_COMPOUND_EDITS = "EDIT_FIELDS";
@@ -23,7 +20,7 @@ public class AutomaticFieldEditorViewModel extends AbstractViewModel {
2320

2421
private final UndoManager undoManager;
2522

26-
public AutomaticFieldEditorViewModel(List<BibEntry> selectedEntries, BibDatabase database, UndoManager undoManager, StateManager stateManager) {
23+
public AutomaticFieldEditorViewModel(BibDatabase database, UndoManager undoManager, StateManager stateManager) {
2724
this.undoManager = undoManager;
2825
fieldEditorTabs.addAll(
2926
new EditFieldContentTabView(database, stateManager),

0 commit comments

Comments
 (0)