Comments (8)
@choldgraf I've done this essentially in https://sphinx-tippy.readthedocs.io, feedback welcome 😄
from sphinx-hoverxref.
Hi @choldgraf! Thanks for your suggestion.
I've thought about this already and had two ideas to implement this:
- Embed all the contents of all the tooltips in the same HTML generated by sphinx.
- Make an AJAX request to retrieve the whole content of the target and parse it with JS to get only the content we need.
None of them are trivial and both of them involve increasing the size/load time of each page a lot.
That said, I'm not having the time currently to implement that feature but it's something that I'm not opposed doing in the future. Right now, I'm centered on making the extension more customizable and robust enough to release its first stable version.
Please, share your opinions here or if you already took a look at the code and have an idea about how this could be implemented.
from sphinx-hoverxref.
It seems like the JSONHTMLBuilder
builder could be used, but only in limited capacity. It would require the user of the extension to use the -b json
builder as well, and then maybe a config option that points to where those files were deployed to so they could be loaded with an AJAX request.
from sphinx-hoverxref.
Nothing specifically, I just remember looking into this a little while back and seeing lots of examples like this one which I think uses this jquery plugin. It seems a lot of people use JQuery plugins for this kind of thing and embed the preview in an iframe.
from sphinx-hoverxref.
Just found out this neat little(?) extension. It would be great for .. glossary::
terms.
However, what data is transmitted to RTD site in API calls? I'm hosting company's internal documentation and can't leak any data outside. Standalone site support would be indeed great.
Could it be mentioned on the front page that this is the case - that it now relies on RTD API? Maybe I missed it but at least I couldn't find this information anywhere?
from sphinx-hoverxref.
Just found out this neat little(?) extension. It would be great for
.. glossary::
terms.
If this refers to :term:
role, it does already support it. See #57
However, what data is transmitted to RTD site in API calls? I'm hosting company's internal documentation and can't leak any data outside. Standalone site support would be indeed great.
The documentation must be hosted on Read the Docs.
Could it be mentioned on the front page that this is the case - that it now relies on RTD API? Maybe I missed it but at least I couldn't find this information anywhere?
It's mentioned in the Installation page, at https://sphinx-hoverxref.readthedocs.io/en/latest/installation.html
from sphinx-hoverxref.
It's mentioned in the Installation page, at https://sphinx-hoverxref.readthedocs.io/en/latest/installation.html
Indeed:
I guess I skipped it because it was mentioned in a separate box :) My bad.
from sphinx-hoverxref.
In case there is still interest in implementing this feature, this is the code of backend API that handles some special cases --when there is not enough just return the content of the HTML id
passed: https://github.com/readthedocs/readthedocs.org/blob/efdb6335b715a38a5b0f5bb9d0fe6cf6771ed145/readthedocs/embed/v3/views.py#L152-L243
I don't think that I personally will work on this anytime soon, but I'm happy to help anyone that wants to do it with the design and reviews if the implementation is not super complex and does not require re-writing the whole extension :)
Otherwise, we can just close the issue and come back to it in the future if we get more people interested in collaborating with it.
from sphinx-hoverxref.
Related Issues (20)
- Dependabot: it does not work as expected HOT 1
- Manual references (`.. _quickstart::`) seem to not work properly HOT 1
- Image inside tooltips don't render HOT 3
- Logging: log only once each unknown `typ` HOT 3
- Improve CSS UX of links HOT 2
- Add branding to hover
- Content not loading HOT 3
- Docs: expand "Who is using it" with project's descriptions
- Dark mode support HOT 3
- test_intersphinx_all_mappings is unstable
- Help with packaging `sphinx-hoverxref` for `conda-forge` HOT 10
- support sphinx 6.0 without jquery HOT 2
- Start a stand alone JS package for hoverxref HOT 3
- Support Markdown links on MyST HOT 9
- Support sphinx-design tabs HOT 3
- Internal References not displaying on Hidden builds. HOT 4
- https://github.com/readthedocs/sphinx-hoverxref/blob/6ff2d6007bbc8a5b84da87d2b7a87c8bb8205153/hoverxref/domains.py#L1 HOT 1
- Tooltip content fails to generate HOT 3
- Broken rendering of 'usage' page on readthedocs HOT 3
- Tooltip Content Not Generating with Read the Docs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sphinx-hoverxref.