Skip to content

Cover images download: New toggle button in quick settings#15322

Merged
calixtus merged 5 commits into
JabRef:mainfrom
jonas-ee:quick-settings-cover-images-download-toggle
Mar 12, 2026
Merged

Cover images download: New toggle button in quick settings#15322
calixtus merged 5 commits into
JabRef:mainfrom
jonas-ee:quick-settings-cover-images-download-toggle

Conversation

@jonas-ee

@jonas-ee jonas-ee commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Related issues and pull requests

Closes a private issue of @koppor

PR Description

This is the result of a mob programming session at Javaland. The setting to download cover images should be show as a toggle button on the initial tab. This is done to make users aware of this opt-in feature.

image

Steps to test

To test this you need to start the application and check if there is a new toggle button on the tab that opens when you open the application. The same setting can also be accessed via the settings menu and changing that settings should also change the new toggle button and vice versa. You could also check if the document preview shows the cover images but this would require a document to generate a preview for and might be out of scope for this issue.

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • [/] I added JUnit tests for changes (if applicable)
  • I added screenshots in the PR description (if change is visible to the user)
  • [/] I added a screenshot in the PR description showing a library with a single entry with me as author and as title the issue number
  • I described the change in CHANGELOG.md in a way that can be understood by the average user (if change is visible to the user)
  • I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

@github-actions

Copy link
Copy Markdown
Contributor

Hey @jonas-ee! 👋

Thank you for contributing to JabRef!

We have automated checks in place, based on which you will soon get feedback if any of them are failing. We also use Qodo for review assistance. It will update your pull request description with a review help and offer suggestions to improve the pull request.

After all automated checks pass, a maintainer will also review your contribution. Once that happens, you can go through their comments in the "Files changed" tab and act on them, or reply to the conversation if you have further inputs. You can read about the whole pull request process in our contribution guide.

Please ensure that your pull request is in line with our AI Usage Policy and make necessary disclosures.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Add cover images download toggle to quick settings

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Added toggle button for cover images download in quick settings
• Binds toggle to existing preview preferences property
• Added localization string for new toggle button
• Updated changelog with feature description
Diagram
flowchart LR
  QS["Quick Settings UI"] -->|adds| CIT["Cover Images Toggle"]
  CIT -->|binds to| PP["Preview Preferences"]
  L10N["Localization"] -->|provides label| CIT
  CHANGELOG["CHANGELOG.md"] -->|documents| QS
Loading

Grey Divider

File Changes

1. jabgui/src/main/java/org/jabref/gui/welcome/components/QuickSettings.java ✨ Enhancement +6/-0

Add cover images download toggle to UI

• Created new ToggleSwitch for cover images download feature
• Bound toggle to preferences.getPreviewPreferences().shouldDownloadCoversProperty()
• Added toggle to VBox layout alongside HTTP server toggle
• Applied consistent styling with max width and padding

jabgui/src/main/java/org/jabref/gui/welcome/components/QuickSettings.java


2. CHANGELOG.md 📝 Documentation +1/-0

Document cover images toggle feature

• Added entry documenting new quick settings toggle for cover images download

CHANGELOG.md


3. jablib/src/main/resources/l10n/JabRef_en.properties Localization +1/-0

Add localization for cover images toggle

• Added English localization string for cover images download toggle label

jablib/src/main/resources/l10n/JabRef_en.properties


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (2) 📎 Requirement gaps (0)

Grey Divider


Remediation recommended

1. Duplicate cover download label 📘 Rule violation ✓ Correctness
Description
A new localization string Enable cover images download is introduced even though a very similar
existing string Download cover images already exists, increasing translation duplication and
inconsistency risk. Reusing the existing key/string would better align with localization reuse
expectations.
Code

jabgui/src/main/java/org/jabref/gui/welcome/components/QuickSettings.java[68]

+        ToggleSwitch coverImagesDownloadToggle = new ToggleSwitch(Localization.lang("Enable cover images download"));
Evidence
PR Compliance ID 25 requires reusing and grouping localization strings rather than introducing
near-duplicates. The PR adds and uses a new string (Enable cover images download) while an
existing string (Download cover images) is already present in the localization bundle, indicating
a near-duplicate.

AGENTS.md
jabgui/src/main/java/org/jabref/gui/welcome/components/QuickSettings.java[68-68]
jablib/src/main/resources/l10n/JabRef_en.properties[3477-3478]
jablib/src/main/resources/l10n/JabRef_en.properties[1578-1578]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A new user-facing localization string (`Enable cover images download`) was added even though a very similar existing string (`Download cover images`) already exists. This creates translation duplication and can lead to inconsistent UI wording across screens.
## Issue Context
The UI toggle label in `QuickSettings` uses `Localization.lang("Enable cover images download")`, and a new entry was added to `JabRef_en.properties`. There is already an existing localization entry `Download cover images` in the same properties file.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/welcome/components/QuickSettings.java[68-71]
- jablib/src/main/resources/l10n/JabRef_en.properties[3477-3479]
- jablib/src/main/resources/l10n/JabRef_en.properties[1576-1580]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Changelog entry lacks issue link📘 Rule violation ✓ Correctness
Description
The new CHANGELOG.md entry omits the issue/PR reference and uses awkward phrasing (`quick
setting, cover images download`) compared to surrounding entries. This reduces professionalism and
traceability of user-facing release notes.
Code

