Skip to content

Fix the tedana report embedding and the walkthrough figures page - #99

Merged
tsalo merged 4 commits into
mainfrom
fix-page-rendering
Nov 14, 2026
Merged

tsalo merged 4 commits into
mainfrom
fix-page-rendering

Conversation

@tsalo

@tsalo tsalo commented Nov 14, 2026

Copy link
Copy Markdown
Member

Problems

  • Denoising with tedana: the page injected the whole tedana report document into a cell output. The report's stylesheets overrode the book theme (the navigation bar disappeared), its figures pointed to a folder that is not part of the built site (none were shown), and it was confined to the width of the cell (cropped).
  • Walkthrough figures (plot_approach_figures): excluded from execution because it referred to an undefined func_dir and a T1w file that is not in ds006185.
  • Two stray README files (data/nilearn/README.md, notebooks/README_notebooks.md) were picked up as book pages and raised toctree warnings.

Fixes

  • New book_utils.export_html_report copies the report and its figures folder to content/figures/html_extra/tedana_report/. That folder is served through html_extra_path, and it travels to CI in the execution bundle with the rest of content/figures. The page embeds the report in a full-width iframe, with a link to open it in its own tab. The report keeps its own CSS and scripts, so the book theme is untouched.
  • make book creates content/figures/html_extra first, because Sphinx drops an html_extra_path entry that does not exist when the build starts.
  • plot_approach_figures runs again and is no longer excluded: file names fixed, echo times in milliseconds, the T1w background resampled onto the BOLD grid with the coregistration transform, component maps indexed by component number, and an empty log-scale plot fixed.
  • 00_Download_Data lists the two extra files those figures need (preprocessed T1w and the boldref-to-T1w transform).
  • data/** and notebooks/** are excluded from the book sources.

Verification

  • Local build: all 20 notebooks are cached and the build finishes with no warnings.
  • The published execution-cache bundle already contains the executed tedana and walkthrough-figures pages and the exported report.
  • Checked in a browser through the DOM: on the tedana page the sidebar is present with its links, the iframe is 1050 px wide in a 1400 px viewport, and the report loads its 9 figures with no broken images. I could not take screenshots in this session, so the page has not been looked at by eye.

🤖 Generated with Claude Code

…notebook

The tedana report was displayed by pasting its HTML into a cell output. Its
stylesheets overrode the book theme (hiding the navigation bar), its figures
pointed outside the built site, and it was confined to the width of the cell.
The report and its figures are now copied into the site and shown in a
full-width iframe.

plot_approach_figures.md was excluded from execution because it failed. It now
runs: define func_dir, use the T1w file name in ds006185, apply the inverse of
the boldref-to-T1w transform, convert echo times to milliseconds, index the
component weights by component, and fit the axis limits to the data.

Also keep data/ and notebooks/ out of the Sphinx sources.
@tsalo
tsalo merged commit 710e1a9 into main Nov 14, 2026
2 checks passed
@tsalo
tsalo deleted the fix-page-rendering branch November 14, 2026 18:15
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.

1 participant