Skip to content

Conversation

@Memeel
Copy link

@Memeel Memeel commented Oct 27, 2025

Closes #14082

This pull request replaces the standard ComboBox for adding new fields with a SearchableComboBox and a TextField in the "Custom Entry Types" preference pane.

This improves usability by allowing users to quickly filter and find a specific field when customizing entry types. The option is located under File -> Preferences -> Entry types.

Steps to test the SearchableComboBox

  1. Go to File -> Preferences -> Entry types.
  2. Select any entry type from the list on the left.
  3. In the "Required and optional fields" section, look at the first dropdown menu at the bottom.
  4. Verify that this is now a SearchableComboBox:
    • Click on the dropdown. It should show the full list of available fields (first screenshot).
    • Start typing the name of a field (second screenshot).
    • Verify that the list filters dynamically to show matching fields.
  5. Select a field from the filtered list and click the + button.
  6. Verify that the field is added correctly to the list of fields for that entry type.
Capture d'écran 2025-10-28 145807 Capture d'écran 2025-10-28 145821

Steps to test the free text field

  1. Go to File -> Preferences -> Entry types.
  2. Select any entry type from the list on the left.
  3. In the "Required and optional fields" section, look at the second input box (first screenshot).
  4. Type a new custom field name and click the + button (second screenshot).
  5. Verify that the field is added correctly to the list of fields for that entry type.
Capture d'écran 2025-10-28 145839 Capture d'écran 2025-10-28 145911

Final result

Capture d'écran 2025-10-28 145920

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • [/] I added JUnit tests for changes (if applicable)
  • I added screenshots in the PR description (if change is visible to the user)
  • I described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • I checked the user 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 updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.

@github-actions
Copy link
Contributor

Hey @Memeel!

Thank you for contributing to JabRef! Your help is truly appreciated ❤️.

We have automatic checks in place, based on which you will soon get automated feedback if any of them are failing. We also use TragBot with custom rules that scans your changes and provides some preliminary comments, before a maintainer takes a look. TragBot is still learning, and may not always be accurate. In the "Files changed" tab, you can go through its comments and just click on "Resolve conversation" if you are sure that it is incorrect, or comment on the conversation if you are doubtful.

Please re-check our contribution guide in case of any other doubts related to our contribution workflow.

@Memeel Memeel changed the title Fix for issue 14082 Replaces the standard ComboBox with a SearchableComboBox in custom Entry Types Oct 27, 2025
@Memeel Memeel changed the title Replaces the standard ComboBox with a SearchableComboBox in custom Entry Types Replaces the standard ComboBox with a SearchableComboBox in custom Entry Types (#14082) Oct 27, 2025
@Memeel Memeel changed the title Replaces the standard ComboBox with a SearchableComboBox in custom Entry Types (#14082) Replaces the standard ComboBox with a SearchableComboBox in custom Entry Types Oct 27, 2025
@Siedlerchr
Copy link
Member

Free text field is missing

@Memeel Memeel marked this pull request as draft October 27, 2025 17:18
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes to project files

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. Sorry, I accidentally removed a line in a previous commit, and the latest one reintroduces it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix. Take this as learning for git.

I see two options:

  1. git checkout main -- .idea/codeStyles/Project.xml
  2. Use the browser extension "refined github" and then you have the button "revert changes"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!

@Memeel Memeel changed the title Replaces the standard ComboBox with a SearchableComboBox in custom Entry Types Replaces the standard ComboBox with a SearchableComboBox and a free text field in custom Entry Types Oct 28, 2025
@Memeel
Copy link
Author

Memeel commented Oct 28, 2025

Just to make sure we are not misunderstanding the task, are we supposed to add another box below the existing one that lets you add the free text field, or should we keep a single combobox that has the searchable feature and the adding free text field?

@Siedlerchr
Copy link
Member

Siedlerchr commented Oct 28, 2025

As a User I want to search for existing fields and also have the option to create a new, not yet existing one, e.g. "mycustomfield" . If this is possible with the SearchableCombobox then it's good, otherwise add a new text field where the user can enter the fieldname

@Memeel Memeel marked this pull request as ready for review October 28, 2025 21:43
Memeel and others added 6 commits November 5, 2025 09:34
Replaces the standard ComboBox with a SearchableComboBox to
improve usability when adding fields.

Fixes JabRef#14082
Replaces the single editable SearchableComboBox with two separate components: a SearchableComboBox for existing fields and a new TextField for custom fields
@Memeel Memeel force-pushed the fix-for-issue-14082 branch from f361ae5 to d2352e7 Compare November 5, 2025 08:37
CHANGELOG.md Outdated
- We improved the way we check for matching curly braces in BibTeX fields and made error messages easier to understand. [#12605](https://github.com/JabRef/jabref/issues/12605)
- We improved the citations relations caching by implementing an offline storage. [#11189](https://github.com/JabRef/jabref/issues/11189)
- A space is now added by default after citations inserted via the Libre/OpenOffice integration. [#13559](https://github.com/JabRef/jabref/issues/13559)
- We replaced the standard ComboBox with a SearchableComboBox in custom Entry Types [#14082](https://github.com/JabRef/jabref/issues/14082)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have this now duplicated and you need to move this now to the new unreleased section

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thank you for your feedback!

@koppor koppor marked this pull request as draft November 5, 2025 10:19
@koppor
Copy link
Member

koppor commented Nov 5, 2025

There is no answer to the question #14189 (comment) - therefore, I converted to draft.

@Memeel
Copy link
Author

Memeel commented Nov 5, 2025

Hi @Siedlerchr,

Apologies for the delay, that's exactly what we thought as well.

We initially wanted to make the single SearchableComboBox handle both searching and "free text" adding, but we were not entirely sure how and where to start. So, we decided to implement a separate TextField, following the EntryType pattern. We were not sure if this was what you had in mind, so we asked for confirmation first.

This Pull Request (PR) now implements that exact two-component solution:

  • The SearchableComboBox is now read-only and is only for searching existing fields.
  • A new, separate TextField has been added just below it, specifically for creating new, custom fields (like "mycustomfield").

If you want us to try to combine these two boxes into one, we are open to hear your recommendations on how to do so.

Thank you for your time and feedback!

@Siedlerchr
Copy link
Member

This is fine for me now

// The valueProperty() of addNewField ComboBox needs to be updated by typing text in the ComboBox textfield,
// since the enabled/disabled state of addNewFieldButton won't update otherwise
EasyBind.subscribe(addNewField.getEditor().textProperty(), text -> addNewField.setValue(FieldsUtil.FIELD_STRING_CONVERTER.fromString(text)));
// EasyBind.subscribe(addNewField.getEditor().textProperty(), text -> addNewField.setValue(FieldsUtil.FIELD_STRING_CONVERTER.fromString(text)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented out code

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change combo box for field selection to two

5 participants