Merging Entry Creation Buttons Into a Single Tool#13020
Conversation
This commit merges several tools used to create new entries (`NewEntry`, `EntryType`, `CreateEntryFromId`, and `PlainCitationParser`) into a single tool, `NewEntryUnified`. `NewEntryUnified` has a separate tab for each of its component creation methods. The last-used tab, and the values of non-text-entry fields, are preserved between runs of the tool and sessions of JabRef. The new tool reinstates the ComboBox option for which parser should be used to parse plaintext citations, and adds a new option to create entries from a block of Bib(La)TeX entry sources. Additionally: * The Quick-Create New Empty Entry tool still remains, and is linked to create new empty entries of the most-recently used `EntryType` selected in the new tool (when creating an empty entry of a specific type with the new tool). * The keyboard shortcut `Ctrl + Shift + N`, which previously opened the `PlainCitationParser` tool, now opens the new tool with the 'parse plaintext citation' tab pre-opened.
…uture improvements.
… given that there is no "non-unified" new entry tool.
|
Hi, without looking into the code: can you do something about the optics of the first tab too? |
|
Sorry for the run-around guys, new to Java/Javafx/FXML and I appreciate all the help. This was a great tip, with the larger window width as well it looks pretty good. The down-and-to-the-side-a-bit thing was because, with the smaller panel, the identifier type ComboBox would start overlapping with the radio button label. Less likely to be a problem now that the panel defaults to being wider though. |
| NEW_ENTRY_IMMEDIATE(Localization.lang("Add entry"), IconTheme.JabRefIcons.ADD_ARTICLE), | ||
| NEW_ENTRY(Localization.lang("Create new entry..."), IconTheme.JabRefIcons.ADD_ENTRY, KeyBinding.NEW_ENTRY), |
There was a problem hiding this comment.
Still "Add" and "Create" for a similar thing. Did I overlook an reply on that? - Only "Add" should be used, no "Create"
There was a problem hiding this comment.
"New" (variable name), "Add" (Icon name), "Create" label --> use one... I propose to use "Add"
There was a problem hiding this comment.
I've gone with "CREATE_ENTRY*" for variable names, but I think having the distinction between "adding" an entry (without a dialog or any options) and "creating" an entry (with a dialog where you have to make choices).
Plus I feel like it would be a bit confusing for users to see the menu options Add entry (ctrl + N) and Add entry... right next to each other in the menu.
How set are you on using "add"?
| NEW_ENTRY(Localization.lang("New entry"), IconTheme.JabRefIcons.ADD_ENTRY, KeyBinding.NEW_ENTRY), | ||
| NEW_ARTICLE(Localization.lang("New article"), IconTheme.JabRefIcons.ADD_ARTICLE), | ||
| NEW_ENTRY_FROM_PLAIN_TEXT(Localization.lang("New entry from plain text"), IconTheme.JabRefIcons.NEW_ENTRY_FROM_PLAIN_TEXT), | ||
| NEW_ENTRY_IMMEDIATE(Localization.lang("Add entry"), IconTheme.JabRefIcons.ADD_ARTICLE), |
There was a problem hiding this comment.
I think, the last chosen type is used - then the icon should be renamed from ADD_ARTICLE to ADD_ENTRY_IMMEDIATE (to be conistent with action name)
There was a problem hiding this comment.
I've made some changes, see #13020 (comment). Are you happy with this?
…nd enum values (all related to the 'NewEntry' tool).
koppor
left a comment
There was a problem hiding this comment.
jabgui/src/main/java/org/jabref/gui/actions/StandardActions.java
still contains "Add" - Add entry - not sure why this was not changed. -- If you liked "Add" more than "Crreate", then, please, *everywhere only one term for the same thing!
| CREATE_ENTRY_IMMEDIATE(Localization.lang("Add entry"), IconTheme.JabRefIcons.CREATE_ENTRY_IMMEDIATE), | ||
| CREATE_ENTRY(Localization.lang("Create new entry..."), IconTheme.JabRefIcons.CREATE_ENTRY, KeyBinding.CREATE_ENTRY), |
There was a problem hiding this comment.
"Create" and "Add" both used. Please use only "Create" (with the hope that native speakers are fine with this)
There was a problem hiding this comment.
#13020 (comment)
"Create entry" and "Create new entry..." being right next to each other in the same menu seems like it's going to be confusing to users, are you sure I can't convince you to let them be named differently?
The menu items seem different enough ('immediately creates an entry with an automatic type' vs 'opens a dialog for you to specify entry information') that more unique names seems preferable.
There was a problem hiding this comment.
We had an internal developer discussion:
- "Add entry"
- "Add entry using..."
And rename variables accordingly - should be easy with IntelliJ refactoring feature.
For the first one, we neglected "Add default entry" and "Add entry using defaults" (too long)
We think, we don't need an architectural decision record.
Sorry for the extra effort -- but naming is hard in computer science: https://martinfowler.com/bliki/TwoHardThings.html
koppor
left a comment
There was a problem hiding this comment.
Update from the developers: We go ahead as is - and might change strings and variable names in a follow-up. Thank you for your efforts for this PR! This brings JabRef forward.
|
Oh cool, no worries. Thanks for all of your time. |
* upstream/main: Fix directory path validation checks (#13029) Keep merge=union for JabRef_en.properties Merging Entry Creation Buttons Into a Single Tool (#13020) refine-jabsrv (#13044) Switch if branches for readbility (#13042) Updating the gradle wrapper does not need any JDK (#13037) Fix path - and fix typo (#13038)
Closes #8808.
This job merges several tools used to create new entries (
NewEntry,EntryType,CreateEntryFromId, andPlainCitationParser) into a single tool.The new tool has a separate tab for each of its component creation methods. The last-used tab, and the values of non-text-entry fields, are preserved between runs of the tool and sessions of JabRef.
The new tool reinstates the ComboBox option for which parser should be used to parse plaintext citations, and adds a new option to create entries from a block of Bib(La)TeX entry sources.
Additionally:
EntryTypeselected in the new tool (when creating an empty entry of a specific type with the new tool).Ctrl + Shift + N, which previously opened thePlainCitationParsertool, now opens the new tool with the 'parse plaintext citation' tab pre-opened.Ctrl + Alt + Shift + Nopens the new tool with the 'enter source identifier' tab pre-opened.Screenshots:





Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if change is visible to the user)