jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Refine "File exists" warning

Open koppor opened this issue 10 months ago • 23 comments

The current "error" dialog for renaming a file to an existing file is not good.

Improvements:

  1. Allow "Keep both" -> JabRef adds (1), (2), ... at the file name.
    • Use org.jabref.logic.util.io.FileNameUniqueness#getNonOverWritingFileName for this
    • Hover on the button "Keep both": Shows tool tip "New filename {}", with {} replaced by a filename not existing yet. Example: "Bogner (1).pdf" if "Bogner.pdf" would be generated and exist.
  2. Add button "Provide alternative file name", which triggers the functionality "Rename file to a given name" from the context menu having the proposed name in the text box
  3. Change title from "File exists" to "Target file already exists"
  4. The content of the message box is strange for a long file name. Content: "Target file name {}"
  5. Content of message box should not be editable.

Current behavior:

  1. Open pdfContentImporterTest-pdfs.bib (contained in src\test\resources\pdfs\PdfContentImporter)
  2. Remove "Tucker2007" entry, but "Keep file(s)"
  3. Select "Bogner2023RESTAPI"
  4. In the Windows Explorer, select Tucker2007.pdf. Drag it onto "Bogner2023 RESTAPI" in the main table
  5. In the "General" tab in the entry editor at the field "File", there are now two entries
  6. Select the second one
  7. Context menu (right click)
  8. Select "Rename file to defined pattern"

Image

Image

(Internal discussion: We could have an "Advanced hint" explaining all options in the dialog box, but we think this is not necessary to understand the actions taken by JabRef)

koppor avatar Feb 24 '25 20:02 koppor

/assign-me

elwi7331 avatar Feb 25 '25 12:02 elwi7331

👋 Hey @elwi7331, thank you for your interest in this issue! 🎉

We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! 🚀

⏳ Please note, you will be automatically unassigned if the issue isn't closed within 45 days (by 11 April 2025). A maintainer can also add the "📌 Pinned"" label to prevent automatic unassignment.

github-actions[bot] avatar Feb 25 '25 12:02 github-actions[bot]

  1. Add button "Provide alternative file name", which triggers the functionality "Rename file to a given name" from the context menu having the proposed name in the text box

For this improvement, what does the "proposed name" refer to? Should it be user input or the same as suggested in "Keep files", eg "Bogner2023(1).pdf"?

This is the current functionality:

  1. We click the button "provide alternative file name"
Image
  1. The rename file window opens up and the user can write the new file name in the text box and save it.
Image

Is this correct, or should something be modified regarding the specific improvement?

mabeysekera avatar Mar 03 '25 14:03 mabeysekera

@elwi7331 @mabeysekera @Oscar2343 are you guys part of the same team?

subhramit avatar Mar 05 '25 17:03 subhramit

@elwi7331 @mabeysekera @Oscar2343 are you guys part of the same team?

Yes, we are 5 members of a team attending a course at KTH, also including @tsukii7 and @adammeh.

elwi7331 avatar Mar 05 '25 20:03 elwi7331

/assign-me

Oscar2343 avatar Mar 07 '25 12:03 Oscar2343

👋 Hey @Oscar2343, this issue is already assigned to @elwi7331.

[!NOTE] ⏳ If the issue isn't closed within ** days**, it will be automatically unassigned. A maintainer can also add you to the list of assignees or swap you with the current assignee.

github-actions[bot] avatar Mar 07 '25 12:03 github-actions[bot]

/assign-me

eslamnumber avatar Mar 08 '25 23:03 eslamnumber

@eslamnumber You are assigned to another issue, thus I do not assign you again.

koppor avatar Mar 12 '25 00:03 koppor

Solution posted https://github.com/elwi7331/jabref/pull/12 is a good start - JabRef_en.properties neds to be adapted as well. Please use two \n\n to allow for a better visual separation.

Please file a PR to this repository and not to your private fork.

koppor avatar Mar 12 '25 22:03 koppor

You can file several PRs to fix sub issues. -- Just use refs #12565. The final PR can use close #12565.

koppor avatar Mar 12 '25 22:03 koppor

/assign-me

1akshaym12 avatar Mar 22 '25 06:03 1akshaym12

⚠️ Issue Already Assigned

Hi @1akshaym12, this issue is currently assigned to @elwi7331.

[!NOTE] If no progress is made within ** days**, the issue will be automatically unassigned.

Options for contributors
  • Wait for availability: The issue may become available if auto-unassigned
  • Collaborate: You can ask @elwi7331 if they want help
  • Maintainer assistance: A maintainer can add you as co-assignee if appropriate

github-actions[bot] avatar Mar 22 '25 06:03 github-actions[bot]

/assign-me

aoife-mulvennna avatar Apr 20 '25 10:04 aoife-mulvennna

👋 Hey @aoife-mulvennna, thank you for your interest in this issue! 🎉

We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! 🚀

github-actions[bot] avatar Apr 20 '25 10:04 github-actions[bot]

Hey, I'm actually not sure where to find the option to "Remove" for this step: "Remove "Tucker2007" entry, but "Keep file(s)"". Is anyone able to help? Is there detailed information on what the application does somewhere in the repo? I cant find it. Thanks :)

aoife-mulvennna avatar Apr 20 '25 20:04 aoife-mulvennna

Is anyone able to help? Is there detailed information on what the application does somewhere in the repo? I cant find it. Thanks :)

For an introduction, you can watch this talk. You can check out the user documentation for specific end-user guidance. We are trying to have a welcome walkthrough for JabRef soon.

subhramit avatar Apr 21 '25 00:04 subhramit

Hey, I'm actually not sure where to find the option to "Remove" for this step: "Remove "Tucker2007" entry, but "Keep file(s)"".

~I don't have too much context on this, someone else can help better, but general advice would be to use Intellij search (Ctrl+Shift+F) effectively.~ Edit - I realzied you were asking about locating the option in JabRef application, not code. Oliver has answered below.

subhramit avatar Apr 21 '25 00:04 subhramit

Remove "Tucker2007" entry, but "Keep file(s)"

Use your eyes to find the respective line in the main table.

Click in it

Open context menu.

Select "Delete entry".

(I am guessing; on the mobile; maybe it helps)

koppor avatar Apr 21 '25 07:04 koppor

⏰ Assignment Reminder

Hi @aoife-mulvennna, this is a friendly reminder about your assignment to this issue.

[!WARNING] This issue will be automatically unassigned in 11 days if there's no activity.

How to keep your assignment


If you are working on it, you can prevent automatic unassignment by:

  • Submitting a draft PR with your progress
  • Asking for the 📌 Pinned label if you need more time

We appreciate your contribution and are here to help if needed!

github-actions[bot] avatar May 05 '25 12:05 github-actions[bot]

📋 Assignment Update

Hi @aoife-mulvennna, due to inactivity, you have been unassigned from this issue.

Next steps


If you still want to work on this:

  • Submit a pull request showing your current state. You will be automatically assigned again.
  • Ask a maintainer to assign you again.

github-actions[bot] avatar May 27 '25 12:05 github-actions[bot]

/assign-me

Sara-S-Dev avatar Jun 11 '25 17:06 Sara-S-Dev

👋 Hey @Sara-S-Dev, thank you for your interest in this issue! 🎉

We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

For questions on JabRef functionality and the code base, you can consult the JabRef Guru or ask on our Gitter chat.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! 🚀

github-actions[bot] avatar Jun 11 '25 17:06 github-actions[bot]

⏰ Assignment Reminder

Hi @Sara-S-Dev, this is a friendly reminder about your assignment to this issue.

[!WARNING] This issue will be automatically unassigned in 11 days if there's no activity.

Remember that you can ask the JabRef Guru or DeepWiki about anything regarding JabRef. Additionally, our contributing guide has hints on creating a pull request and a link to our Gitter chat.

How to keep your assignment


If you are working on it, you can prevent automatic unassignment by:

  • Submitting a draft pull request with your progress within 11 days
  • Asking for the 📌 Pinned label if you need more time

We appreciate your contribution and are here to help if needed!

github-actions[bot] avatar Jun 21 '25 12:06 github-actions[bot]

We think that this issue was fixed. Please head to https://builds.jabref.org/main to download a development build and try it out.

For any feedback, add a comment to the pull request at https://github.com/JabRef/jabref/pull/13491.

github-actions[bot] avatar Jul 14 '25 18:07 github-actions[bot]