-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Enable editing typo with double clicking on field name in custom entry type #9977
Merged
Merged
Changes from 5 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b7b6b49
Merge pull request #1 from JabRef/main
DinjerChang ab673dc
frontend custom entry type edit feature
DinjerChang fc6c245
new function setName() in UnkownField.java added so we could update t…
DinjerChang ed7373c
CHANGELOG.MD added
DinjerChang 8a2daa0
checkstyle fixed, better varible name modified in CustomEntryTypesTab…
DinjerChang d653fc5
dialog with notify functionality and use equalsIgnoreCase when compar…
DinjerChang 2be4ccb
add Localization.lang("key") to JabRed_en.properties
DinjerChang b6cd9b7
Capitalizing first letter when displaying on coulumn after edit
DinjerChang e7d288c
fix when user input the original field name or doesnt edit anything a…
DinjerChang 6d4e751
Merge branch 'main' into fix-for-issue-9840
DinjerChang 574cd4e
fix wrong placement of predicate: !newFieldValue.equals(field.getDisp…
DinjerChang 45681d9
Merge branch 'fix-for-issue-9840' of https://github.com/DinjerChang/j…
DinjerChang 66bc727
Merge branch 'main' into fix-for-issue-9840
koppor ee41ca9
Update CHANGELOG.md
calixtus d19f84f
Fix localization
koppor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Modern software seldom makes use of popups. I would use the
notifiy
functionality. The user has no choice. Moreover, the current code keeps the old casing. Thus, instead ofnewFieldValue
, the existing one should be output. As a consequence, the code offieldExists
needs to be modified accordingly.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.
The reason I use
newFieldValue
instead of the existing one is to see if the user input value (newFieldValue
) exist in the current fields. Let's say we already have two new Field, Name and Test. When a user try to edit Name to Test, he would double click the Name Field and type "Test", so "Test" is the newFieldValue. So I think we have to see what user input is and compare it with the existing Field. In this case, Test already exist, so we will notify the user.If we choose the existing one by using the method
field.getDisplayName()
, the value would be Name since we haven't modify the field yet. In this case, we always get thefieldExists
value to be TrueAlso, I'm replacing
equals
withequlsIgnoreCase
to handle the casing comparison problem.Let's say a user edit Name to name, it should be and will be seen as duplicate field.
Let me know if I understand statement correctly and if I'm on the right track :)
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.
Sorry that I was not clear in my terms. Thank you for explaining a scenario. I hope, this short explanation based on your scenario helps:
I was trying to say: User renames to TEST, but Test exists. I assume the user knows, he input TEST, but forgot about the existing field Test. Therefore, Test should be displayed and not TEST.