-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Added a setting to show File annotations' tab only when the PDF actually contains highlights or comments #13279
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
Conversation
… show the file annotation tab when annotations are not present in the entry files.
@@ -161,6 +164,18 @@ public void setShouldShowLatexCitationsTab(boolean shouldShowLatexCitationsTab) | |||
this.shouldShowLatexCitationsTab.set(shouldShowLatexCitationsTab); | |||
} | |||
|
|||
public boolean shouldShowFileAnnotationsTab() { |
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 method should return an Optional instead of a primitive boolean to avoid returning null and adhere to modern Java practices.
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.
is that really necessary?I don't think it could ever return a null value
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.
Take the comments with a grain of salt. In this case the bot is wrong
public FileAnnotationTab(StateManager stateManager, | ||
GuiPreferences preferences) { |
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 constructor should not allow null values for 'stateManager' and 'preferences'. Consider using JSpecify @nonnull annotations to enforce non-null parameters.
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.
is that really necessary?
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
Closes #13143
added a checkbox as described in the issue to not show the file annotation tab when annotations are not present in the entry files.
Steps to test
Screen.Recording.2025-06-08.at.18.25.17.mov
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if change is visible to the user)