Improve TagsField of keywords#12633
Conversation
- Can now paste multiple or single keywords without pressing enter Related to JabRef#10984
- implement keyword removing and inserting through drag and drop - show different color for dragged and dropped keywords (may require admin specify another color) - run checkstyle with no error
- implement keyword removing and inserting through drag and drop - show different color for dragged and dropped keywords (may require admin specify another color) - run checkstyle with no error Related to JabRef#10984
… into feat/drag-and-drop
feat: reorder keywords by drag and drop
feat(keywordsEditor): Added paste function
feat(keywords): double click enters edit mode, new keywords are sorted alphabetically if list is sorted
Related to JabRef#10984
Related to JabRef#10984
| keywordTagsField.getEditor().setOnKeyPressed(evt -> { | ||
| KeyBindingRepository keyBindingRepository = Injector.instantiateModelOrService(KeyBindingRepository.class); | ||
|
|
||
| if (keyBindingRepository.checkKeyCombinationEquality(KeyBinding.PASTE, evt)) { |
There was a problem hiding this comment.
Please expand the abbreviation "evt"
| } else { | ||
| event.setDropCompleted(false); | ||
| } | ||
| draggedKeyword = null; |
There was a problem hiding this comment.
I would prefer using Optional<Keyword> instead of Keyword for draggedKeyword.
- expand abbreviation `evt` into `event` in line 111 - substitute `Keyword` by `Optional<Keyword>` for `draggedKeyword` Related to JabRef#10984
There was a problem hiding this comment.
Your code currently does not meet JabRef's code guidelines. We use Checkstyle to identify issues. Please carefully follow the setup guide for the codestyle. Afterwards, please run checkstyle locally and fix the issues.
In case of issues with the import order, double check that you activated Auto Import. You can trigger fixing imports by pressing Ctrl+Alt+O to trigger Optimize Imports.
Related to JabRef#10984
|
@trag-bot didn't find any issues in the code! ✅✨ |
Pull request summary
|
|
Hi, I change code according to your reviews. Contact if there's more problem. |
|
Thanks for your work! |
Changes
On paste: If it is possible to add this keyword, directly add it without requiring the user to press Enter
Double click on keyword: remove it and enter edit mode.
Reorder keywords by drag and drop
Alphabetic ordering of keywords. In case the list is already alphabetically ordered, add the new keyword in alphabetical order. Otherwise, add it to the end
Notes
This pull request is a new version of #12632 but solve checkstyle errors and branch name. The old pull request is closed and ignored.
Closes #10984
Mandatory Checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if change is visible to the user)