vivo-project / VIVO

VIVO is an extensible semantic web application for research discovery and showcasing scholarly work
http://vivoweb.org
BSD 3-Clause "New" or "Revised" License
202 stars 127 forks source link

Replace Qtip Library with Bootstrap Tooltip #3937

Open milospp opened 5 months ago

milospp commented 5 months ago

VIVO GitHub issue: 3931 Linked Vitro PR

What does this pull request do?

This pull request focuses on the removal of the Qtip library from the project, substituting it with Bootstrap's tooltip that utilizes Popper 2 as its underlying mechanism. The design has been configured to maintain similarity with the previous implementation using Qtip.

What's new?

The Bootstrap tooltip automatically identifies available screen space for display but is limited to top, bottom, left, and right orientations, excluding corners.

Before:

image image image image

After:

Individual Search resultd download MapOfScience

How should this be tested?

On the Individual profile page:

On the Search results page:

On the MapOfScience page:

Additional Notes:

Interested parties

@VIVO-project/vivo-committers

milospp commented 4 months ago

Works well with Wilma, excellent! I'm seeing an error with tenderfoot, however.

org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:840) Caused by: freemarker.core.ParseException: Syntax error in template "individual--foaf-person.ftl" in line 184, column 1: Encountered ")", but was expecting one of: <STRING_LITERAL> <RAW_STRING> "false" "true" <INTEGER> <DECIMAL> "." "+" "-" "!" "[" "(" "{" <ID> at

Seems there's an extra comma in that file. If I remove the comma the page loads, but it then complains about missing methods in the console, which I can resolve by adding tooltip-utils.js and popper.min.js to headscripts.ftl... but then it complains about bootstrap missing, which is as deep as I got :)

Seems like we should not break tenderfoot if we intend to continue distributing it with VIVO (are we...?)

I'm also not seeing any tooltips with nemo, but they seem broken without the changes, as well, so not worried about fixing that theme with this PR.

Completely overlooked testing on other themes since the decision to prioritize Wilma and phase out the others in the future. I've now fixed it for all other themes (Tenderfoot, Nemo, Vitro) and included Bootstrap 5 for tooltips in those themes, which might cause issues if any Bootstrap 3 code was overlooked. If you spot anything else, just give me a heads-up so I can fix it. Thanks!