User specific comment#9727
Conversation
|
If possible, the new editor should also support editing org.jabref.model.entry.BibEntry#commentsBeforeEntry |
koppor
left a comment
There was a problem hiding this comment.
A good start 👍
Test cases are missing.
|
|
||
| public class UserSpecificCommentField implements Field { | ||
| private final String name; | ||
| private final Set<FieldProperty> properties; |
| Set<Field> otherFields = entry.getFields().stream().filter(field -> !allKnownFields.contains(field)).collect(Collectors.toCollection(LinkedHashSet::new)); | ||
|
|
||
| Set<Field> otherFields = entry.getFields().stream() | ||
| .filter(field -> !allKnownFields.contains(field) && !field.getName().toLowerCase().contains("comment")) |
There was a problem hiding this comment.
It should be startsWith and comment-, because UserSpecificCommentField.java is implemented like that.
Maybe also check for plain comment in addition.
There was a problem hiding this comment.
Why does the following not work here?
(that code is from above)
field -> field.equals(StandardField.COMMENT) || field instanceof UserSpecificCommentField|
Please have a look at the failing unit tests, most of them are related to the l10n https://devdocs.jabref.org/code-howtos/localization.html |
|
|
Please have a look at the failing tests! |
|
Thanks for the continuing work here! What is the current status`Is this ready from your side? Anything left or unclear? |
Yeah, I believe it's ready from my side. If there are any further changes or clarifications needed, please let me know. :) |
30e01c4 to
0d7da65
Compare
|
I made updates:
|
|
In principle, this works. If one modifies the BibTeX source code, one has to switch to another entry and back to get the change updated in the Comments tab. I did not see an easy solution for this. Thus, it is good to go from my side! |
Got it! |
|
Thanks a lot for this cool feature! |
|
What we oversaw during review: Ordering of fields. First, the bibtex standard field should come, then the user-specific comment fields. Since they are mixed, users are very confused and angry (see #10424). - I don't remember any other occasion where we have three thumbs ups ^^ I tried to fix it at #10610. Just as information to @NiD133 if you work on UX in the future in other projects. |
* upstream/main: (68 commits) Fix issue 9863 - Change Tab selection order (#9907) New Crowdin updates (#9994) Enable editing typo with double clicking on field name in custom entry type (#9977) Remove "Field name:" from localization - we already have "Field name" (#9991) Changed database to catalog in org.jabref.gui.slr and org.jabref.logic.crawler (#9989) Use environment variables for hostname detection (#9910) Add cleanup activity for URL field (#9970) Fix freezing when fetching IBSN and no results are found (#9987) Make Group(Node)TreeViewModel more OO (#9978) Fix container for group item count still visible if display count is off (#9980) Fix paste of BibTeX data (#9985) Bring back SimplifyBoolean* and UnnecessaryParantheses (and refine guide) (#9981) Add new menu entry to remove braces from selection, aka unprotect it. (#9968) User specific comment (#9727) Bump org.openrewrite.recipe:rewrite-recipe-bom from 1.19.3 to 2.0.0 (#9975) Fix typos Remove non-needed link Fix typos Enable RemoveJavaDocAuthorTag (#9973) Bump com.fasterxml.jackson.datatype:jackson-datatype-jsr310 (#9974) ...
Fixes #543


