-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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: integrate with new beta addons flyout #1526
Conversation
Initial experimentation to use the `CustomEvent` triggered by the addons called `readthedocsdataready` event (from readthedocs/addons#64) to build the Read the Docs flyout being integrated into the theme keeping the original look & feel. * Related: readthedocs/addons#64 * Closes #1523
This is because we are not executing the Read the Docs magic that modifies the `conf.py` file on the fly :/
Noted on a call today, we should start trying out these changes for some of our own projects to start. This would serve as a working example for other authors, and gives us something to test against. |
This can be disabled per-project by using the settings UI from the dashboard.
Use the current pattern to translate string generated for the flyout.
With the latest changes, it looks great to me! I think we are ready to merge readthedocs/readthedocs.org#11279 so we can start testing it out in our documentation. |
Yeah lets merge the docs PR 👍 This seems close enough to start testing |
…11279) * Docs: use the `sphinx-rtd-theme` with support for addons integration Installs a version of our theme from a pull request that has support for the Addons integration using the `CustomEvent`. Related: readthedocs/sphinx_rtd_theme#1526 Requires: #11205 * Disable fail on warning temporary * Delete doc-diff since it's included in addons now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed next steps here today, and I think to consider an alpha/beta release of this, we should use the existing patterns for JS/CSS instead. Besides that, this all seems fairly close.
We talked about testing this with more internal projects, which is a good step as well. I don't see to much changing besides finishing the JS/CSS.
Run `npm ci` and `npm run build` using NodeJS 14.20.1.
I made the requested changes 👍🏼 . It seems everything keeps working fine: https://docs.readthedocs.io/en/latest/ |
Failing tests are unrelated with the changes on this PR. It seems the latest Sphinx/docutils version changed something in the HTML structure and we will need to update our test case. |
@agjohnson can you take a look at this PR? I'd like to move forward with an alpha release, so we can start testing it with some particular users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't had time to do too deep a review here, but this looks like it should be close enough. 👍
We'll likely need to use the beta period to debug issues with this a bit, as it can be hard to code defensively in string interpolations.
Cool! I'm merging this PR now. We can coordinate the release of an alpha/beta version after that 👍🏼 |
Initial experimentation to use the
CustomEvent
triggered by the addons calledreadthedocs-addons-data-ready
event (from readthedocs/addons#64) to build the Read the Docs flyout being integrated into the theme keeping the original look & feel.How to test it
READTHEDOCS
variablehumitos/custom-event
branchlocalhost
here)Example
Note
I added these lines in
versions.html
and also hardcoded the URL to hit in the
readthedocs-config.js
addons file asand used Firefox CORS Addon to allow CORS with the development instance
<meta>
to define supported API version and triggerCustomEvent
addons#64