quarto-dev / quarto-dev/quarto

Hover tooltip extent on Quarto Bibtex citations extends too far

Open
#842 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug vscode
Dominant language
TypeScript
Stars
645
Forks
62
Avg merge
17h 42m
Merged PRs (30d)
13

Description

Bug description

Hover tooltip extent spans entire extent of paragraph past the location that contains a bibtex citation.

Steps to reproduce
  1. Open quarto document with long paragraph with citation using @nameYEAR.
  2. Include bib file containing citation in same workspace.
  3. Mouse over paragraph before citation (hover does not appear as expected)
  4. Mouse over paragraph after citation (hover continues to appear far away from citation)

Reproducible Example

quarto-file.qmd

---
title: "Quarto Citation Hover Example"
format: pdf
bibliography: references.bib
---

# Introduction

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Curabitur pretium tincidunt lacus, nec volutpat elit fermentum ut. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et. This is a test paragraph where a citation is included in the middle of the text to illustrate how VS Code shows hover tooltips for citations [@Smith2020]. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Curabitur pretium tincidunt lacus, nec volutpat elit fermentum ut. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et.

references.bib

@article{Smith2020,
  author  = {John Smith and Jane Doe},
  title   = {An Example Article for Testing},
  journal = {Journal of Test Cases},
  year    = {2020},
  volume  = {12},
  number  = {3},
  pages   = {45--67},
}
Actual behavior

Hover tooltip extent spans entire extent of paragraph past the location that contains a bibtex citation.

Expected behavior

Expect the tool tip hover to only appear when hovering over the actual citation not over the entire paragraph. The expected behaviour works for issues/problems identified by positron (identified with blue squiggle) where the issue tooltip/hover appears when you mouse over the issue but not for the entire paragraph.

Your environment

R 4.4.2
Quarto 1.8.25
Ubuntu Release: 24.04

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the hover behavior with quarto-file.qmd and references.bib, using the long paragraph and @Smith2020 citation described in the issue. Trace the citation hover handling and compare its extent with the Positron issue hover behavior. Done means the tooltip appears only over the actual citation rather than the surrounding paragraph.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
devtools, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.