Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 16, 2025

The Japanese documentation builds with atsphinx.mini18n nested mode place pages in html/ja/... instead of html/..., but PyVista's OfflineViewerDirective calculated relative paths without accounting for the extra directory level.

Changes

  • Patched OfflineViewerDirective in doc/source/conf.py: Detects nested non-default language builds and prepends an additional ../ to iframe paths
    • English (default): ../../_static/static_viewer.html → unchanged
    • Japanese (nested): ../../_static/static_viewer.html../../../_static/static_viewer.html

The directive checks mini18n_build_style == 'nested' and compares current language against mini18n_default_language to determine when path adjustment is needed.

# For nested non-default language builds, add extra "../" to account for language directory
if is_nested_non_default:
    rel_viewer_path = (
        Path() / '..' / relpath_to_source_root / '_static' / Path(HTML_VIEWER_PATH).name
    ).as_posix()

The patched directive overrides PyVista's default using app.add_directive('offlineviewer', PatchedOfflineViewerDirective, override=True).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • docs.python.org
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -M html source build -W --keep-going --as-needed -shared -z relro -o .Cor�� (dns block)
  • docs.pyvista.org
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -M html source build -W --keep-going --as-needed -shared -z relro -o .Cor�� (dns block)
  • docs.scipy.org
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -M html source build -W --keep-going --as-needed -shared -z relro -o .Cor�� (dns block)
  • matplotlib.org
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -M html source build -W --keep-going --as-needed -shared -z relro -o .Cor�� (dns block)
  • numpy.org
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -M html source build -W --keep-going --as-needed -shared -z relro -o .Cor�� (dns block)
  • pandas.pydata.org
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -M html source build -W --keep-going --as-needed -shared -z relro -o .Cor�� (dns block)
  • qtdocs.pyvista.org
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -M html source build -W --keep-going --as-needed -shared -z relro -o .Cor�� (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Japanese nested page missing interactive scene iframe content</issue_title>
<issue_description>## Issue Description

There is a discrepancy between the English and Japanese nested pages. The Japanese version is missing the interactive scene iframe content that is present in the English version.

English Version

Interactive Scene</label><div class="sd-tab-content docutils">
<iframe src='../../_static/static_viewer.html?fileURL=../_images/plot_directive/tutorial/00_intro/index-1_00_00.vtksz' width='100%%' height='400px' frameborder='0'></iframe></div>
</div>

Japanese Version

インタラクティブなシーン</label><div class="sd-tab-content docutils">
</div>

Expected Behavior

The Japanese version should include the same iframe content as the English version, displaying the interactive scene viewer.

Actual Behavior

The Japanese version has an empty tab content div with no iframe element.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Dec 16, 2025
Copilot AI changed the title [WIP] Fix missing interactive scene iframe content in Japanese page Fix Japanese nested page missing interactive scene iframe Dec 17, 2025
Copilot AI requested a review from tkoyama010 December 17, 2025 00:09
@github-actions
Copy link
Contributor

@tkoyama010 tkoyama010 closed this Dec 17, 2025
@tkoyama010 tkoyama010 deleted the copilot/fix-japanese-nested-page-iframe branch December 17, 2025 07:27
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.

Japanese nested page missing interactive scene iframe content

2 participants