-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Ask for enable indexing when clicking fulltext search #11854
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boolean enableFulltextSearch = dialogService.showConfirmationDialogAndWait(Localization.lang("Fulltext search"), Localization.lang("Fulltext search requires the setting 'Automatically index all linked files for fulltext search' to be enabled. Do you want to enable indexing now?"), Localization.lang("Enable indexing"), Localization.lang("Keep disabled")); | ||
|
||
LibraryTab libraryTab = tabContainer.getCurrentLibraryTab(); | ||
if (libraryTab != null && enableFulltextSearch) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should try to disable the button if no library is active. Refs #11837.
Follow-up I would say.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we disable it, the new dialog would never come up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then why this null check? 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intellij suggested that because library tab is nullable.. (reduce warnings in the code=.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we disable it, the new dialog would never come up
The button should be disabled when preferences are off. The dialog will appear if the preferences are disabled and clicks to enable the button. If accepted to enable indexing, the button and preferences should both be enabled; otherwise, both should remain disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we disable it, the new dialog would never come up
The button should be disabled when preferences are off. The dialog will appear if the preferences are disabled and clicks to enable the button. If accepted to enable indexing, the button and preferences should both be enabled; otherwise, both should remain disabled.
I understand "clicks to enable the button" as a "click" int he preference.
The thing Christoph implemented was the intention of the whole thing. If we did as you described, we would not implement #9491 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand "clicks to enable the button" as a "click" int he preference.
The toggle button in the search bar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please test the latest changes should be okay now
I am so sorry, but if I press "Keep disabled", the popup appears again - and again - and again. |
Co-authored-by: Loay Ghreeb <[email protected]>
The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build. |
fixes #9491 (comment)
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)