Skip to content

Conversation

@ZodGaz
Copy link
Contributor

@ZodGaz ZodGaz commented Jun 8, 2025

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

  • I own the copyright of the code submitted and I license it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (if change is visible to the user)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

ZodGaz added 2 commits June 8, 2025 18:39
… show the file annotation tab when annotations are not present in the entry files.
this.shouldShowLatexCitationsTab.set(shouldShowLatexCitationsTab);
}

public boolean shouldShowFileAnnotationsTab() {
Copy link

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.

Copy link
Contributor Author

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

Copy link
Member

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

Comment on lines +29 to +30
public FileAnnotationTab(StateManager stateManager,
GuiPreferences preferences) {
Copy link

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that really necessary?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no

@Siedlerchr Siedlerchr added this pull request to the merge queue Jun 11, 2025
Merged via the queue into JabRef:main with commit c68cb5f Jun 11, 2025
1 check passed
Siedlerchr added a commit to FlyJoanne/jabref that referenced this pull request Jun 15, 2025
* upstream/main:
  New Crowdin updates (JabRef#13330)
  Add arm 64 linux runner (JabRef#13258)
  Rename strings and variables in New Entry (JabRef#13312)
  Let consistency checker yield a return code (JabRef#13329)
  Update LETTER fragment to resolve Windows parsing issue (JabRef#13327)
  Add support for "dev: no-bot-comments"
  Update dependency org.hibernate.validator:hibernate-validator to v9.0.1.Final (JabRef#13322)
  Endnote XML Exporter: Move factory initialization to constructor (JabRef#13321)
  Refine assignment reminder (JabRef#13315)
  Add welcome message to first time contributors (JabRef#13314)
  New Crowdin updates (JabRef#13311)
  Added a setting to show File annotations' tab only when the PDF actually contains highlights or comments (JabRef#13279)
  Update dependency org.postgresql:postgresql to v42.7.7 (JabRef#13306)
  Refine PULL_REQUEST_TEMPLATE.md (JabRef#13304)
  Move module tweaking of merged module to launcher (JabRef#13303)
  Speed up gradle update (JabRef#13300)
  testImplementation is enough (JabRef#13299)
ZodGaz added a commit to ZodGaz/jabref that referenced this pull request Jun 16, 2025
…rewrote shouldShow in FileAnnotationTab as requested in JabRef#13279
@ZodGaz ZodGaz deleted the fix-issue-13143 branch June 16, 2025 15:36
github-merge-queue bot pushed a commit that referenced this pull request Jun 17, 2025
…rewrote shouldShow in FileAnnotationTab as requested in #13279 (#13338)
github-merge-queue bot pushed a commit that referenced this pull request Jun 17, 2025
…rewrote shouldShow in FileAnnotationTab as requested in #13279 (#13338)
Siedlerchr added a commit that referenced this pull request Jun 17, 2025
* upstream/main:
  Refactor "enableFileAnnotationsTab" to "smartFileAnnotationsTab" and rewrote shouldShow in FileAnnotationTab as requested in #13279 (#13338)
  fix workflow (#13366)
Siedlerchr added a commit to MiguelCBar/jabref that referenced this pull request Jun 18, 2025
* upstream/main: (47 commits)
  Adapt some fetcher tests (JabRef#13370)
  change template issue number (JabRef#13367)
  Refine error message in URLUtil::create (JabRef#13337)
  fix deletion again (JabRef#13369)
  Only prevent failure in publishing from stopping the workflow (JabRef#13368)
  Refactor "enableFileAnnotationsTab" to "smartFileAnnotationsTab" and rewrote shouldShow in FileAnnotationTab as requested in JabRef#13279 (JabRef#13338)
  fix workflow (JabRef#13366)
  Fixamd64linux (JabRef#13365)
  Only delete for arm64 (JabRef#13364)
  New Crowdin updates (JabRef#13363)
  Bump org.junit.jupiter:junit-jupiter-api in /versions (JabRef#13362)
  Bump org.apache.logging.log4j:log4j-to-slf4j in /versions (JabRef#13359)
  Bump com.github.javaparser:javaparser-symbol-solver-core in /versions (JabRef#13361)
  Bump org.junit.platform:junit-platform-launcher in /versions (JabRef#13360)
  Bump com.fasterxml.jackson.datatype:jackson-datatype-jsr310 in /versions (JabRef#13358)
  Gradle build updates (JabRef#13319)
  Add "Disable GitHub actions" (JabRef#13356)
  Make jabref host executable on mac and on linux and fix import command line argument (JabRef#13355)
  Delete .github/workflows/merge-upstream.yml (JabRef#13357)
  chore(deps): update dependency org.apache.logging.log4j:log4j-to-slf4j to v2.25.0 (JabRef#13353)
  ...
Siedlerchr added a commit to ganesh-vk/jabref that referenced this pull request Jun 18, 2025
* upstream/main: (54 commits)
  Move publishing to maven central to a separate workflow (JabRef#13372)
  Add more guards to workflows not running on forked JabRef repos
  Copy real HTML from entry preview (JabRef#13339)
  Adapt some fetcher tests (JabRef#13370)
  change template issue number (JabRef#13367)
  Refine error message in URLUtil::create (JabRef#13337)
  fix deletion again (JabRef#13369)
  Only prevent failure in publishing from stopping the workflow (JabRef#13368)
  Refactor "enableFileAnnotationsTab" to "smartFileAnnotationsTab" and rewrote shouldShow in FileAnnotationTab as requested in JabRef#13279 (JabRef#13338)
  fix workflow (JabRef#13366)
  Fixamd64linux (JabRef#13365)
  Only delete for arm64 (JabRef#13364)
  New Crowdin updates (JabRef#13363)
  Bump org.junit.jupiter:junit-jupiter-api in /versions (JabRef#13362)
  Bump org.apache.logging.log4j:log4j-to-slf4j in /versions (JabRef#13359)
  Bump com.github.javaparser:javaparser-symbol-solver-core in /versions (JabRef#13361)
  Bump org.junit.platform:junit-platform-launcher in /versions (JabRef#13360)
  Bump com.fasterxml.jackson.datatype:jackson-datatype-jsr310 in /versions (JabRef#13358)
  Gradle build updates (JabRef#13319)
  Add "Disable GitHub actions" (JabRef#13356)
  ...
ZodGaz added a commit to ZodGaz/jabref that referenced this pull request Jun 20, 2025
…rewrote shouldShow in FileAnnotationTab as requested in JabRef#13279
github-merge-queue bot pushed a commit that referenced this pull request Jun 23, 2025
* Refactor "enableFileAnnotationsTab" to "smartFileAnnotationsTab" and rewrote shouldShow in FileAnnotationTab as requested in #13279

* Fixes #13241,
forcing a search refresh only when the fulltext flag is on, removing and re-adding the flag from the query when the database is switched.

* CHANGELOG update

* comment indent fix, added Javadoc style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show/hide 'File annotations' tab

3 participants