Skip to content
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

Added "Add example entry" and "Import existing PDFs" when a library is empty #12741

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

sanjyot242
Copy link

@sanjyot242 sanjyot242 commented Mar 14, 2025

  • Added "Add example entry" and "Import existing PDFs" when a library is empty
  • Add listeners to track database and table entry changes to show buttons only when database is empty

Snip1
snip2
snip3
snip4-filter
snip5-open library properties
snip5-warning directory not configured
snip6 directory exists

Closes #12662

Mandatory checks

  • I own the copyright of the code submitted and I licence 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 (for UI changes)
  • 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.

-Ensures button is hidden when entries exist but are filtered
-Add listeners to track database and table entry changes
@koppor koppor mentioned this pull request Mar 14, 2025
7 tasks
@koppor koppor mentioned this pull request Mar 16, 2025
6 tasks
-used localization
-added styles for button
…e-12662

# Conflicts:
#	src/main/java/org/jabref/gui/maintable/MainTable.java
-checks if directory exists
-triggers search for unlinked files ( if directory exists )
-Shows notification and open library properties ( if directory doesn't exist)
Comment on lines +610 to +611
// check if file directories is not empty
List<Path> fileDirectories = database.getFileDirectories(filePreferences);
Copy link

Choose a reason for hiding this comment

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

The comment is trivial and simply restates what the code does without providing additional information about the reasoning or higher-level context.

Comment on lines +614 to +615
dialogService.showWarningDialogAndWait(
Localization.lang("File directory is not set or does not exist!"),
Copy link

Choose a reason for hiding this comment

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

The warning message ends with an exclamation mark, which should be avoided in UI messages as per guidelines. Should end with a period instead.

Copy link
Author

Choose a reason for hiding this comment

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

Used Key which was already defined in properties , Should i update ?

@sanjyot242 sanjyot242 changed the title Add placeholder with "Add Example Entry" for empty library Added "Add example entry" and "Import existing PDFs" when a library is empty Mar 18, 2025
Copy link

trag-bot bot commented Mar 18, 2025

@trag-bot didn't find any issues in the code! ✅✨

@sanjyot242 sanjyot242 marked this pull request as ready for review March 18, 2025 06:54
Comment on lines +610 to +611
// check if file directories is not empty
List<Path> fileDirectories = database.getFileDirectories(filePreferences);
Copy link

Choose a reason for hiding this comment

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

Comment is trivial and simply restates what the code does. It should be removed as it doesn't provide additional information about the implementation.

Copy link
Member

@koppor koppor Mar 18, 2025

Choose a reason for hiding this comment

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

The comment in the Java code is wrong

Copy link
Author

Choose a reason for hiding this comment

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

Will fix it .

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.

Empty library should offer two actions
2 participants