Skip to content

Improve Check Integrity Dialog: Single-click focuses field, double-click closes dialog#12679

Merged
koppor merged 4 commits into
JabRef:mainfrom
marwanemad07:fix-issue-12245
Mar 11, 2025
Merged

Improve Check Integrity Dialog: Single-click focuses field, double-click closes dialog#12679
koppor merged 4 commits into
JabRef:mainfrom
marwanemad07:fix-issue-12245

Conversation

@marwanemad07

Copy link
Copy Markdown
Contributor

Closes #12245.

This PR updates the Check Integrity dialog behavior: a single click now focuses the field, and a double-click both focuses and closes the dialog.

Mandatory checks

  • I own the copyright of the code submitted and I licence it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • 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.

After Single Click

image

After Double Click

image

Comment on lines +77 to +81
messagesTable.setRowFactory(tableView -> {
TableRow<IntegrityMessage> row = new TableRow<>();
addRowMouseEvent(row);
return row;
});

@calixtus calixtus Mar 10, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you can use ViewModelTableRowFactory<S> here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is this what you mean messagesTable.setRowFactory(new ViewModelTableRowFactory<IntegrityMessage>() .withOnMouseClickedEvent(this::handleRowClick));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

best practice is not to mix argument style and fluent style.
use ViewModelTableRowFactory#install

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let me know if I still need to change it.

koppor
koppor previously approved these changes Mar 11, 2025
@trag-bot

trag-bot Bot commented Mar 11, 2025

Copy link
Copy Markdown

@trag-bot didn't find any issues in the code! ✅✨

@calixtus

Copy link
Copy Markdown
Member

Codewise looks good to me.

@koppor koppor added this pull request to the merge queue Mar 11, 2025
Merged via the queue into JabRef:main with commit b17cfe7 Mar 11, 2025
GuilhermeRibeiroPereira pushed a commit to GuilhermeRibeiroPereira/jabref that referenced this pull request Apr 1, 2025
…ick closes dialog (JabRef#12679)

* Improve Check Integrity dialog entry interaction

* Use ViewModelTableRowFactory

---------

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check integrity: Jump to field and close dialog on double click

3 participants