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

Selected entry in search window selects entry in the main table #11010

Merged
merged 10 commits into from
Mar 21, 2024

Conversation

LoayGhreeb
Copy link
Collaborator

@LoayGhreeb LoayGhreeb commented Mar 12, 2024

Closes #9362

When clicking an entry in the search window, it should be marked in the corresponding library (JabRef should focus the library and then select the item in the main table)

preview.mp4

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)
  • 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.

@LoayGhreeb
Copy link
Collaborator Author

I figured out two issues with the current implementation:

  • When using setCurrentTab method, it changes the activeDatabase. This change maybe trigger a listener associated with activeDatabase, leading to unexpected behavior in the resultsTable.

    issue.mp4
  • After closing the search result window, the search query remains in the search bar. When trying to edit the query, the resultsTable selection item listener still works, indicating that the resultsTable is still in memory. (Before this PR, this behavior occurred but didn't affect anything because changes were only in the previewViewer).

    resultsTable.getSelectionModel().selectedItemProperty().addListener((obs, old, newValue) -> {
                if (newValue != null) {
                    previewViewer.setEntry(newValue.getEntry());
                } else {
                    previewViewer.setEntry(old.getEntry());
                }
            });

@LoayGhreeb LoayGhreeb marked this pull request as draft March 12, 2024 08:23
@LoayGhreeb LoayGhreeb marked this pull request as ready for review March 20, 2024 09:27
Comment on lines -53 to +55
- Keywords filed are now displayed as tags. [#10910](https://github.com/JabRef/jabref/pull/10910)
- Keywords field are now displayed as tags. [#10910](https://github.com/JabRef/jabref/pull/10910)
Copy link
Member

Choose a reason for hiding this comment

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

Small comment: In future, try to separate these small side changes to other pull requests. Reason: If a PR takes long to review, these kind of changes will be "outdated" (e.g., causing conflicts, because other PRs also touch these places).

On Linux (and Mac) you can try GitButler for "carving out" unrelated changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

On Linux (and Mac) you can try GitButler for "carving out" unrelated changes.

GitButler is now supported on Windows, but for some reason it didn't work with JabRef 😅

Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

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

lgtm!

@Siedlerchr Siedlerchr added this pull request to the merge queue Mar 21, 2024
Merged via the queue into JabRef:main with commit 40f89f5 Mar 21, 2024
20 checks passed
@LoayGhreeb LoayGhreeb deleted the issue-9362 branch March 21, 2024 20:18
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.

Global Search: Clicking an entry in the search window should lead to a selection in the corresponding library
4 participants