-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Added tooltips to library properties window #13045
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
Conversation
@@ -69,6 +73,15 @@ public void initialize() { | |||
userSpecificFileDirectoryValidationVisualizer.setDecoration(new IconValidationDecorator()); | |||
laTexFileDirectoryValidationVisualizer.setDecoration(new IconValidationDecorator()); | |||
|
|||
String userString = preferences.getFilePreferences().getUserAndHost().replace("-" + OS.getHostName(), ""); | |||
userSpecificFileDirectoryTooltip.setText("User: " + userString + ", Host: " + OS.getHostName()); |
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.
The tooltip text should be localized using Localization.lang to support multilingual capabilities, as per JabRef's localization guidelines.
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.
laTexFileDirectoryTooltip.textProperty().bind( | ||
viewModel.laTexFileDirectoryProperty().map(path -> | ||
"Directory for LaTeX files: " + (path.isEmpty() ? "(not set)" : path) | ||
) |
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.
The tooltip text should be localized using Localization.lang to support multilingual capabilities, as per JabRef's localization guidelines.
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.
Solution too dirty.
Start with rewriting
org.jabref.logic.preferences.JabRefCliPreferences#getUserAndHost
to
private UserAndHost getUserAndHost() {
and UserAndHost
as new Class maybe with StringProperty / or a final string as the hostname cannot be changed AFAIK
Similar to other preferences
Adapt all other methods and settings accordingly.
# Conflicts: # jabgui/src/main/java/org/jabref/gui/libraryproperties/general/GeneralPropertiesView.java # jabgui/src/main/resources/org/jabref/gui/libraryproperties/general/GeneralProperties.fxml
Apologies for the numerous commit messages - I tried merging with upstream and it seems to have added all those previous commits. |
@@ -0,0 +1,23 @@ | |||
package org.jabref.logic.util; | |||
|
|||
public class UserAndHost { |
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.
This is a typical record
in Java, isn't it?
<JabRefIconView fx:id="libSpecificFileDirSwitchIcon" glyph="ABSOLUTE_PATH"/> | ||
</graphic> | ||
<tooltip> | ||
<Tooltip fx:id ="libSpecificFileDirSwitchTooltip" text="%Switch to absolute path: converts the path to an absolute path."/> |
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.
why is this removed?
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.
seems like your. merge was not proper
@trag-bot didn't find any issues in the code! ✅✨ |
Note that your PR will not be reviewed/accepted until you have gone through the mandatory checks in the description and marked each of them them exactly in the format of |
Closing this PR due to inactivity 💤 Please reopen the PR when you continue working on this |
Closes #12269
Added tooltips for the library properties window:
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if change is visible to the user)