Skip to content

Commit

Permalink
Merge branch 'slr-prefs' of https://github.com/subhramit/jabref into …
Browse files Browse the repository at this point in the history
…slr-prefs
  • Loading branch information
subhramit committed Aug 21, 2024
2 parents 2e9b4da + af4c8b2 commit 9c7c141
Show file tree
Hide file tree
Showing 25 changed files with 146 additions and 143 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- The dialog for [adding an entry using reference text](https://docs.jabref.org/collect/newentryfromplaintext) is now filled with the clipboard contents as default. [#11565](https://github.com/JabRef/jabref/pull/11565)
- Added minimal support for [biblatex data annotation](https://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf#subsection.3.7) fields in `.layout` files. [#11505](https://github.com/JabRef/jabref/issues/11505)
- Added saving of selected options in the [Lookup -> Search for unlinked local files dialog](https://docs.jabref.org/collect/findunlinkedfiles#link-the-pdfs-to-your-bib-library). [#11439](https://github.com/JabRef/jabref/issues/11439)
- We fixed ans issue where text in Dark mode inside "Citation information" was not readable [#11512](https://github.com/JabRef/jabref/issues/11512)
- We enabled creating a new file link manually. [#11017](https://github.com/JabRef/jabref/issues/11017)
- We added a toggle button to invert the selected groups. [#9073](https://github.com/JabRef/jabref/issues/9073)
- We reintroduced the floating search in the main table. [#4237](https://github.com/JabRef/jabref/issues/4237)
- We fixed an issue where the selection of an entry in the table lost after searching for a group. [#3176](https://github.com/JabRef/jabref/issues/3176)
- When starting a new SLR, the selected catalogs now persist within and across JabRef sessions. [koppor#614](https://github.com/koppor/jabref/issues/614)
- We added a different background color to the search bar to indicate when the search syntax is wrong. [#11658](https://github.com/JabRef/jabref/pull/11658)

### Changed

Expand All @@ -49,6 +48,9 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We fixed an issue with query transformers (JStor and others). [#11643](https://github.com/JabRef/jabref/pull/11643)
- We fixed an issue where a new unsaved library was not marked with an asterisk. [#11519](https://github.com/JabRef/jabref/pull/11519)
- We fixed an issue where JabRef starts without window decorations. [#11440](https://github.com/JabRef/jabref/pull/11440)
- We fixed an issue where the entry preview highlight was not working when searching before opening the entry editor. [#11659](https://github.com/JabRef/jabref/pull/11659)
- We fixed an issue where text in Dark mode inside "Citation information" was not readable. [#11512](https://github.com/JabRef/jabref/issues/11512)
- We fixed an issue where the selection of an entry in the table lost after searching for a group. [#3176](https://github.com/JabRef/jabref/issues/3176)

### Removed

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/jabref/gui/Base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,10 @@ TextFlow > .tooltip-text-monospaced {
-fx-padding: 0em 1.8em 0em 0em;
}

.global-search-bar:illegal-search {
-fx-background-color: derive(-jr-light-red, 70%);
}

/* The little arrow that shows up when not all tool-bar icons fit into the tool-bar.
We want to have a look that matches our icons in the tool-bar */
.mainToolbar .tool-bar-overflow-button > .arrow {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.jabref.gui.collab;

import org.jabref.gui.DialogService;
import org.jabref.gui.StateManager;
import org.jabref.gui.collab.entryadd.EntryAdd;
import org.jabref.gui.collab.entrychange.EntryChange;
import org.jabref.gui.collab.entrychange.EntryChangeDetailsView;
Expand Down Expand Up @@ -31,7 +30,6 @@
public class DatabaseChangeDetailsViewFactory {
private final BibDatabaseContext databaseContext;
private final DialogService dialogService;
private final StateManager stateManager;
private final ThemeManager themeManager;
private final PreferencesService preferencesService;
private final BibEntryTypesManager entryTypesManager;
Expand All @@ -40,15 +38,13 @@ public class DatabaseChangeDetailsViewFactory {

public DatabaseChangeDetailsViewFactory(BibDatabaseContext databaseContext,
DialogService dialogService,
StateManager stateManager,
ThemeManager themeManager,
PreferencesService preferencesService,
BibEntryTypesManager entryTypesManager,
PreviewViewer previewViewer,
TaskExecutor taskExecutor) {
this.databaseContext = databaseContext;
this.dialogService = dialogService;
this.stateManager = stateManager;
this.themeManager = themeManager;
this.preferencesService = preferencesService;
this.entryTypesManager = entryTypesManager;
Expand All @@ -63,7 +59,6 @@ public DatabaseChangeDetailsView create(DatabaseChange databaseChange) {
entryChange.getNewEntry(),
databaseContext,
dialogService,
stateManager,
themeManager,
preferencesService,
entryTypesManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import javafx.scene.layout.BorderPane;

import org.jabref.gui.DialogService;
import org.jabref.gui.StateManager;
import org.jabref.gui.preview.PreviewViewer;
import org.jabref.gui.theme.ThemeManager;
import org.jabref.gui.util.BaseDialog;
Expand Down Expand Up @@ -57,7 +56,6 @@ public class DatabaseChangesResolverDialog extends BaseDialog<Boolean> {
private boolean areAllChangesDenied;

@Inject private UndoManager undoManager;
@Inject private StateManager stateManager;
@Inject private DialogService dialogService;
@Inject private PreferencesService preferencesService;
@Inject private ThemeManager themeManager;
Expand Down Expand Up @@ -101,8 +99,8 @@ public boolean areAllChangesDenied() {

@FXML
private void initialize() {
PreviewViewer previewViewer = new PreviewViewer(database, dialogService, preferencesService, stateManager, themeManager, taskExecutor);
DatabaseChangeDetailsViewFactory databaseChangeDetailsViewFactory = new DatabaseChangeDetailsViewFactory(database, dialogService, stateManager, themeManager, preferencesService, entryTypesManager, previewViewer, taskExecutor);
PreviewViewer previewViewer = new PreviewViewer(database, dialogService, preferencesService, themeManager, taskExecutor);
DatabaseChangeDetailsViewFactory databaseChangeDetailsViewFactory = new DatabaseChangeDetailsViewFactory(database, dialogService, themeManager, preferencesService, entryTypesManager, previewViewer, taskExecutor);

viewModel = new ExternalChangesResolverViewModel(changes, undoManager);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import javafx.scene.web.WebView;

import org.jabref.gui.DialogService;
import org.jabref.gui.StateManager;
import org.jabref.gui.collab.DatabaseChangeDetailsView;
import org.jabref.gui.preview.PreviewViewer;
import org.jabref.gui.theme.ThemeManager;
Expand All @@ -24,15 +23,12 @@
import com.tobiasdiez.easybind.EasyBind;

public final class EntryChangeDetailsView extends DatabaseChangeDetailsView {
private final PreviewWithSourceTab oldPreviewWithSourcesTab = new PreviewWithSourceTab();
private final PreviewWithSourceTab newPreviewWithSourcesTab = new PreviewWithSourceTab();
private boolean scrolling = false;

public EntryChangeDetailsView(BibEntry oldEntry,
BibEntry newEntry,
BibDatabaseContext databaseContext,
DialogService dialogService,
StateManager stateManager,
ThemeManager themeManager,
PreferencesService preferencesService,
BibEntryTypesManager entryTypesManager,
Expand All @@ -44,7 +40,7 @@ public EntryChangeDetailsView(BibEntry oldEntry,
onDisk.getStyleClass().add("lib-change-header");

// we need a copy here as we otherwise would set the same entry twice
PreviewViewer previewClone = new PreviewViewer(databaseContext, dialogService, preferencesService, stateManager, themeManager, taskExecutor);
PreviewViewer previewClone = new PreviewViewer(databaseContext, dialogService, preferencesService, themeManager, taskExecutor);

// The scroll bar used is not part of ScrollPane, but the attached WebView.
WebView previewCloneView = (WebView) previewClone.getContent();
Expand All @@ -53,7 +49,9 @@ public EntryChangeDetailsView(BibEntry oldEntry,
synchronizeScrolling(previewViewerView, previewCloneView);
// TODO: Also sync scrolling for BibTeX view.

PreviewWithSourceTab oldPreviewWithSourcesTab = new PreviewWithSourceTab();
TabPane oldEntryTabPane = oldPreviewWithSourcesTab.getPreviewWithSourceTab(oldEntry, databaseContext, preferencesService, entryTypesManager, previewClone, Localization.lang("Entry Preview"));
PreviewWithSourceTab newPreviewWithSourcesTab = new PreviewWithSourceTab();
TabPane newEntryTabPane = newPreviewWithSourcesTab.getPreviewWithSourceTab(newEntry, databaseContext, preferencesService, entryTypesManager, previewViewer, Localization.lang("Entry Preview"));

EasyBind.subscribe(oldEntryTabPane.getSelectionModel().selectedIndexProperty(), selectedIndex -> {
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/org/jabref/gui/entryeditor/CommentsTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,19 @@
import javafx.scene.layout.RowConstraints;

import org.jabref.gui.DialogService;
import org.jabref.gui.StateManager;
import org.jabref.gui.autocompleter.SuggestionProviders;
import org.jabref.gui.fieldeditors.FieldEditorFX;
import org.jabref.gui.fieldeditors.FieldNameLabel;
import org.jabref.gui.icon.IconTheme;
import org.jabref.gui.theme.ThemeManager;
import org.jabref.gui.undo.RedoAction;
import org.jabref.gui.undo.UndoAction;
import org.jabref.gui.util.OptionalObjectProperty;
import org.jabref.gui.util.TaskExecutor;
import org.jabref.logic.journals.JournalAbbreviationRepository;
import org.jabref.logic.l10n.Localization;
import org.jabref.logic.pdf.search.IndexingTaskManager;
import org.jabref.logic.search.SearchQuery;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.field.Field;
Expand All @@ -51,11 +52,11 @@ public CommentsTab(PreferencesService preferences,
UndoAction undoAction,
RedoAction redoAction,
DialogService dialogService,
StateManager stateManager,
ThemeManager themeManager,
IndexingTaskManager indexingTaskManager,
TaskExecutor taskExecutor,
JournalAbbreviationRepository journalAbbreviationRepository) {
JournalAbbreviationRepository journalAbbreviationRepository,
OptionalObjectProperty<SearchQuery> searchQueryProperty) {
super(
false,
databaseContext,
Expand All @@ -65,11 +66,11 @@ public CommentsTab(PreferencesService preferences,
redoAction,
dialogService,
preferences,
stateManager,
themeManager,
taskExecutor,
journalAbbreviationRepository,
indexingTaskManager
indexingTaskManager,
searchQueryProperty
);
this.defaultOwner = preferences.getOwnerPreferences().getDefaultOwner().toLowerCase(Locale.ROOT).replaceAll("[^a-z0-9]", "-");
setText(Localization.lang("Comments"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
import javafx.scene.control.Tooltip;

import org.jabref.gui.DialogService;
import org.jabref.gui.StateManager;
import org.jabref.gui.autocompleter.SuggestionProviders;
import org.jabref.gui.icon.IconTheme;
import org.jabref.gui.theme.ThemeManager;
import org.jabref.gui.undo.RedoAction;
import org.jabref.gui.undo.UndoAction;
import org.jabref.gui.util.OptionalObjectProperty;
import org.jabref.gui.util.TaskExecutor;
import org.jabref.logic.journals.JournalAbbreviationRepository;
import org.jabref.logic.l10n.Localization;
import org.jabref.logic.pdf.search.IndexingTaskManager;
import org.jabref.logic.search.SearchQuery;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.database.BibDatabaseMode;
import org.jabref.model.entry.BibEntry;
Expand All @@ -42,13 +43,13 @@ public DeprecatedFieldsTab(BibDatabaseContext databaseContext,
RedoAction redoAction,
DialogService dialogService,
PreferencesService preferences,
StateManager stateManager,
ThemeManager themeManager,
IndexingTaskManager indexingTaskManager,
BibEntryTypesManager entryTypesManager,
TaskExecutor taskExecutor,
JournalAbbreviationRepository journalAbbreviationRepository) {
super(false, databaseContext, suggestionProviders, undoManager, undoAction, redoAction, dialogService, preferences, stateManager, themeManager, taskExecutor, journalAbbreviationRepository, indexingTaskManager);
JournalAbbreviationRepository journalAbbreviationRepository,
OptionalObjectProperty<SearchQuery> searchQueryProperty) {
super(false, databaseContext, suggestionProviders, undoManager, undoAction, redoAction, dialogService, preferences, themeManager, taskExecutor, journalAbbreviationRepository, indexingTaskManager, searchQueryProperty);
this.entryTypesManager = entryTypesManager;

setText(Localization.lang("Deprecated fields"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
import javax.swing.undo.UndoManager;

import org.jabref.gui.DialogService;
import org.jabref.gui.StateManager;
import org.jabref.gui.autocompleter.SuggestionProviders;
import org.jabref.gui.theme.ThemeManager;
import org.jabref.gui.undo.RedoAction;
import org.jabref.gui.undo.UndoAction;
import org.jabref.gui.util.OptionalObjectProperty;
import org.jabref.gui.util.TaskExecutor;
import org.jabref.logic.journals.JournalAbbreviationRepository;
import org.jabref.logic.l10n.Localization;
import org.jabref.logic.pdf.search.IndexingTaskManager;
import org.jabref.logic.search.SearchQuery;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.BibEntryTypesManager;
import org.jabref.preferences.PreferencesService;
Expand All @@ -27,12 +28,12 @@ public DetailOptionalFieldsTab(BibDatabaseContext databaseContext,
RedoAction redoAction,
DialogService dialogService,
PreferencesService preferences,
StateManager stateManager,
ThemeManager themeManager,
IndexingTaskManager indexingTaskManager,
BibEntryTypesManager entryTypesManager,
TaskExecutor taskExecutor,
JournalAbbreviationRepository journalAbbreviationRepository) {
JournalAbbreviationRepository journalAbbreviationRepository,
OptionalObjectProperty<SearchQuery> searchQueryProperty) {
super(
Localization.lang("Optional fields 2"),
false,
Expand All @@ -43,12 +44,12 @@ public DetailOptionalFieldsTab(BibDatabaseContext databaseContext,
redoAction,
dialogService,
preferences,
stateManager,
themeManager,
indexingTaskManager,
entryTypesManager,
taskExecutor,
journalAbbreviationRepository
journalAbbreviationRepository,
searchQueryProperty
);
}
}
Loading

0 comments on commit 9c7c141

Please sign in to comment.