-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Implement Tabular UI and Backend Logic for Linked Files Pattern List Configuration #11368 #12090
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
Conversation
This commit lays the groundwork for a tabular UI to configure filename patterns for linked files. The core logic is implemented, mirroring the structure used for Citation Key Patterns. UI implementation and integration with LinkedFilesTab will be addressed in later commits.
…on UI This commit replace the old ui with tabular UI to configure filename patterns for linked files. The core logic is implemented, mirroring the structure used for Citation Key Patterns. UI implementation and integration with LinkedFilesTab will be addressed in later commits.
This commit improves the UI and makes it functional. However, core logic still needs to be implemented.
IMPORTANT TODO:
1. Update CleanupPresetPanel.java in gui/cleanup:
- Temporarily added .toString() to filePreferences.getFileNamePattern()
- Need to modify this as the new GlobalFilenamePattern object stores patterns
for different file types, not just a single pattern
2. Refactor getSuggestedFileName in logic/externalfiles/LinkedFileHandler.java:
- Current implementation expects a single file name pattern
- Need to update to work with the new GlobalFilenamePattern object
Note: These changes may affect other parts of the application that rely on
the previous file name pattern implementation. Further testing and updates
may be required.
…files-pattern-logic-#2
This commit improves the UI and makes it functional. However, core logic still needs to be implemented.
IMPORTANT TODO:
1. Update CleanupPresetPanel.java in gui/cleanup:
- Temporarily added .toString() to filePreferences.getFileNamePattern()
- Need to modify this as the new GlobalFilenamePattern object stores patterns
for different file types, not just a single pattern
2. Refactor getSuggestedFileName in logic/externalfiles/LinkedFileHandler.java:
- Current implementation expects a single file name pattern
- Need to update to work with the new GlobalFilenamePattern object
Note: These changes may affect other parts of the application that rely on
the previous file name pattern implementation. Further testing and updates
may be required.
Major change: - Refactored `createFileNameFromPattern` in `FileUtil` to generate filenames dynamically based on the `EntryType`. - Add store and load for FilePreferences **Note:** Related test cases currently encounter compile errors and require fixes.
…files-pattern-logic-#2
|
A draft pull request is recognized by having it opened as a draft, not by writing it in the title. Reduce redundancy. |
|
Hi, whats the status here? Are you still working on this project? The changes already look very promising. I would love to see this finished. Don't forget to remove the commented code in the end. This is what code versioning (git) is for. |
| @Override | ||
| public String toString() { | ||
| return "[" + entryType.getValue().getName() + "," + pattern.getValue() + "]"; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put that in a separate method - toString() is more used for debugging.
Hi, thanks for checking. Yes, I'm still working on it, but I've been tied up with finals over the past few weeks, so progress has been slower than expected. By the way, is there a specific deadline or timeline you have in mind for this issue? That would help me prioritize and plan accordingly. |
The beta release is planned for December, 24th. Would be good to have an update on December, 10th to kick-off review rounds to that this can be inclued in the release. |
Hey all, just a quick update: my Windows 11 23H2 system crashed and I’ve spent the last few days trying to troubleshoot without luck. Had to reset the whole machine this morning, but I’m still in the process of setting up all my environment again. On top of that, I’ll be flying internationally soon, so things might take a bit longer. I’ll do my best to get everything ready before the release and leave time for review, but I can’t promise it’ll all go to plan. Really sorry for the delay! (Yeah, I suspect the issue might have been caused by me forgetting to enable the VM when I was working on C. My bad, and I really really apologize for those impact this has had on the issue. Pls forgive me for the oversight.🤦♂️😔) If anyone wants to pick up work based on my progress in the meantime, feel free to jump in and let me know. |
|
If it's UI related, a Before and After screenshot would be nice. Hope you are alright? |
|
Closing this due to inactivity 💤 Please ping us if you intend to resume work on this one. |
This PR addresses the issue: Citation Key Generator and Linked Files #11368
Link: #11368
Major Changes Made:
FilenamePatternPanelto manage filename patterns in a tabular format.LinkedFilesTabto replace the original UI.Backend Logic:
String-based filename pattern storage inFilePreferenceswith a more flexible solution usingGlobalFilenamePatternandAbstractFilenameFormatPatterns.JabRefCliPreferencesto handle these patterns dynamically.FileUtil#createFileNameFromPatternto ensure it generates filenames based on the entry type.Changes in Tests:
FileUtilto reflect the changes in the filename generation logic.FileUtilandFilePreferencescurrently fail to compile or run due to method changes and require further modifications.Current Progress:
Request for Feedback:
Could you confirm if our direction is correct?
Do you have any suggestions for tests or other areas?
Also, any feedback on the structure or logic would be greatly appreciated.
Thanks a lot!!
Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)