Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.
This repository was archived by the owner on Apr 9, 2025. It is now read-only.

Tooltip content fails to generate #278

Description

@pique-b

I have been trying to implement tooltip functionality in my Sphinx document for a project.

I have installed hoverxref in my virtual environment and after running the sphinx build, I am unable to see the tooltips being displayed beyond the small tooltip window saying 'Loading...'.

I am using the following to implement the tooltip:

Before a section header, I have added the following label:

.. _my-test-tooltip:

A Section Header
-----------------

Some descriptive texts here...

Some more descriptive texts...

Then from the next section 'A New Section' I am trying to generate the tooltip.

A New Section
--------------

Some texts here...

In this New Section I am implementing the tooltip like this:

This line contains a hoverxref tooltip :hoverxref:`here is a tooltip <my-test-tooltip>`.

However, no tooltip content is generated as stated above.

This is my requyiments.txt:

alabaster==0.7.13
Babel==2.14.0
certifi==2023.11.17
charset-normalizer==3.3.2
docutils==0.20.1
idna==3.6
imagesize==1.4.1
importlib-metadata==7.0.1
Jinja2==3.1.2
MarkupSafe==2.1.3
packaging==23.2
Pygments==2.17.2
requests==2.31.0
snowballstemmer==2.2.0
Sphinx==7.2.6
sphinx-hoverxref==1.3.0
sphinx-togglebutton==0.3.2
sphinxcontrib-applehelp==1.0.7
sphinxcontrib-devhelp==1.0.5
sphinxcontrib-htmlhelp==2.0.4
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.6
sphinxcontrib-serializinghtml==1.1.9
urllib3==2.1.0
zipp==3.17.0

In my config file I have added the following:

extensions = ['sphinx.ext.autodoc',
              ...,
              'hoverxref.extension', << The hoverxref extension added
              ...,              
]

hoverxref_role_types = {
    'hoverxref': 'tooltip',
    'ref': 'tooltip',
    'confval': 'tooltip',
    'mod': 'tooltip',
    'class': 'tooltip',
    }

As stated above, I am working in virtual env and rest of the Sphinx functionalities are working.

Checked this issue Content not loading #224 but find it still open and could not gather a way from it to resolve the issue I am facing.

I am on Python 3.9 and Sphinx v7.2.6.

What do I need to do to make this work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions