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

Default hoverxref_api_host to the proxied API #134

Merged
merged 5 commits into from
Mar 28, 2023
Merged

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Jun 30, 2021

This also doesn't require .com users changing anything to use the extension.

@stsewd stsewd requested review from a team and humitos June 30, 2021 22:14

Default: ``https://readthedocs.org``
Default: ``/_``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we only want to default this value when running on RTD, don't we? For dev setup this will cause weird breakage for a lot of users.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's documented that this should be changed to rtd.org in the dev docs, for the docs of this extension we are checking if we are running on rtd

# Used when building the documentation locally.
if os.environ.get('READTHEDOCS') != 'True':
hoverxref_api_host = 'https://readthedocs.org'

People testing this locally will need to define the hoverxref_project and hoverxref_version anyway.

@humitos
Copy link
Member

humitos commented Sep 29, 2021

It would be good to update this PR. I think we need:

  • default host to readthedocs.org
  • change the host to _/ if running on Read the Docs and the host was not manually defined by the user
  • remove mentions to hoverxref_project and hoverxref_version since they are not needed anymore

@ericholscher
Copy link
Member

Bumping this, since I had a customer just run into this. Would be good to enable this.

@stsewd stsewd requested review from a team as code owners March 22, 2023 18:44
@stsewd stsewd requested review from benjaoming and removed request for a team and benjaoming March 22, 2023 18:44
@stsewd
Copy link
Member Author

stsewd commented Mar 22, 2023

Changed to just default to /_ for the API host. Looks like the current implementation just sends the current URL to the API, so doesn't look like there is an easy way to test the extension locally.

@ericholscher
Copy link
Member

I think this change makes sense, but also want to make sure we have a plan moving forward w/ hoverxref support in readthedocs-client. So leaving the review to @humitos to coordinate.

@humitos
Copy link
Member

humitos commented Mar 28, 2023

want to make sure we have a plan moving forward w/ hoverxref support in readthedocs-client.

My plan is that hoverxref/tooltips re-implemented there 1 and this extension won't be needed anymore in the future. In my opinion, we should eventually deprecate this Sphinx extension and archive the repository.

However, we could keep this extension if we want to have full control of where (on what Sphinx roles) to show tooltips -- which is the complex part of this extension and something you never liked too much since you want tooltips everywhere 😄 . Anyways, something to consider when talking about the user's API in readthedocs/addons#13

Footnotes

  1. in fact that work is already done --there is some CSS style things missing and lot of conversations, tho 😄

@stsewd stsewd merged commit 0924e62 into main Mar 28, 2023
@stsewd stsewd deleted the default-to-proxied-api branch March 28, 2023 15:45
@stsewd
Copy link
Member Author

stsewd commented Mar 28, 2023

We should do a new release with this change

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants