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

Investigate use of tippy.js for term hover #360

Open
3 of 8 tasks
jzohrab opened this issue Mar 21, 2024 · 0 comments
Open
3 of 8 tasks

Investigate use of tippy.js for term hover #360

jzohrab opened this issue Mar 21, 2024 · 0 comments
Labels
code-improvement Make code/structure better good first issue Good for newcomers

Comments

@jzohrab
Copy link
Collaborator

jzohrab commented Mar 21, 2024

We have a few issues for the term hover (e.g. #236, #355, #357), all having to do with the amount of info shown on the hover.

Hovering is added by $('#thetext').tooltip({ in static/js/lute.js, using jquery. It might be better to try tippy, as suggested by @webofpies in #236.

I did some initial hacking in branch wip_issue_360_tippy_for_term_popup_interactions pushed to this repo. A demo:

image

As shown, the initial popup has some child terms, which are themselves tippies. To see the child term tippy, you click on the child term (this seemed more stable than hover). The child terms should have some kind of hover links or similar to show that they should be clicked. You can click on a tippy further up the chain, and everything else is hidden.

Scope of work for further investigation:

  • all of the tippy stuff should go in lute/static/vendor/
  • see if there's a minified version of tippy and its css -- I don't think we need all of it. https://atomiks.github.io/tippyjs/v6/getting-started/#2-cdn has some production URLs, could commit those as they're minified etc.
  • proof-of-concept to show multiple tippies created off of single one
  • try replace ajax of proof-of-concept demo with call to the endpoint, and initialize the child terms with their own tippies
  • try using the tippy in place of the existing jquery tooltip
  • ensure it works on mobile!!!
  • figure out themes - eg dark etc, they should all somehow be applied to the tooltip. Maybe use headless tippy to ensure all themes are good as-is, though that seems like a hassle.
  • only use this for the term popup, no messages etc. i.e. should only be related to $('#thetext').tooltip({ in lute.js.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-improvement Make code/structure better good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

1 participant