Skip to content

Fix Japanese nested page missing interactive scene iframe content#645

Draft
tkoyama010 wants to merge 4 commits into
mainfrom
fix/607-japanese-missing-iframe-content
Draft

Fix Japanese nested page missing interactive scene iframe content#645
tkoyama010 wants to merge 4 commits into
mainfrom
fix/607-japanese-missing-iframe-content

Conversation

@tkoyama010
Copy link
Copy Markdown
Member

@tkoyama010 tkoyama010 commented Mar 29, 2026

Fix #607

Use doctreedir.parent instead of outdir.parent as the build root in the offlineviewer directive. With mini18n_build_style = "nested", the Japanese sub-build outputs to build/mini18n-html/ja/, so outdir.parent becomes build/mini18n-html/ instead of build/, causing the vtksz asset lookup to fail and leaving the Interactive Scene tab empty.

tkoyama010 and others added 2 commits March 29, 2026 13:40
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>
@tkoyama010 tkoyama010 marked this pull request as draft March 29, 2026 04:42
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 29, 2026

- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Japanese nested page missing interactive scene iframe content

1 participant