Skip to content

Add confirmation for 'Copy to' with cross-reference status#12493

Merged
Siedlerchr merged 4 commits into
JabRef:mainfrom
MhammedAhmmed:fix-12486
Feb 15, 2025
Merged

Add confirmation for 'Copy to' with cross-reference status#12493
Siedlerchr merged 4 commits into
JabRef:mainfrom
MhammedAhmmed:fix-12486

Conversation

@MhammedAhmmed

@MhammedAhmmed MhammedAhmmed commented Feb 12, 2025

Copy link
Copy Markdown
Contributor

fixes #12486

Add confirmation message after using "Copy to" option, also show whether the cross-reference entry was copied or not.

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.

Copy to with cross-reference included
bandicam 2025-02-12 15-19-03-300 - frame at 0m18s
Copy to with cross-reference excluded
bandicam 2025-02-12 15-19-03-300 - frame at 0m8s

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

JUnit tests are failing. In the area "Some checks were not successful", locate "Tests / Unit tests (pull_request)" and click on "Details". This brings you to the test output.

You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.


if (includeCrossReferences) {
copyEntriesWithCrossRef(selectedEntries, targetDatabaseContext);
dialogService.notify(Localization.lang("Entry copied successfully, including cross-reference."));

@subhramit subhramit Feb 12, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please change to "entries" and "references".
(Tip - Here is how I, as a newcomer, would gather context - selectedEntries above is a list, and the name is plural as well. The function name also hints at the same. So it cannot be a single entry. I would go one level further and ctrl + click on the function to see what it's doing).

dialogService.notify(Localization.lang("Entry copied successfully, including cross-reference."));
} else {
copyEntriesWithoutCrossRef(selectedEntries, targetDatabaseContext);
dialogService.notify(Localization.lang("Entry copied successfully, no cross-reference included."));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same as above

Comment thread src/main/resources/l10n/JabRef_en.properties Outdated
Comment on lines +2836 to +2837
Entry\ copied\ successfully,\ including\ cross-reference.=Entry copied successfully, including cross-reference.
Entry\ copied\ successfully,\ no\ cross-reference\ included.=Entry copied successfully, no cross-reference included.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Change accordingly. Also, change the second line to "...without cross-references."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback! I will make sure to read functions carefully next time..

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

JUnit tests are failing. In the area "Some checks were not successful", locate "Tests / Unit tests (pull_request)" and click on "Details". This brings you to the test output.

You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.

Siedlerchr
Siedlerchr previously approved these changes Feb 15, 2025
@Siedlerchr Siedlerchr added this pull request to the merge queue Feb 15, 2025
Merged via the queue into JabRef:main with commit 4ca6a74 Feb 15, 2025
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.

Improve UX for "Copy to" option with success dialog

3 participants