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

Addons: expose readthedocs.resolver.filename in the API response #11940

Merged
merged 4 commits into from
Jan 28, 2025

Conversation

humitos
Copy link
Member

@humitos humitos commented Jan 22, 2025

This is required to be able to dynamically update the URLs from the versions in the flyout when the page is changed using history object (without reloading / SPA) as Docusaurus does.

In that scenario we cannot use the HTML META tag because it was injected with the old value by CF Worker. Note that the CF Worker is not run after the initial request on SPA.

The addons frontend will use this attribute to update those URLs accordingly when the URL changes.

Required by:

This is required to be able to dynamically update the URLs from the versions in
the flyout when the page is changed using `history` object (without reloading /
SPA) as Docusaurus does.

In that scenario we cannot use the HTML META tag because it was injected with
the old value by CF Worker. Note that the CF Worker is not run after the initial
request on SPA.

The addons frontend will use this attribute to update those URLs accordingly
when the URL changes.

Required by:
* readthedocs/addons#504
@humitos humitos requested a review from a team as a code owner January 22, 2025 12:38
@humitos humitos requested a review from stsewd January 22, 2025 12:38
humitos added a commit to readthedocs/addons that referenced this pull request Jan 22, 2025
We cannot use the META HTML tag because it's added only on the first request.
See readthedocs/readthedocs.org#11940
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

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

Tests should be updated on .com

readthedocs/proxito/views/hosting.py Outdated Show resolved Hide resolved
@humitos humitos requested a review from stsewd January 23, 2025 09:15
@humitos humitos merged commit 4534f6a into main Jan 28, 2025
8 checks passed
@humitos humitos deleted the humitos/addons-resolver-filename branch January 28, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants