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

Refine "File exists" warning #12565

Open
koppor opened this issue Feb 24, 2025 · 9 comments · May be fixed by #12625
Open

Refine "File exists" warning #12565

koppor opened this issue Feb 24, 2025 · 9 comments · May be fixed by #12625
Assignees
Labels
📍 Assigned Assigned by assign-issue-action (or manually assigned) component: entry-editor component: ui good first issue An issue intended for project-newcomers. Varies in difficulty.

Comments

@koppor
Copy link
Member

koppor commented Feb 24, 2025

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)

@elwi7331
Copy link

/assign-me

@github-actions github-actions bot added the 📍 Assigned Assigned by assign-issue-action (or manually assigned) label Feb 25, 2025
Copy link
Contributor

👋 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.

@mabeysekera
Copy link

  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?

@Oscar2343 Oscar2343 linked a pull request Mar 5, 2025 that will close this issue
7 tasks
@subhramit
Copy link
Member

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

@elwi7331
Copy link

elwi7331 commented Mar 5, 2025

@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.

@Oscar2343
Copy link

/assign-me

Copy link
Contributor

github-actions bot commented Mar 7, 2025

👋 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.

@eslamnumber
Copy link

/assign-me

@koppor
Copy link
Member Author

koppor commented Mar 12, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📍 Assigned Assigned by assign-issue-action (or manually assigned) component: entry-editor component: ui good first issue An issue intended for project-newcomers. Varies in difficulty.
Projects
Status: Assigned
Development

Successfully merging a pull request may close this issue.

6 participants