From 9a99da192f2e045b07f302c6e6fa0a70a5b1b58f Mon Sep 17 00:00:00 2001 From: Yogeshvar Senthilkumar Date: Wed, 20 Apr 2022 20:21:43 +0930 Subject: [PATCH 1/5] Refactor Snackbar to Notifications --- src/main/java/org/jabref/gui/Base.css | 8 ++++---- .../org/jabref/gui/JabRefDialogService.java | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index b1b6894a6da..ab2f14ee269 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -1100,15 +1100,15 @@ We want to have a look that matches our icons in the tool-bar */ -fx-background-color: -jr-sidepane-background; } -.jfx-snackbar-content { +.notification-bar > .pane { -fx-background-color: -jr-gray-3; -fx-background-radius: 4px; - -fx-padding: 0ex 0ex 0ex 0ex; } -.jfx-snackbar-toast { +.notification-bar > .pane .title, .notification-bar >.pane .label { -fx-text-fill: -fx-light-text-color; - -fx-padding: -1ex -0.5ex -1ex -0.5ex; + -fx-padding: 1ex 1ex 1ex 1ex; + -fx-alignment: center; } .progress-bar > .bar { diff --git a/src/main/java/org/jabref/gui/JabRefDialogService.java b/src/main/java/org/jabref/gui/JabRefDialogService.java index 1fdb109ff8f..56ce4b4785d 100644 --- a/src/main/java/org/jabref/gui/JabRefDialogService.java +++ b/src/main/java/org/jabref/gui/JabRefDialogService.java @@ -13,6 +13,7 @@ import java.util.stream.Collectors; import javafx.concurrent.Task; +import javafx.geometry.Pos; import javafx.print.PrinterJob; import javafx.scene.Group; import javafx.scene.Node; @@ -43,10 +44,8 @@ import org.jabref.gui.util.ZipFileChooser; import org.jabref.logic.l10n.Localization; -import com.jfoenix.controls.JFXSnackbar; -import com.jfoenix.controls.JFXSnackbar.SnackbarEvent; -import com.jfoenix.controls.JFXSnackbarLayout; import com.tobiasdiez.easybind.EasyBind; +import org.controlsfx.control.Notifications; import org.controlsfx.control.TaskProgressView; import org.controlsfx.dialog.ExceptionDialog; import org.controlsfx.dialog.ProgressDialog; @@ -70,13 +69,11 @@ public class JabRefDialogService implements DialogService { private static final Logger LOGGER = LoggerFactory.getLogger(JabRefDialogService.class); private final Window mainWindow; - private final JFXSnackbar statusLine; private final ThemeManager themeManager; public JabRefDialogService(Window mainWindow, Pane mainPane, ThemeManager themeManager) { this.mainWindow = mainWindow; this.themeManager = themeManager; - this.statusLine = new JFXSnackbar(mainPane); } private FXDialog createDialog(AlertType type, String title, String content) { @@ -336,7 +333,16 @@ public Optional showBackgroundProgressDialogAndWait(String title @Override public void notify(String message) { LOGGER.info(message); - statusLine.fireEvent(new SnackbarEvent(new JFXSnackbarLayout(message), TOAST_MESSAGE_DISPLAY_TIME, null)); + Notifications thresholdNotification = Notifications.create() + .text("Too much happening.. Hang on..") + .hideAfter(TOAST_MESSAGE_DISPLAY_TIME); + Notifications.create() + .text(message) + .position(Pos.BOTTOM_CENTER) + .threshold(5, thresholdNotification) + .hideAfter(TOAST_MESSAGE_DISPLAY_TIME) + .hideCloseButton() + .show(); } @Override From d13cb8d099cd279f606d0b4cf57b68309a496f75 Mon Sep 17 00:00:00 2001 From: Yogeshvar Senthilkumar Date: Sun, 1 May 2022 14:12:31 +0930 Subject: [PATCH 2/5] Remove Threshold limit --- src/main/java/org/jabref/gui/JabRefDialogService.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/org/jabref/gui/JabRefDialogService.java b/src/main/java/org/jabref/gui/JabRefDialogService.java index b1f101239dc..7a60f229535 100644 --- a/src/main/java/org/jabref/gui/JabRefDialogService.java +++ b/src/main/java/org/jabref/gui/JabRefDialogService.java @@ -332,13 +332,10 @@ public Optional showBackgroundProgressDialogAndWait(String title @Override public void notify(String message) { LOGGER.info(message); - Notifications thresholdNotification = Notifications.create() - .text("Too much happening.. Hang on..") - .hideAfter(TOAST_MESSAGE_DISPLAY_TIME); + Notifications.create() .text(message) .position(Pos.BOTTOM_CENTER) - .threshold(5, thresholdNotification) .hideAfter(TOAST_MESSAGE_DISPLAY_TIME) .hideCloseButton() .show(); From 19eb14abcd9d90e111dd97e1b0030e0d55edeed8 Mon Sep 17 00:00:00 2001 From: Yogeshvar Senthilkumar Date: Tue, 3 May 2022 20:56:06 +0930 Subject: [PATCH 3/5] Update Changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3873391da6b..b7b16363ddf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve ## [Unreleased] ### Added - +- We added support for multiple messages in the snackbar. [#7340](https://github.com/JabRef/jabref/issues/7340) ### Changed ### Fixed From 60864cc4d2afe12988a1bcff02ff8c67f97983de Mon Sep 17 00:00:00 2001 From: Yogeshvar Senthilkumar Date: Tue, 3 May 2022 21:01:46 +0930 Subject: [PATCH 4/5] Fix style in changelog --- CHANGELOG.md | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7b16363ddf..480136a1d70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,25 +10,15 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve ## [Unreleased] ### Added + - We added support for multiple messages in the snackbar. [#7340](https://github.com/JabRef/jabref/issues/7340) + ### Changed ### Fixed ### Removed - - - - - - - - - - - - ## [5.6] - 2022-04-25 ### Added @@ -114,7 +104,6 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We fixed an issue when writing a non-UTF-8 encoded file: The header is written again. [#8417](https://github.com/JabRef/jabref/issues/8417) - We fixed an issue where folder creation during systemic literature review failed due to an illegal fetcher name. [#8552](https://github.com/JabRef/jabref/pull/8552) - ## [5.4] - 2021-12-20 ### Added @@ -246,7 +235,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - The tooltip of the search field explaining the search is always shown. [#7279](https://github.com/JabRef/jabref/pull/7279) - We rewrote the ACM fetcher to adapt to the new interface. [#5804](https://github.com/JabRef/jabref/issues/5804) - We moved the select/collapse buttons in the unlinked files dialog into a context menu. [#7383](https://github.com/JabRef/jabref/issues/7383) -- We fixed an issue where journal abbreviations containing curly braces were not recognized [#7773](https://github.com/JabRef/jabref/issues/7773) +- We fixed an issue where journal abbreviations containing curly braces were not recognized [#7773](https://github.com/JabRef/jabref/issues/7773) ### Fixed @@ -347,7 +336,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We changed the title of the window "Manage field names and content" to have the same title as the corresponding menu item [#6895](https://github.com/JabRef/jabref/pull/6895) - We renamed the menus "View -> Previous citation style" and "View -> Next citation style" into "View -> Previous preview style" and "View -> Next preview style" and renamed the "Preview" style to "Customized preview style". [#6899](https://github.com/JabRef/jabref/pull/6899) - We changed the default preference option "Search and store files relative to library file location" to on, as this seems to be a more intuitive behaviour. [#6863](https://github.com/JabRef/jabref/issues/6863) -- We changed the title of the window "Manage field names and content": to have the same title as the corresponding menu item [#6895](https://github.com/JabRef/jabref/pull/6895) +- We changed the title of the window "Manage field names and content": to have the same title as the corresponding menu item [#6895](https://github.com/JabRef/jabref/pull/6895) - We improved the detection of "short" DOIs [6880](https://github.com/JabRef/jabref/issues/6880) - We improved the duplicate detection when identifiers like DOI or arxiv are semantiaclly the same, but just syntactically differ (e.g. with or without http(s):// prefix). [#6707](https://github.com/JabRef/jabref/issues/6707) - We improved JabRef start up time [6057](https://github.com/JabRef/jabref/issues/6057) @@ -356,7 +345,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We changed the way JabRef displays the title of a tab and of the window. [4161](https://github.com/JabRef/jabref/issues/4161) - We changed connect timeouts for server requests to 30 seconds in general and 5 seconds for GROBID server (special) and improved user notifications on connection issues. [7026](https://github.com/JabRef/jabref/pull/7026) - We changed the order of the library tab context menu items. [#7171](https://github.com/JabRef/jabref/issues/7171) -- We changed the way linked files are opened on Linux to use the native openFile method, compatible with confined packages. [7037](https://github.com/JabRef/jabref/pull/7037) +- We changed the way linked files are opened on Linux to use the native openFile method, compatible with confined packages. [7037](https://github.com/JabRef/jabref/pull/7037) - We refined the entry preview to show the full names of authors and editors, to list the editor only if no author is present, have the year earlier. [#7083](https://github.com/JabRef/jabref/issues/7083) ### Fixed @@ -373,7 +362,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We fixed an issue where it was impossible to connect to OpenOffice/LibreOffice on Mac OSX. [#6970](https://github.com/JabRef/jabref/pull/6970) - We fixed an issue with the python script used by browser plugins that failed to locate JabRef if not installed in its default location. [#6963](https://github.com/JabRef/jabref/pull/6963/files) - We fixed an issue where spaces and newlines in an isbn would generate an exception. [#6456](https://github.com/JabRef/jabref/issues/6456) -- We fixed an issue where identity column header had incorrect foreground color in the Dark theme. [#6796](https://github.com/JabRef/jabref/issues/6796) +- We fixed an issue where identity column header had incorrect foreground color in the Dark theme. [#6796](https://github.com/JabRef/jabref/issues/6796) - We fixed an issue where the RIS exporter added extra blank lines.[#7007](https://github.com/JabRef/jabref/pull/7007/files) - We fixed an issue where clicking on Collapse All button in the Search for Unlinked Local Files expanded the directory structure erroneously [#6848](https://github.com/JabRef/jabref/issues/6848) - We fixed an issue, when pulling changes from shared database via shortcut caused creation of a new tech report [6867](https://github.com/JabRef/jabref/issues/6867) @@ -662,7 +651,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - Use integrated graphics card instead of discrete on macOS [#4070](https://github.com/JabRef/jabref/issues/4070) - We added a cleanup operation that detects an arXiv identifier in the note, journal or URL field and moves it to the `eprint` field. Because of this change, the last-used cleanup operations were reset. -- We changed the minimum required version of Java to 1.8.0_171, as this is the latest release for which the automatic Java update works. [#4093](https://github.com/JabRef/jabref/issues/4093) +- We changed the minimum required version of Java to 1.8.0_171, as this is the latest release for which the automatic Java update works. [#4093](https://github.com/JabRef/jabref/issues/4093) - The special fields like `Printed` and `Read status` now show gray icons when the row is hovered. - We added a button in the tab header which allows you to close the database with one click. [#494](https://github.com/JabRef/jabref/issues/494) - Sorting in the main table now takes information from cross-referenced entries into account. [#2808](https://github.com/JabRef/jabref/issues/2808) @@ -690,7 +679,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - For automatically created groups, added ability to filter groups by entry type. [#4539](https://github.com/JabRef/jabref/issues/4539) - We added the ability to add field names from the Preferences Dialog [#4546](https://github.com/JabRef/jabref/issues/4546) - We added the ability to change the column widths directly in the main -. [#4546](https://github.com/JabRef/jabref/issues/4546) + . [#4546](https://github.com/JabRef/jabref/issues/4546) - We added a description of how recommendations were chosen and better error handling to Related Articles tab - We added the ability to execute default action in dialog by using with Ctrl + Enter combination [#4496](https://github.com/JabRef/jabref/issues/4496) - We grouped and reordered the Main Menu (File, Edit, Library, Quality, Tools, and View tabs & icons). [#4666](https://github.com/JabRef/jabref/issues/4666) [#4667](https://github.com/JabRef/jabref/issues/4667) [#4668](https://github.com/JabRef/jabref/issues/4668) [#4669](https://github.com/JabRef/jabref/issues/4669) [#4670](https://github.com/JabRef/jabref/issues/4670) [#4671](https://github.com/JabRef/jabref/issues/4671) [#4672](https://github.com/JabRef/jabref/issues/4672) [#4673](https://github.com/JabRef/jabref/issues/4673) @@ -780,7 +769,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve ### Removed -- The feature to "mark entries" was removed and merged with the groups functionality. For migration, a group is created for every value of the `__markedentry` field and the entry is added to this group. +- The feature to "mark entries" was removed and merged with the groups functionality. For migration, a group is created for every value of the `__markedentry` field and the entry is added to this group. - The number column was removed. - We removed the global search feature. - We removed the coloring of cells in the main table according to whether the field is optional/required. @@ -800,7 +789,7 @@ The changelog of JabRef 4.x is available at the [v4.3.1 tag](https://github.com/ The changelog of JabRef 3.x is available at the [v3.8.2 tag](https://github.com/JabRef/jabref/blob/v3.8.2/CHANGELOG.md). The changelog of JabRef 2.11 and all previous versions is available as [text file in the v2.11.1 tag](https://github.com/JabRef/jabref/blob/v2.11.1/CHANGELOG). -[Unreleased]: https://github.com/JabRef/jabref/compare/v5.6...HEAD +[unreleased]: https://github.com/JabRef/jabref/compare/v5.6...HEAD [5.6]: https://github.com/JabRef/jabref/compare/v5.5...v5.6 [5.5]: https://github.com/JabRef/jabref/compare/v5.4...v5.5 [5.4]: https://github.com/JabRef/jabref/compare/v5.3...v5.4 From 85df4c5bb179f42720b90f24e57e8cdc2e08e6d4 Mon Sep 17 00:00:00 2001 From: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com> Date: Tue, 3 May 2022 17:07:06 +0200 Subject: [PATCH 5/5] Revert some changes in Changelog.md --- CHANGELOG.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 480136a1d70..417ca1b12ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,17 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve ### Removed + + + + + + + + + + + ## [5.6] - 2022-04-25 ### Added @@ -678,8 +689,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We optimized the code responsible for connecting to an external database, which should lead to huge improvements in performance. - For automatically created groups, added ability to filter groups by entry type. [#4539](https://github.com/JabRef/jabref/issues/4539) - We added the ability to add field names from the Preferences Dialog [#4546](https://github.com/JabRef/jabref/issues/4546) -- We added the ability to change the column widths directly in the main - . [#4546](https://github.com/JabRef/jabref/issues/4546) +- We added the ability to change the column widths directly in the main table. [#4546](https://github.com/JabRef/jabref/issues/4546) - We added a description of how recommendations were chosen and better error handling to Related Articles tab - We added the ability to execute default action in dialog by using with Ctrl + Enter combination [#4496](https://github.com/JabRef/jabref/issues/4496) - We grouped and reordered the Main Menu (File, Edit, Library, Quality, Tools, and View tabs & icons). [#4666](https://github.com/JabRef/jabref/issues/4666) [#4667](https://github.com/JabRef/jabref/issues/4667) [#4668](https://github.com/JabRef/jabref/issues/4668) [#4669](https://github.com/JabRef/jabref/issues/4669) [#4670](https://github.com/JabRef/jabref/issues/4670) [#4671](https://github.com/JabRef/jabref/issues/4671) [#4672](https://github.com/JabRef/jabref/issues/4672) [#4673](https://github.com/JabRef/jabref/issues/4673) @@ -789,7 +799,7 @@ The changelog of JabRef 4.x is available at the [v4.3.1 tag](https://github.com/ The changelog of JabRef 3.x is available at the [v3.8.2 tag](https://github.com/JabRef/jabref/blob/v3.8.2/CHANGELOG.md). The changelog of JabRef 2.11 and all previous versions is available as [text file in the v2.11.1 tag](https://github.com/JabRef/jabref/blob/v2.11.1/CHANGELOG). -[unreleased]: https://github.com/JabRef/jabref/compare/v5.6...HEAD +[Unreleased]: https://github.com/JabRef/jabref/compare/v5.6...HEAD [5.6]: https://github.com/JabRef/jabref/compare/v5.5...v5.6 [5.5]: https://github.com/JabRef/jabref/compare/v5.4...v5.5 [5.4]: https://github.com/JabRef/jabref/compare/v5.3...v5.4