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

Fix tooltips in CitationsDisplay #5188

Merged
merged 4 commits into from
Aug 18, 2019
Merged

Fix tooltips in CitationsDisplay #5188

merged 4 commits into from
Aug 18, 2019

Conversation

davidemdot
Copy link
Member

@davidemdot davidemdot commented Aug 12, 2019

This patch solves the issue detected by @calixtus in #5002 (comment)

  • Wrap the text inside of the tooltip.
  • Highlight the \cite command in the tooltip.

Moreover:

  • Rename withTooltip(Callback<T, String>) to withStringTooltip(Callback<T, String>) in ViewModelListCellFactory.
  • Add withTooltip(Callback<T, Tooltip>) to ViewModelListCellFactory.

Before:

before

After:

after


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Manually tested changed features in running JabRef
  • Screenshots added in PR description (for bigger UI changes)
  • Ensured that the git commit message is a good one
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

@davidemdot davidemdot added ui status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers project: GSoC labels Aug 12, 2019
@davidemdot
Copy link
Member Author

@Siedlerchr

  • Rename withTooltip(Callback<T, String>) to withStringTooltip(Callback<T, String>) in ViewModelListCellFactory.
  • Add withTooltip(Callback<T, Tooltip>) to ViewModelListCellFactory.

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 so far!

@@ -66,9 +66,9 @@ public String getContext() {

// Add three dots when the string does not contain all the line.
return String.format("%s%s%s",
(start > 0) ? "... " : "",
(start > 0) ? "..." : "",
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Not here, because the getContext() method extracts a substring that always has the \cite command in the middle. That is what is shown into the dashed box.

But is could be useful in the near future. Thanks!

@Siedlerchr Siedlerchr merged commit 0316d76 into JabRef:master Aug 18, 2019
@davidemdot davidemdot deleted the latexintegration-fixtooltip branch August 18, 2019 12:13
Siedlerchr added a commit to Siedlerchr/jabref that referenced this pull request Aug 23, 2019
* upstream/master:
  Bugfix/5045 : Modified the existing logic to comply crossref resolution with biblatex specification (JabRef#5086)
  Fix issue with missing year value in year column (JabRef#5197)
  Bump com.gradle.build-scan from 2.4 to 2.4.1 (JabRef#5199)
  Add citation commands to TexParser: autocite, blockcquote, and textcquote (JabRef#5195)
  Conversion of preferencesDialog/advancedTab, networkTab and groupsTab to mvvm (JabRef#5141)
  Fix Permissions of LaTeXintegration (JabRef#5134)
  Border for group color indicator and some space for tooltip (JabRef#5190)
  Fix issue 5152, tooltip and icon added to group cell (JabRef#5191)
  Fix tooltips in CitationsDisplay (JabRef#5188)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project: GSoC status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants