Fix Japanese nested page missing interactive scene iframe content#645
Draft
tkoyama010 wants to merge 4 commits into
Draft
Fix Japanese nested page missing interactive scene iframe content#645tkoyama010 wants to merge 4 commits into
tkoyama010 wants to merge 4 commits into
Conversation
Add a Sphinx extension that overrides the upstream ``offlineviewer`` directive to use ``doctreedir.parent`` instead of ``outdir.parent`` as the build root. With ``mini18n_build_style = "nested"``, the Japanese sub-build outputs to ``build/mini18n-html/ja/``. ``pyvista.ext.viewer_directive`` computes the build root as ``outdir.parent = build/mini18n-html/``, but the vtksz assets generated by ``plot_directive`` live under ``build/plot_directive/…``. The ``is_path_relative_to`` check therefore fails and the directive returns an empty node list, leaving the Interactive Scene tab blank. Both the primary (English) and the mini18n language sub-builds share the same ``doctreedir`` (``build/.doctrees``), so ``doctreedir.parent = build/`` is the correct, consistent build root for all builders. Fixes #607 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
for more information, see https://pre-commit.ci
Contributor
- Replace f-strings in logger calls with % formatting (G004) - Move Directive import to module level (PLC0415) - Rename FixedClass variable to snake_case (N806) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #607
Use
doctreedir.parentinstead ofoutdir.parentas the build root in theofflineviewerdirective. Withmini18n_build_style = "nested", the Japanese sub-build outputs tobuild/mini18n-html/ja/, sooutdir.parentbecomesbuild/mini18n-html/instead ofbuild/, causing the vtksz asset lookup to fail and leaving the Interactive Scene tab empty.