CHANGELOG.md[18]

+- We added a quick setting toggle to enable cover images download
Evidence
PR Compliance ID 37 requires user-facing text to be professional and precise and to include required
issue references when applicable. The added changelog line is user-facing, lacks the common issue
reference pattern used by neighboring entries, and contains imprecise phrasing.

CHANGELOG.md[16-18]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The added `CHANGELOG.md` entry is missing an issue/PR reference and the wording is imprecise (`quick setting`, `cover images download`).
## Issue Context
Other entries in the same section include issue references (e.g., `[#15134]`, `[#13821]`). This entry should match that convention and be proofread.
## Fix Focus Areas
- CHANGELOG.md[16-19]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@jonas-ee jonas-ee changed the title Added new toggle button for cover images download in quick settings Cover images download: New toggle button in quick settings Mar 11, 2026
@koppor

koppor commented Mar 11, 2026

Copy link
Copy Markdown
Member

This was part of the #javaland session by @Maran23.

https://meine.doag.org/events/javaland/2026/agenda/#agendaId.7512

@koppor

koppor commented Mar 11, 2026

Copy link
Copy Markdown
Member

@jonas-ee: It should be possible to do ./gradlew :jabgui:run from the command line (or go to the respective IntelliJ task)

@testlens-app

This comment has been minimized.

@Maran23

Maran23 commented Mar 11, 2026

Copy link
Copy Markdown
Collaborator

Thanks to both of you, @jonas-ee and @koppor! You even added it to the changelog, nice! I will do a retest tomorrow evening, when home. @koppor need to decide if this should belong to this changelog section and if the button text is fine (We used nearly the same text as in the options).

@jonas-ee

jonas-ee commented Mar 11, 2026

Copy link
Copy Markdown
Contributor Author

@jonas-ee: It should be possible to do ./gradlew :jabgui:run from the command line (or go to the respective IntelliJ task)

It worked now. I think Intellij just need some time to set up everything. I successfully retested changing the setting manually. I did not test the actual preview cause I have not figured out how to create a library that would load an image yet. Also added a screenshot.

@jonas-ee

jonas-ee commented Mar 11, 2026

Copy link
Copy Markdown
Contributor Author

Code Review by Qodo

Concerning the Code Review by Qodo:

  1. I could reuse the existing key but it should probably read "Enable ..." on the quick settings for consistency and I am not sure if I should change the existing translation because there are a lot of languages.
  2. I didn't link the issue because it's private. I could open an issue but it might be easier to copy from the private one.

@testlens-app

This comment has been minimized.

@koppor

koppor commented Mar 11, 2026

Copy link
Copy Markdown
Member

I didn't link the issue because it's private

The PR is linked in this case 😅

@testlens-app

testlens-app Bot commented Mar 11, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 9055d1e
▶️ Tests: 10126 executed
⚪️ Checks: 62/62 completed


Learn more about TestLens at testlens.app.

@jonas-ee

Copy link
Copy Markdown
Contributor Author

I didn't link the issue because it's private

The PR is linked in this case 😅

I see. Done.

@calixtus calixtus added this pull request to the merge queue Mar 12, 2026
@github-actions github-actions Bot added the status: to-be-merged PRs which are accepted and should go into the merge-queue. label Mar 12, 2026
Merged via the queue into JabRef:main with commit 2fa7182 Mar 12, 2026
61 of 62 checks passed
@koppor

koppor commented Mar 13, 2026

Copy link
Copy Markdown
Member

Publicity posts:

@jonas-ee: I didn't find you on LinkedIn and Mastodon. Please comment so that I can link you (if you want ^^)

All in all: Thank you for taking part - and the follow-ups in this PR!

@jonas-ee

jonas-ee commented Mar 14, 2026

Copy link
Copy Markdown
Contributor Author

Publicity posts:

@jonas-ee: I didn't find you on LinkedIn and Mastodon. Please comment so that I can link you (if you want ^^)

All in all: Thank you for taking part - and the follow-ups in this PR!

https://www.linkedin.com/in/jonas-haarz-036694153/
https://mastodon.social/@jonas_ee
Also added them to my github profile

AnvitaPrasad pushed a commit to AnvitaPrasad/jabref that referenced this pull request Mar 18, 2026
)

* Added new toggle button for cover images download in quick settings

* CHANGELOG.md

* PR added to CHANGELOG.md

---------

Co-authored-by: jonas-ee <>
FynnianB pushed a commit to FynnianB/jabref that referenced this pull request Mar 19, 2026
)

* Added new toggle button for cover images download in quick settings

* CHANGELOG.md

* PR added to CHANGELOG.md

---------

Co-authored-by: jonas-ee <>
FynnianB pushed a commit to FynnianB/jabref that referenced this pull request Mar 19, 2026
)

* Added new toggle button for cover images download in quick settings

* CHANGELOG.md

* PR added to CHANGELOG.md

---------

Co-authored-by: jonas-ee <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first contrib status: no-bot-comments status: to-be-merged PRs which are accepted and should go into the merge-queue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants