Skip to content

Fix tooltips in CitationsDisplay#5188

Merged
Siedlerchr merged 4 commits into
JabRef:masterfrom
davidemdot:latexintegration-fixtooltip
Aug 18, 2019
Merged

Fix tooltips in CitationsDisplay#5188
Siedlerchr merged 4 commits into
JabRef:masterfrom
davidemdot:latexintegration-fixtooltip

Conversation

@davidemdot

@davidemdot davidemdot commented Aug 12, 2019

Copy link
Copy Markdown
Member

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 component: ui status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers project: gsoc labels Aug 12, 2019
Comment thread src/main/java/org/jabref/gui/texparser/CitationsDisplay.java Outdated
@davidemdot

Copy link
Copy Markdown
Member Author

@Siedlerchr

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

@Siedlerchr Siedlerchr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lgtm so far!

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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

component: ui project: gsoc status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants