Skip to content
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

Keep entry highlighted after editing #10439

Closed
ryan-carpenter opened this issue Oct 2, 2023 · 16 comments
Closed

Keep entry highlighted after editing #10439

ryan-carpenter opened this issue Oct 2, 2023 · 16 comments

Comments

@ryan-carpenter
Copy link

ryan-carpenter commented Oct 2, 2023

I often lose my place in the entry table after editing an entry, because editing removes highlighting from the entry table.

Current:

  1. Select an entry in the table => row turns blue*
  2. Edit the entry (any field) through text entry or combo box => table row loses blue highlight

Desired:

  1. Select an entry in the entry table => row turns blue*
  2. Edit the entry => table row remains highlighted

*Default light theme

JabRef 5.10--2023-09-01--779e555
Linux 6.4.12-1-default amd64
Java 21-internal
JavaFX 20+19

@ryan-carpenter
Copy link
Author

HighlightTableRow

private static class HighlightTableRow extends TableRow<CitationKeyPatternPanelItemModel> {

@ryan-carpenter
Copy link
Author

ryan-carpenter commented Oct 4, 2023

Entry editor

src/main/java/org/jabref/gui/entryeditor/EntryEditor.java

@ryan-carpenter
Copy link
Author

This issue will need to be verified, because I was just editing entries and was surprised to discover the table row still highlighted afterward. I tested several different fields in several entries and the table row always remained highlighted after the edits.
I have not updated JabRef or my operating system. However, I did set up IntelliJ for JabRef last night. One of the configuration steps is to install Temurin via IntelliJ. I don't know if installing that could have fixed any errors or incompatibilities with my existing JavaFX setup. However, JabRef still shows exactly the same version information as in my original report.

@Siedlerchr
Copy link
Member

Ah sorry, misunderstood this issue. I cannot reproduce it here on mac with a recent version

@ryan-carpenter
Copy link
Author

The issue returned after another UI problem and resolved when I restarted JabRef, the row highlighting appears to be a symptom of another problem.

The UI problem is one that happens often, where dropping entries into a group makes the groups tree scroll to the bottom and start flickering. When something like this goes wrong temporarily, I have residual issues such as the row highlighting and needing to double click (instead of single click) an entry to open it from the table. Like row highlighting, the double-click issue also resolves when I restart JabRef.

@ryan-carpenter
Copy link
Author

I figured out what is going on. Row highlighting works as expected when the search box is empty and exhibits the unwanted behaviour when the search box is not empty. Restarting JabRef clears the search box, which makes row highlighting return to normal. If row highlighting is meant to behave the same regardless of the search box, then this issue is a bug rather than a suggested enhancement.

@Siedlerchr
Copy link
Member

Does clearing the search manually return the desired. behavior?

@u7492883
Copy link
Contributor

u7492883 commented Oct 9, 2023

Is this issue available to work on? If so I would like to work on fixing this bug.

@ryan-carpenter
Copy link
Author

Does clearing the search manually return the desired. behavior?

Yes it does, and this is the same for plain or regex searches.

@ThiloteE
Copy link
Member

@u7492883 thanks for your interest. Yes, I will assign you for now. If you feel this is a too difficult issue for you, please check out free to take good first issues at the projects page.

@ThiloteE
Copy link
Member

I think I might have been too fast. To be honest, we don't know if row highlighting is meant to be normal during search. This needs more discussion. There is also a big search related rework in the making, so anything done here might conflict with this rework.

@u7492883 please choose a good first issue instead.

@koppor
Copy link
Member

koppor commented Oct 17, 2023

One of the configuration steps is to install Temurin via IntelliJ. I don't know if installing that could have fixed any errors or incompatibilities with my existing JavaFX setup.

JavaFX dependencies are are handled via build.gradle, because JavaFX is not shipped with OpenJDK anymore.

Maybe there are side effects of the JRE. IDK.

JabRef still shows exactly the same version information

If you start JabRef von IntelliJ, version 100 should be shown, without any commit information.

@koppor
Copy link
Member

koppor commented Oct 17, 2023

into a group makes the groups tree scroll to the bottom and start flickering

Should be solved with #10488

@koppor koppor mentioned this issue Oct 17, 2023
16 tasks
@AEgit
Copy link

AEgit commented Oct 17, 2023

I remember that keeping focus on selected items was an issue with JabRef in the early stages of version 5. Maybe the following problem (although related to the groups panel, rather than the entry view) has a similar underlying issue (?):
#3436

@LoayGhreeb
Copy link
Member

@ryan-carpenter, I can't reproduce the issue.

Row highlighting works as expected when the search box is empty and exhibits the unwanted behaviour when the search box is not empty

If you have an active search query and select an entry that matches, then update that entry by removing text that matches the search term, the entry will no longer match. It will be removed from the table, and another entry (either above or below) will be selected.

@ryan-carpenter
Copy link
Author

@ryan-carpenter, I can't reproduce the issue.

Row highlighting works as expected when the search box is empty and exhibits the unwanted behaviour when the search box is not empty

If you have an active search query and select an entry that matches, then update that entry by removing text that matches the search term, the entry will no longer match. It will be removed from the table, and another entry (either above or below) will be selected.

I am certain that I was not changing entries in a way that would prevent them from matching the search, and I recall testing with a variety of fields to be sure of this and to check different types of fields. However, I tested again today with and without regular expressions and I can no longer reproduce the issue (now on JabRef 5.16 from 2024-08-26), so it seems to be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

No branches or pull requests

7 participants