nilearn / nilearn

Machine learning for NeuroImaging in Python
http://nilearn.github.io
Other
1.19k stars 602 forks source link

Standardize footer of reports #4300

Closed Remi-Gau closed 5 months ago

Remi-Gau commented 8 months ago

The GLM reports mention Nilearn and links to the repo.

This should be extended to all reports

image

emdupre commented 8 months ago

Does it make sense to extend it to all reports ? For the standalone HTML pages, I could see the need, but would you also add it e.g., to a jupyter cell output of a NiftiMasker report ? In the latter case, I don't think we'd want a footer.

Remi-Gau commented 8 months ago

In the latter case, I don't think we'd want a footer.

Can you tell me more about why you'd think it'd be an issue if the report in that cell output had a footer?

emdupre commented 8 months ago

The standalone HTML reports were designed to be distributed independently, but the within-jupyter calls will be distributed within a notebook (by definition) that will also contain the originating code.

So, in the case of standalone pages, the footer will help to keep provenance --- which is great, I think ! But in the within-jupyter case, it's at best redundant and at worst distracting for those working in a notebook.

Remi-Gau commented 8 months ago

Note that the PR #4307 was extracted from #4295 to not block the latter until this discussion is resolved.

Remi-Gau commented 8 months ago

@emdupre This convo makes me realize that we may want to have some code to run some notebook to check that the reports still look good in a notebook. Maybe as a follow up to #4295

Remi-Gau commented 8 months ago

OK I just checked a couple of reports in a notebook and there would some fixing to do (will open a separate issue) but I'd rather get to this once:

Remi-Gau commented 8 months ago

To check how reports look (as of #4295) I created this notebook.

https://github.com/Remi-Gau/nilearn/blob/notebooks/doc/visual_testing/visualize_reports_in_notebook.ipynb

Apparently the images cannot be viewed in the github file browser so it needs to be downloaded to view them.

For this discussion: I am not finding the footer of the GLM reports too distracting at the moment, so I am still mildly inclined to have them everywhere.

More complicated but could maybe look on how to hide the footer in notebooks only but not sure how to best do this (maybe some css magic).

Remi-Gau commented 8 months ago

Related to improving how reports looks in notebooks:

bthirion commented 8 months ago

When I download the nb I can't see the report...

Remi-Gau commented 8 months ago

Hum... I must have messed something. Will check tomorrow.

bthirion commented 8 months ago
  • why are the maskers reports so narrow by default?

No idea. These reports were probably a bit minimalist at the origin, hence a narrow layout would be OK.