Skip to content
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
06ec2cb
Add "Add Group" walkthrough, tweak quick settings, and tweak welcome tab
Yubo-Cao Aug 8, 2025
adcb443
Refactor search modifier buttons to bind bidirectionally with SearchP…
Yubo-Cao Aug 9, 2025
bcb08af
Fix issue with repeated localization
Yubo-Cao Aug 10, 2025
66248ae
Add donation popup in WelcomeTab
Yubo-Cao Aug 10, 2025
235b815
Add search walkthrough and responsive layout for WelcomeTab
Yubo-Cao Aug 10, 2025
54b5a03
Additional fix to responsive layout
Yubo-Cao Aug 10, 2025
25eb89f
Fix walkthrough color
Yubo-Cao Aug 10, 2025
7aa6c28
Update CHANGELOG.md
Yubo-Cao Aug 10, 2025
4e8633a
Small tweaaks to Walkthroughs
Yubo-Cao Aug 10, 2025
8396fd0
Add search walkthrough and responsive layout for WelcomeTab
Yubo-Cao Aug 10, 2025
e7c27fc
Additional fix to responsive layout
Yubo-Cao Aug 10, 2025
f2ff8be
Fix walkthrough color
Yubo-Cao Aug 10, 2025
0820579
Update CHANGELOG.md
Yubo-Cao Aug 10, 2025
7df9b4a
Small tweaaks to Walkthroughs
Yubo-Cao Aug 10, 2025
df6862d
merge: branch 'more-walkthroughes' of https://github.com/Yubo-Cao/jab…
Yubo-Cao Aug 12, 2025
82b8f24
test(donation): Add test to DonationProvider and refactored the displ…
Yubo-Cao Aug 12, 2025
c835d10
fix(donation): Applied all the suggested changes
Yubo-Cao Aug 13, 2025
a84fc33
test(donation): Apply open rewrite
Yubo-Cao Aug 15, 2025
bacb5e8
merge: remote-tracking branch 'upstream/main' into more-walkthroughes
Yubo-Cao Aug 15, 2025
28d6c3b
test(donation): Use appropriate mock parameters for testing
Yubo-Cao Aug 16, 2025
dc249d2
fix(donation): Fix imports in GuiPreferences
Yubo-Cao Aug 16, 2025
174f62d
style: Remove extra newlines at end of new walkthroughs and donations
Yubo-Cao Aug 16, 2025
b12af73
merge: remote-tracking branch 'upstream/main' into more-walkthroughes
Yubo-Cao Aug 21, 2025
b55db22
fix: update according to Subhramit and Carl's suggestion
Yubo-Cao Aug 21, 2025
f8f48af
fix: fix the GlobalSearchBarTest
Yubo-Cao Aug 22, 2025
a3346f9
Merge branch 'main' into more-walkthroughes
Yubo-Cao Aug 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We changed the validation error dialog for overriding the default file directories to a confirmation dialog for saving other preferences under the library properties. [#13488](https://github.com/JabRef/jabref/pull/13488)
- We improved file exists warning dialog with clearer options and tooltips [#12565](https://github.com/JabRef/jabref/issues/12565)
- We introduced walkthrough functionality [#12664](https://github.com/JabRef/jabref/issues/12664)
- The Welcome tab now has a responsive layout. [#12664](https://github.com/JabRef/jabref/issues/12664)
- We introduced a donation prompt in the Welcome tab. [#12664](https://github.com/JabRef/jabref/issues/12664)

### Fixed

Expand Down
8 changes: 6 additions & 2 deletions jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.jabref.gui.search.SearchType;
import org.jabref.gui.sidepane.SidePane;
import org.jabref.gui.sidepane.SidePaneType;
import org.jabref.gui.theme.ThemeManager;
import org.jabref.gui.undo.CountingUndoManager;
import org.jabref.gui.undo.RedoAction;
import org.jabref.gui.undo.UndoAction;
Expand Down Expand Up @@ -447,7 +448,8 @@ private void initBindings() {
}

private void updateTabBarVisible() {
if (preferences.getWorkspacePreferences().shouldHideTabBar() && stateManager.getOpenDatabases().size() <= 1) {
// When WelcomeTab is open, the tabbar should be visible
if (preferences.getWorkspacePreferences().shouldHideTabBar() && tabbedPane.getTabs().size() <= 1) {
if (!tabbedPane.getStyleClass().contains("hide-tab-bar")) {
tabbedPane.getStyleClass().add("hide-tab-bar");
}
Expand Down Expand Up @@ -507,7 +509,9 @@ public void showWelcomeTab() {
clipBoardManager,
taskExecutor,
fileHistory,
Injector.instantiateModelOrService(BuildInfo.class)
Injector.instantiateModelOrService(BuildInfo.class),
preferences.getWorkspacePreferences(),
Injector.instantiateModelOrService(ThemeManager.class)
);
tabbedPane.getTabs().add(welcomeTab);
tabbedPane.getSelectionModel().select(welcomeTab);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package org.jabref.gui.preferences;

import javafx.beans.property.BooleanProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleIntegerProperty;

public class DonationPreferences {
private final BooleanProperty neverShowAgain = new SimpleBooleanProperty();
private final IntegerProperty lastShownEpochDay = new SimpleIntegerProperty();

public DonationPreferences(boolean neverShowAgain, int lastShownEpochDay) {
this.neverShowAgain.set(neverShowAgain);
this.lastShownEpochDay.set(lastShownEpochDay);
}

public boolean isNeverShowAgain() {
return neverShowAgain.get();
}

public void setNeverShowAgain(boolean value) {
this.neverShowAgain.set(value);
}

public BooleanProperty neverShowAgainProperty() {
return neverShowAgain;
}

public int getLastShownEpochDay() {
return lastShownEpochDay.get();
}

public void setLastShownEpochDay(int value) {
this.lastShownEpochDay.set(value);
}

public IntegerProperty lastShownEpochDayProperty() {
return lastShownEpochDay;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ public interface GuiPreferences extends CliPreferences {
KeyBindingRepository getKeyBindingRepository();

NewEntryPreferences getNewEntryPreferences();

DonationPreferences getDonationPreferences();
}
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ public class JabRefGuiPreferences extends JabRefCliPreferences implements GuiPre
private static final String INCLUDE_CROSS_REFERENCES = "includeCrossReferences";
private static final String ASK_FOR_INCLUDING_CROSS_REFERENCES = "askForIncludingCrossReferences";

// region Donation preferences
private static final String DONATION_NEVER_SHOW = "donationNeverShow";
private static final String DONATION_LAST_SHOWN_EPOCH_DAY = "donationLastShownEpochDay";
// endregion

// region NewEntryPreferences
private static final String CREATE_ENTRY_APPROACH = "latestApproach";
private static final String CREATE_ENTRY_EXPAND_RECOMMENDED = "typesRecommendedExpanded";
Expand Down Expand Up @@ -236,6 +241,7 @@ public class JabRefGuiPreferences extends JabRefCliPreferences implements GuiPre
private KeyBindingRepository keyBindingRepository;
private CopyToPreferences copyToPreferences;
private NewEntryPreferences newEntryPreferences;
private DonationPreferences donationPreferences;

private JabRefGuiPreferences() {
super();
Expand Down Expand Up @@ -378,6 +384,11 @@ private JabRefGuiPreferences() {
defaults.put(ASK_FOR_INCLUDING_CROSS_REFERENCES, Boolean.TRUE);
defaults.put(INCLUDE_CROSS_REFERENCES, Boolean.FALSE);

// region donation defaults
defaults.put(DONATION_NEVER_SHOW, Boolean.FALSE);
defaults.put(DONATION_LAST_SHOWN_EPOCH_DAY, -1);
// endregion

// region NewEntryUnifierPreferences
defaults.put(CREATE_ENTRY_APPROACH, List.of(NewEntryDialogTab.values()).indexOf(NewEntryDialogTab.CHOOSE_ENTRY_TYPE));
defaults.put(CREATE_ENTRY_EXPAND_RECOMMENDED, true);
Expand Down Expand Up @@ -1192,6 +1203,17 @@ public NewEntryPreferences getNewEntryPreferences() {
return newEntryPreferences;
}

public DonationPreferences getDonationPreferences() {
if (donationPreferences != null) {
return donationPreferences;
}

donationPreferences = new DonationPreferences(getBoolean(DONATION_NEVER_SHOW), getInt(DONATION_LAST_SHOWN_EPOCH_DAY));
EasyBind.listen(donationPreferences.neverShowAgainProperty(), (_, _, newValue) -> putBoolean(DONATION_NEVER_SHOW, newValue));
EasyBind.listen(donationPreferences.lastShownEpochDayProperty(), (_, _, newValue) -> putInt(DONATION_LAST_SHOWN_EPOCH_DAY, newValue.intValue()));
return donationPreferences;
}

/**
* In GUI mode, we can lookup the directory better
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public class GeneralTab extends AbstractPreferenceTabView<GeneralTabViewModel> i
@FXML private CheckBox confirmDelete;
@FXML private CheckBox shouldAskForIncludingCrossReferences;
@FXML private CheckBox confirmHideTabBar;
@FXML private CheckBox donationNeverShow;
@FXML private ComboBox<BibDatabaseMode> biblatexMode;
@FXML private CheckBox alwaysReformatBib;
@FXML private CheckBox autosaveLocalLibraries;
Expand Down Expand Up @@ -125,6 +126,7 @@ public void initialize() {
confirmDelete.selectedProperty().bindBidirectional(viewModel.confirmDeleteProperty());
shouldAskForIncludingCrossReferences.selectedProperty().bindBidirectional(viewModel.shouldAskForIncludingCrossReferences());
confirmHideTabBar.selectedProperty().bindBidirectional(viewModel.confirmHideTabBarProperty());
donationNeverShow.selectedProperty().bindBidirectional(viewModel.donationNeverShowProperty());

new ViewModelListCellFactory<BibDatabaseMode>()
.withText(BibDatabaseMode::getFormattedName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public class GeneralTabViewModel implements PreferenceTabViewModel {
private final BooleanProperty confirmDeleteProperty = new SimpleBooleanProperty();
private final BooleanProperty shouldAskForIncludingCrossReferencesProperty = new SimpleBooleanProperty();
private final BooleanProperty hideTabBarProperty = new SimpleBooleanProperty();
private final BooleanProperty donationNeverShowProperty = new SimpleBooleanProperty();

private final ListProperty<BibDatabaseMode> bibliographyModeListProperty = new SimpleListProperty<>();
private final ObjectProperty<BibDatabaseMode> selectedBiblatexModeProperty = new SimpleObjectProperty<>();
Expand Down Expand Up @@ -210,6 +211,7 @@ public void setValues() {
confirmDeleteProperty.setValue(workspacePreferences.shouldConfirmDelete());
shouldAskForIncludingCrossReferencesProperty.setValue(preferences.getCopyToPreferences().getShouldAskForIncludingCrossReferences());
hideTabBarProperty.setValue(workspacePreferences.shouldHideTabBar());
donationNeverShowProperty.setValue(preferences.getDonationPreferences().isNeverShowAgain());

bibliographyModeListProperty.setValue(FXCollections.observableArrayList(BibDatabaseMode.values()));
selectedBiblatexModeProperty.setValue(libraryPreferences.getDefaultBibDatabaseMode());
Expand Down Expand Up @@ -256,6 +258,7 @@ public void storeSettings() {
workspacePreferences.setConfirmDelete(confirmDeleteProperty.getValue());
preferences.getCopyToPreferences().setShouldAskForIncludingCrossReferences(shouldAskForIncludingCrossReferencesProperty.getValue());
workspacePreferences.setHideTabBar(confirmHideTabBarProperty().getValue());
preferences.getDonationPreferences().setNeverShowAgain(donationNeverShowProperty.getValue());

libraryPreferences.setDefaultBibDatabaseMode(selectedBiblatexModeProperty.getValue());

Expand Down Expand Up @@ -423,6 +426,10 @@ public BooleanProperty confirmHideTabBarProperty() {
return this.hideTabBarProperty;
}

public BooleanProperty donationNeverShowProperty() {
return this.donationNeverShowProperty;
}

public ListProperty<BibDatabaseMode> biblatexModeListProperty() {
return this.bibliographyModeListProperty;
}
Expand Down
28 changes: 20 additions & 8 deletions jabgui/src/main/java/org/jabref/gui/search/GlobalSearchBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,14 @@ private void initSearchModifierButtons() {
regexButton.setSelected(searchPreferences.isRegularExpression());
regexButton.setTooltip(new Tooltip(Localization.lang("Regular expression") + "\n" + Localization.lang("This only affects unfielded terms. For using RegEx in a fielded term, use =~ operator.")));
initSearchModifierButton(regexButton);
regexButton.setOnAction(event -> {
searchPreferences.getObservableSearchFlags().addListener((SetChangeListener<SearchFlags>) change -> {
if (change.wasAdded() && change.getElementAdded() == SearchFlags.REGULAR_EXPRESSION) {
regexButton.setSelected(true);
} else if (change.wasRemoved() && change.getElementRemoved() == SearchFlags.REGULAR_EXPRESSION) {
regexButton.setSelected(false);
}
});
regexButton.setOnAction(_ -> {
searchPreferences.setSearchFlag(SearchFlags.REGULAR_EXPRESSION, regexButton.isSelected());
searchField.requestFocus();
updateSearchQuery();
Expand All @@ -287,24 +294,29 @@ private void initSearchModifierButtons() {
caseSensitiveButton.setSelected(searchPreferences.isCaseSensitive());
caseSensitiveButton.setTooltip(new Tooltip(Localization.lang("Case sensitive") + "\n" + Localization.lang("This only affects unfielded terms. For using case-sensitive in a fielded term, use =! operator.")));
initSearchModifierButton(caseSensitiveButton);
caseSensitiveButton.setOnAction(event -> {
searchPreferences.getObservableSearchFlags().addListener((SetChangeListener<SearchFlags>) change -> {
if (change.wasAdded() && change.getElementAdded() == SearchFlags.CASE_SENSITIVE) {
caseSensitiveButton.setSelected(true);
} else if (change.wasRemoved() && change.getElementRemoved() == SearchFlags.CASE_SENSITIVE) {
caseSensitiveButton.setSelected(false);
}
});
caseSensitiveButton.setOnAction(_ -> {
searchPreferences.setSearchFlag(SearchFlags.CASE_SENSITIVE, caseSensitiveButton.isSelected());
searchField.requestFocus();
updateSearchQuery();
});

keepSearchString.setSelected(searchPreferences.shouldKeepSearchString());
keepSearchString.selectedProperty().bindBidirectional(searchPreferences.keepSearchStringProperty());
keepSearchString.setTooltip(new Tooltip(Localization.lang("Keep search string across libraries")));
initSearchModifierButton(keepSearchString);
keepSearchString.selectedProperty().addListener((obs, oldVal, newVal) -> {
searchPreferences.setKeepSearchString(newVal);
searchField.requestFocus();
});
keepSearchString.selectedProperty().addListener((_, _, _) -> searchField.requestFocus());

filterModeButton.setSelected(searchPreferences.getSearchDisplayMode() == SearchDisplayMode.FILTER);
filterModeButton.setTooltip(new Tooltip(Localization.lang("Filter search results")));
initSearchModifierButton(filterModeButton);
filterModeButton.setOnAction(event -> {
searchPreferences.searchDisplayModeProperty().addListener((_, _, newVal) -> filterModeButton.setSelected(newVal == SearchDisplayMode.FILTER));
filterModeButton.setOnAction(_ -> {
searchPreferences.setSearchDisplayMode(filterModeButton.isSelected() ? SearchDisplayMode.FILTER : SearchDisplayMode.FLOAT);
searchField.requestFocus();
});
Expand Down
8 changes: 8 additions & 0 deletions jabgui/src/main/java/org/jabref/gui/util/URLs.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ public class URLs {
public static final String GROBID_DOC = "https://docs.jabref.org/collect/newentryfromplaintext#grobid";
public static final String ENTRY_TABLE_COLUMNS_DOC = "https://docs.jabref.org/advanced/main-window";

// Walkthroughs URLs
public static final String GROUPS_DOC = "https://docs.jabref.org/finding-sorting-and-cleaning-entries/groups";
public static final String SEARCH_WITH_IN_LIBRARY_DOC = "https://docs.jabref.org/finding-sorting-and-cleaning-entries/search";
public static final String MANAGE_ASSOCIATED_FILES_DOC = "https://docs.jabref.org/finding-sorting-and-cleaning-entries/filelinks";
public static final String LINK_EXTERNAL_FILE_WALKTHROUGH_EXAMPLE_PDF = "https://nutritionandmetabolism.biomedcentral.com/counter/pdf/10.1186/1743-7075-3-2.pdf";
public static final String ADD_PDF_DOC = "https://docs.jabref.org/collect/add-pdfs-to-an-entry";
public static final String FIND_UNLINKED_FILES_DOC = "https://docs.jabref.org/collect/findunlinkedfiles";

// AboutDialogViewModel URLs
public static final String HOMEPAGE_URL = "https://www.jabref.org";
public static final String DONATION_URL = "https://donations.jabref.org";
Expand Down
Loading
Loading