-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: Issue add right click option to delete custom bst style #14525
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
base: main
Are you sure you want to change the base?
feat: Issue add right click option to delete custom bst style #14525
Conversation
| dialogService.showFileOpenDialog(fileDialogConfiguration).ifPresent(bstFile -> viewModel.addBstStyle(bstFile)); | ||
| } | ||
|
|
||
| @SuppressWarnings("unused") |
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.
Why this? This is too global?!
|
|
||
| ## [Unreleased] | ||
|
|
||
| - We added a right-click "Delete" option for custom BST styles in the Entry Preview settings, allowing users to easily remove imported styles. [#14352](https://github.com/JabRef/jabref/issues/14352) |
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.
Why not following keep-a-changelog format?
| availableListView.selectionModelProperty().getValue().selectedItemProperty().addListener((observable, oldValue, newValue) -> | ||
| availableListView.selectionModelProperty().getValue().selectedItemProperty().addListener((_observable, _oldValue, newValue) -> |
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.
???????????????
| } | ||
|
|
||
| public void removeBstStyle(PreviewLayout layout) { | ||
| if (!(layout instanceof BstPreviewLayout bstLayout)) { |
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.
no assignment to variable needed.
Why isn't the method parameter dirctly BstPreviewLayout?
| public void addBstStyle(Path bstFile) { | ||
| BstPreviewLayout bstPreviewLayout = new BstPreviewLayout(bstFile); | ||
| bstStylesPaths.add(bstFile); | ||
| manuallyAddedBstPaths.add(bstFile); // Mark as manually added |
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.
The comment states the obvious. Talk about the WHY
| }) | ||
| .executeWith(taskExecutor); | ||
| bstStylesPaths.clear(); | ||
| manuallyAddedBstPaths.clear(); // Reset the set of manually added files |
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.
The comment states the obvious. Talk about the WHY
| setPreviewLayout(chosenSelectionModelProperty.getValue().getSelectedItem()); | ||
| } | ||
|
|
||
| @SuppressWarnings("SameParameterValue") |
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.
????
Closes #14352
Adds the functionality to delete manually added BST files from the Customization dialog. When a user right-clicks on a manually imported BST file used for entry preview, a "Delete" option now appears in the context menu, allowing easy removal.
Steps to test
Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)