Skip to content

Fix issue 12889 #12892

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

Closed
wants to merge 5 commits into from
Closed

Fix issue 12889 #12892

wants to merge 5 commits into from

Conversation

madanhk18
Copy link
Contributor

Closes #12889

changes :

I made enhancements to the Entry Editor, specifically in the General section. Now, when a field (such as a URL) contains an HTTP/HTTPS link and the user double-clicks on it, the link is automatically takes it to dowload PDF through browser. This improves the workflow for users who often deal with direct document links by making it easier and faster to download referenced PDFs.

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.

return downloadAutomatically.get();
}

public void setDownloadAutomatically(boolean shouldDownload) {
Copy link

Choose a reason for hiding this comment

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

Boolean method parameters should be avoided in public methods. It's better to create distinct methods for different actions to improve code readability and maintainability.

CHANGELOG.md Outdated
Comment on lines 3 to 5
### Added

- We added automatic PDF downloads for arXiv entries when the "Download referenced files" option is enabled in Web Search preferences [#12889](https://github.com/JabRef/jabref/issues/12889)
Copy link
Member

Choose a reason for hiding this comment

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

Why did you add your own "Added" section when it already exists? Please see the structure and adjust.

CHANGELOG.md Outdated
@@ -64,6 +68,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv

### Fixed

- We fixed an issue where warning signs were improperly positioned next to text fields containing capital letters. [#12884](https://github.com/JabRef/jabref/issues/12884)
Copy link
Member

Choose a reason for hiding this comment

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

Artifact from another PR (probably upstream/main is not synced with your local branch. Please take the latest pull).

Comment on lines 27 to 32
/**
* Creates a new IconValidationDecorator with default position CENTER_LEFT.
* This position is chosen to better align with text content regardless of case.
*/
public IconValidationDecorator() {
this(Pos.BOTTOM_LEFT);
this(Pos.CENTER_LEFT);
Copy link
Member

Choose a reason for hiding this comment

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

Why?
Changes from another PR. Please sync.

Comment on lines -162 to -163
} catch (NoSuchFileException e) {
LOGGER.error("Could not find file: {}", styleFile, e);
Copy link
Member

Choose a reason for hiding this comment

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

What if both internal and external files cannot be loaded? Why was this removed?

@jabref-machine
Copy link
Collaborator

Your code currently does not meet JabRef's code guidelines. We use Checkstyle to identify issues. You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page. To see the test output, locate "Tests / Checkstyle (pull_request)" and click on it.

In case of issues with the import order, double check that you activated Auto Import. You can trigger fixing imports by pressing Ctrl+Alt+O to trigger Optimize Imports.

Please carefully follow the setup guide for the codestyle. Afterwards, please run checkstyle locally and fix the issues, commit, and push.

@@ -150,6 +149,18 @@ public static Optional<CitationStyle> createCitationStyleFromFile(final String s
return Optional.empty();
}

// First try to load as external file
Path externalPath = Path.of(styleFile);
Copy link
Member

Choose a reason for hiding this comment

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

wtf this has nothing do with files

@Siedlerchr Siedlerchr marked this pull request as draft April 7, 2025 20:01
@madanhk18 madanhk18 closed this Apr 8, 2025
@madanhk18 madanhk18 deleted the fix-issue-12889 branch April 8, 2025 05:12
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.

Download an article should also download the PDF
4 participants