-
-
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
Redesign "Manage field names & content" dialog #8892
Conversation
Like the idea! I am just missing the option for renaming the field here? e.g. Regarding the Design: |
I think I misunderstood the rename button responsibility after reading the code comment below. But, since empty fields aren't stored then it makes perfect sense. So if I understand this correctly then renaming 'Move value' to 'Rename field' should solve it? jabref/src/main/java/org/jabref/gui/edit/MassSetFieldsDialog.java Lines 102 to 111 in 082e9cf
Thank you; this looks way better than having 2 dialogs or putting everything in one. However, I had a look at 'Library properties' and it has no action buttons on the body. The only action button is 'Apply.'. Maybe we can update the dialog's buttons on tab switch? |
I think we need to just distinguish the semantics here, although it's technically the same process:
Both are actually the same technically. Maybe just another button Rename Fields |
- If user choose 'Save' from the dialog then changes are added to the UndoManager and thus can be reverted by clicking undo from the global bar - Else if user choose 'Cancel' then changes will be gone and cannot be reverted
I created two action buttons: 'Keep Modifications' and 'Revert'. Clicking 'Keep Modifications' will save the modifications to |
…omatic-field-editor
This PR has already grown larger than I expected. Some of the requirements, such as validating entered field values against selected field using |
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.
Lgtm in general, just some suggestion
src/main/java/org/jabref/gui/edit/automaticfiededitor/AutomaticFieldEditorAction.java
Outdated
Show resolved
Hide resolved
Thanks! Great addition to JabRef! |
Hey, just tried this. Overall I like it! I think I already found a bug though T.T How to reproduce:
Result:
Expected:
|
@ThiloteE Nice catch! I kind of expected it to be buggy at this stage. I'll be making another follow up PR to address this issue and other issues that may come up. I will also include test cases to help catch bugs faster. |
* upstream/main: (27 commits) Add gitpod config (#8921) Fix javafx version not displayed in About Dialog (#8918) Redesign "Manage field names & content" dialog (#8892) Rework IACR fetcher (#8904) Bump h2-mvstore from 2.1.212 to 2.1.214 in /buildSrc (#8915) Bump unoloader from 7.3.3 to 7.3.4 (#8912) Bump libreoffice from 7.3.3 to 7.3.4 (#8913) Bump tika-core from 2.4.0 to 2.4.1 (#8914) Bump org.eclipse.jgit from 6.1.0.202203080745-r to 6.2.0.202206071550-r (#8916) Squashed 'buildres/csl/csl-styles/' changes from e740261..845dee0 (#8903) Bump flowless from 0.6.9 to 0.6.10 (#8898) Bump postgresql from 42.3.5 to 42.4.0 (#8900) Bump mockito-core from 4.6.0 to 4.6.1 (#8899) Bump antlr-runtime from 3.5.2 to 3.5.3 (#8897) Update to MADR 3.0.0-beta.2 (#8896) Increase the network connection timeout and improve error message (#8894) Fix linux terminal opening process error (#8891) Fix exception if linked file has masked umlauts / invalid characters in path (#8851) Remove obsolte CHANGELOG.md entry Revert "Fix right clicking a group and choosing "remove selected entries from this group" leads to error when Bibtex source tab is selected (#8821)" ... # Conflicts: # build.gradle
* upstream/main: Try to make reproducible builds (JabRef#8925) Link to new board (and refine text) Pass the data as a string (JabRef#8923) Add IntelliJ plugins to Gitpod configuration Add gradle support Fix extension name Remove obsolete closing bracket Add gitpod config (JabRef#8921) Fix javafx version not displayed in About Dialog (JabRef#8918) Redesign "Manage field names & content" dialog (JabRef#8892) Rework IACR fetcher (JabRef#8904) Bump h2-mvstore from 2.1.212 to 2.1.214 in /buildSrc (JabRef#8915) Bump unoloader from 7.3.3 to 7.3.4 (JabRef#8912) Bump libreoffice from 7.3.3 to 7.3.4 (JabRef#8913) Bump tika-core from 2.4.0 to 2.4.1 (JabRef#8914) Bump org.eclipse.jgit from 6.1.0.202203080745-r to 6.2.0.202206071550-r (JabRef#8916)
* upstream/main: Fix for Dark theme not readable (JabRef#8929) Find Unlinked files should ignore Thumbs.db, etc (JabRef#8800) Try to make reproducible builds (JabRef#8925) Link to new board (and refine text) Pass the data as a string (JabRef#8923) Add IntelliJ plugins to Gitpod configuration Add gradle support Fix extension name Remove obsolete closing bracket Add gitpod config (JabRef#8921) Fix javafx version not displayed in About Dialog (JabRef#8918) Redesign "Manage field names & content" dialog (JabRef#8892)
Fixes #6536
Question: Looking at other dialogs in JabRef, I noticed a pattern where actions are always at the bottom of the dialog, but I can't seem to reformulate UI logic to follow that pattern. I think one solution could be to divide the UI across 2 dialogs. One for 'Edit field value of selected references' and another for 'Copy or move the value of one field to another'. What are your thoughts on this?
Automatic Field Editor
Overview
This PR aims to update the appearance & logic of the 'Manage field names & content' dialog. Although the problem seems trivial to solve, I had to make many decisions during the design phase, hence why I included user stories and acceptance criteria's.
User Stories
📗 Summary
As a user of JabRef
I want to clear one field in a collection of bib entries automatically
📗 Summary
As a user of JabRef
I want to change the value of one field in a collection of bib entries automatically
📋 Acceptance Criteria
Background
Given 'Manage field names & content' dialog is shown
Acceptance Criteria 1
When user enter an illegal value for the given field
Then show an error message
Acceptance Criteria 2
When user enter a legal value to be set for the specified field
And user clicks 'set field'
And 'Overwrite existing field values' checkbox is NOT selected
Then set the entered value to entries with the specified field empty
Acceptance Criteria 3
When user enter a legal value to be set for the specified field
And user clicks 'set field'
And 'Overwrite existing field values' checkbox is selected
Then set the entered value to all entries even if the specified field is not empty
📗 Summary
As a user of JabRef
I want to copy the value of one field to another field in a collection of bib entries automatically
📋 Acceptance Criteria
Background
Given 'Manage field names & content' dialog is shown
Acceptance Criteria 1
When the source and destination fields are not compatible (they don't hold the same type of data)
Then show an error message
Acceptance Criteria 2
When user attempt to copy the values of source field to destination field
And 'Overwrite Non empty field' is NOT selected
Then only update the destination field if it's empty
📗 Summary
As a user of JabRef
I want to move/cut the value of one field to another field in a collection of bib entries automatically
📋 Acceptance Criteria
Background
Given 'Manage field names & content' dialog is shown
Acceptance Criteria 1
When the source and destination fields are not compatible (they don't hold the same type of data)
Then show an error message
Acceptance Criteria 2
When 'Overwrite Non empty field' is NOT selected
Then disable the 'Move values' button
📗 Summary
As a user of JabRef
I want to append some value to one field in a collection of bib entries automatically
📋 Acceptance Criteria
Background
Given 'Manage field names & content' dialog is shown
Acceptance Criteria 1
When user enter an illegal value for the given field
Then show an error message
Acceptance Criteria 2
When 'Overwrite Non empty field' is NOT selected
Then disable 'Append value' button
📗 Summary
As a user of JabRef
I want to swap the values of two fields in a collection of bib entries automatically
📋 Acceptance Criteria
Background
Given 'Manage field names & content' dialog is shown
Acceptance Criteria 1
When 'Overwrite Non empty field' is NOT selected
Then disable 'swap values' button
Wireframe
Screenshots
💾 Technical Information
org.jabref.logic.integrity.FieldCheckers#getForField()
to validate a field value..
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)