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

Debug: trigger Read the Docs Addons event to test/debug locally #1606

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

humitos
Copy link
Member

@humitos humitos commented Sep 20, 2024

Use a mocked JSON to trigger the event that Read the Docs Addons triggers when serving docs on production.

You can build the docs via:

sphinx-autobuild -E docs docs/_build/html

and then open http://127.0.0.1:8000 locally to see it in action.

Closes #1605

@agjohnson
Copy link
Collaborator

Are you not using npm run dev? There shouldn't be any manual commands necessary for development like that. The changes here look like they'll be usable either way, npm run dev doesn't do anything special during the Sphinx build.

Copy link
Collaborator

@agjohnson agjohnson left a comment

Choose a reason for hiding this comment

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

Looks good besides the missing data 👍

docs/_static/debug.js Show resolved Hide resolved
@humitos
Copy link
Member Author

humitos commented Sep 20, 2024

Are you not using npm run dev?

Interesting. I was not using this. I just tested it and it works great 💯

@humitos humitos merged commit 3d795d2 into humitos/selectors Sep 20, 2024
6 of 7 checks passed
@humitos humitos deleted the humitos/debug branch September 20, 2024 17:55
humitos added a commit that referenced this pull request Sep 20, 2024
* Show version/language selectors below the title

* Use CSS styles from old attempt

#438

* Update CSS to apply to both selectors

* Prepend the current version if it's hidden

* Split it into two different configs

* Use correct value for language

* Make the selectors more prominent

* Typo fix on comment

* Update CSS

* Update JavaScript

* Always include the version javascript

* Only include the languages if there is one

* Change `display_version` default

* HTML layout rework

* Update docs

* HTML layout fix

* Docs typo

* Update CSS

* Updates from review

* re-compile CSS

* Update CSS

* Apply suggestions from code review

Co-authored-by: Eric Holscher <[email protected]>

* Use the prettier to lint the file

* Whitespaces

* Update event listener

* Update CSS

* Update CSS

* Remove language switch if there are not translations

* Tune version and language selector styles (#1603)

* Tuning on select width and icon placement

* Use better cursor

* Add a max width to selects so that they can't overflow

* Only add after pseudo element if select exists

* Lint

* Debug: trigger Read the Docs Addons event to test/debug locally (#1606)

* Debug: trigger Read the Docs Addons event to test/debug locally

Closes #1605

* Push missing file

---------

Co-authored-by: Eric Holscher <[email protected]>
Co-authored-by: Anthony <[email protected]>
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