jabref
jabref copied to clipboard
Bring back content selectors
Fixes #10560
I have started implementing the first task, which adds a selection box next to the keyword field. The list is populated with the contents of the content selectors list, but I have not yet implemented excluding existing keywords. Could you please review my approach so far and let me know if I'm on the right track? Any feedback or suggestions would be greatly appreciated.
Mandatory checks
- [ ] Change in
CHANGELOG.md
described in a way that is understandable for the average user (if applicable) - [ ] Tests created for changes (if applicable)
- [x] Manually tested changed features in running JabRef (always required)
- [x] Screenshots added in PR description (for UI changes)
- [ ] Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
- [ ] Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.
The code looks almost fine to me so far, yet you should always use our cell factory for the drop-down list. Otherwise there will be rendering errors. A good start.
in addition to @calixtus comment, you can find example code for the field libraryListView
in the ImportEntriesDialog
Hi @Siedlerchr, @calixtus can you review the changes I made and let me know if there's anything else that needs to be done
Hi, codewise it looks good to me, yet I'm not happy with the UI. The Combobox always seems to stay empty, only the dropdown list is used. Can you replace the box with just an icon button with some symbol representing content selectors and keep the dropdown menu? Or can the width of the buttonbox be reduced?
While discussing the UI. We have some chip view on the Crossref field (if auto completion is on)
Would it be possible to rewrite the editor for the keyword field to have the similar functionality, but using the provided terms in the dropdown. (Hint: SuggestionProvider; should also return something if NO letter is input. Then, the list should always be filled)
Thanks, I'll rewrite the keywords field to use Tags Field
(task 4 of #10560) and ignore task 1.
Also, I noticed a bug with the Crossref field. When there's no content selector it works fine.
But if I add content selectors and enable autocomplete the dropdown doesn't show, and pressing enter doesn't add the tag.
I'll look into this while working on the keyword field.
For understanding the AutoCompletion hierarchy, I recently explained this in another issue https://github.com/JabRef/jabref/issues/8145#issuecomment-1908743032
Content selectors should always be enabled.
I've fixed autocomplete issues. Now:
- The
Crossref
field will work without needing to enable autocomplete #8145. - If autocomplete is disabled, only the content selector will be suggested.
- If autocomplete is enabled, both the content selectors and related suggestions will be suggested.
- This also fixes this issue:
If I add content selectors and enable autocomplete the dropdown doesn't show, and pressing enter doesn't add the tag.https://github.com/JabRef/jabref/pull/10910#issuecomment-1965728798
~I'm not sure what OpenRewrite
test is or why it failed.~
Regarding the Keywords Field
:
-
I tried using the
ChipView
as a tag view instead of theLabel
. Please check what is preferred for use.
~- I'm still unable to import the current keywords or write new ones. I attempted to implement the binding as it is used in the Crossref
field, but I couldn't do it.~ (Done)
Additionally, there is a visual issue with TagsField
. If there are saved values in the field the height of the field expands according to how many tags are in the field. However, if you start to write in the field, it fixes the height issue and returns to the normal height.
Hi, we discussed the the exception of crossref autocomplete always enabled regardless of the preference option a few weeks ago internally and decided against it, since it could have heavy performance issues on large databases. Instead we decided, that we want to make the preferences more fine grained and enable autocomplete for crossref as default. But I would suggest to put this change into a new issue/pr to not widen the scope of this pr any further.
For now your changes to the suggestion provider are fine.
About the height change, maybe related to the automatic weight calculation in the entry editor?
But I would suggest to put this change into a new issue/pr
@calixtus, I opened a new PR to fix the suggestion provider and reverted the commit from this PR.
About the height change, maybe related to the automatic weight calculation in the entry editor?
I didn't spend enough time investigating the issue, I will look at it soon or open a new issue.
I think my PR is now ready for review.
@LoayGhreeb Since you are in the context of keywords, may I ask if you could look into https://github.com/JabRef/jabref/issues/8701#issuecomment-1975161147?
OMG, what (sometimes) does NOT work is to CLICK on an empty field:
Tabbing into the field works.
Similr for Crossref field. Sometimes, it doesn't accept the focus.
OMG, what (sometimes) does NOT work is to CLICK on an empty field:
Similr for Crossref field. Sometimes, it doesn't accept the focus.
Yes, I noticed this issue. It is related to GemsFX TagsField, you have to click exactly at the position where the text will be written in the text field, or I think click on the same line.
About the clicking issue: Maybe the tagsfield itself is only one line high. I think the borders of the tags field are not shown, only the border of the surrounding editor.
About the clicking issue: Maybe the tagsfield itself is only one line high. I think the borders of the tags field are not shown, only the border of the surrounding editor.
Yes, that's exactly the issue. I tried it without removing the default StyleClass
, and this is the result.
Maybe sthg like this works?
keywordTagsField.getEditor().prefHeightProperty().bind(this.heightProperty());
If not, restore the styleclass and we'll merge. Codewise looks already good to me.
If not, restore the styleclass and well merge. Codewise looks already good to me.
It doesn't work correctly it expands while writing in the editor.
The new tag system ignores hierarchical keywords. Only the parent keyword is shown.