Skip to content

Conversation

@drammock
Copy link
Member

@drammock drammock commented Jul 22, 2025

closes #12558
closes #13340 (supersedes; that PR is fixing it in the wrong place)

WIP; fixing the jquery pageload errors first, so that we can hopefully see the version switcher errors surface.

@drammock drammock marked this pull request as ready for review July 22, 2025 20:55
<li><a href="{{ pathto('auto_tutorials/index.html', 1) }}"><i class="fas fa-book fa-fw"></i> Tutorials</a></li>
<li><a href="{{ pathto('development/whats_new.html', 1) }}"><i class="fas fa-newspaper fa-fw"></i> Changelog</a></li>
<li><a href="{{ pathto('help/index.html', 1) }}"><i class="fas fa-circle-question fa-fw"></i> Get help</a></li>
<li><a href="{{ pathto('help/index.html', 1) }}"><i class="fas fa-circle-question fa-fw"></i> Get Help</a></li>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capitalize H in "Get Help" (somebody requested this)

copyright = ( # noqa: A001
f'2012–{td.year}, MNE Developers. Last updated <time datetime="{td.isoformat()}" class="localized">{td.strftime("%Y-%m-%d %H:%M %Z")}</time>\n' # noqa: E501
'<script type="text/javascript">$(function () { $("time.localized").each(function () { var el = $(this); el.text(new Date(el.attr("datetime")).toLocaleString([], {dateStyle: "medium", timeStyle: "long"})); }); } )</script>' # noqa: E501
'<script type="text/javascript">function formatTimestamp() {document.querySelectorAll("time.localized").forEach(el => el.textContent = new Date(el.getAttribute("datetime")).toLocaleString([], {dateStyle: "medium", timeStyle: "long"}));};if (document.readyState != "loading") formatTimestamp();else document.addEventListener("DOMContentLoaded", formatTimestamp);</script>' # noqa: E501
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

purge JQuery from timestamp localizer script (wasn't working because $ not defined; we don't have globally available JQuery anymore)

# further. For a list of options available for each theme, see the
# documentation.
switcher_version_match = "dev" if ".dev" in version else version
switcher_version_match = "dev" if ".dev" in release else version
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure when this changed / stopped working, but above, version is defined as X.Y and release is the full __version__ string (incl. the .devZZZZZZZ part, if present)

@drammock
Copy link
Member Author

Note that there are still page-load errors in the browser console, but they're bubbling up from bootstrap

Uncaught TypeError: can't access property "addEventListener", document.getElementById(...) is null
[bootstrap.js:30:22](webpack://pydata_sphinx_theme/src/pydata_sphinx_theme/assets/scripts/bootstrap.js)
    <anonymous> bootstrap.js:30
    mo mixin.js:11
    <anonymous> bootstrap.js:57
    <anonymous> bootstrap.js:60

we only use bootstrap in our reports, but it comes via Webpack from PyData Sphinx Theme. Strangely, I don't see those errors on the theme's own website, not sure why not.

@drammock
Copy link
Member Author

version switcher is working:

Screenshot 2025-07-22 at 16-44-26 MNE — MNE 1 11 0 dev17 g4c38943b5 documentation

Also the capitalization:

Screenshot 2025-07-22 at 16-44-59 MNE — MNE 1 11 0 dev17 g4c38943b5 documentation

and the localization of the last-built timestamp:

Screenshot 2025-07-22 at 16-45-59 MNE — MNE 1 11 0 dev17 g4c38943b5 documentation

So I'll mark for merge-when-green

@drammock drammock enabled auto-merge (squash) July 22, 2025 21:46
@larsoner
Copy link
Member

Great, thanks @drammock !

@drammock drammock merged commit 17c7929 into mne-tools:main Jul 22, 2025
33 of 34 checks passed
@drammock drammock deleted the website branch July 22, 2025 22:03
@cbrnr
Copy link
Contributor

cbrnr commented Jul 23, 2025

@drammock the change in #13340 is still required, because it affects the navbar menu entry. You only changed the sidebar entry here:

Screenshot 2025-07-23 at 08 22 36

Also, can we talk about using "dev" instead of "devel" for our development version? "dev" is much more common nowadays, "devel" is primarily used for Debian package naming. Basically all Python projects use "dev" (e.g., NumPy, pandas, Scikit-Learn, Matplotlib, Bokeh, ...).

@hoechenberger
Copy link
Member

Very nice, thank you, @drammock

@drammock
Copy link
Member Author

@drammock the change in #13340 is still required

Ah my mistake! I've now merged that one too

can we talk about using "dev" instead of "devel" for our development version?

Open a new issue please

larsoner added a commit to larsoner/mne-python that referenced this pull request Jul 23, 2025
* upstream: (115 commits)
  Capitalize Get Help (mne-tools#13340)
  Website page load fixes (mostly) (mne-tools#13343)
  MAINT: Restore statsmodels to pip-pre (mne-tools#13345)
  BUG: Fix bug with reading old reports (mne-tools#13341)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13338)
  MAINT: Fix ref cycle with vtkPolyData (mne-tools#13336)
  MAINT: Dont set private attributes for PyVista Actor (mne-tools#13334)
  Add icon links to our donation pages (mne-tools#13331)
  MAINT: Dont set attribute on PolyData (mne-tools#13330)
  MAINT: Bump mins, deprecations (mne-tools#13322)
  Fix changes in SSD for backward compatibility [circle deploy] (mne-tools#13327)
  ENH: Add GED transformer (mne-tools#13259)
  FIX: Links
  MAINT: Stabilize MxNE tests (mne-tools#13321)
  FIX: DigMontage.rename_channels should return self (mne-tools#13320)
  MAINT: Prep for release (mne-tools#13319)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13317)
  MAINT: Update code credit (mne-tools#13318)
  MAINT: Make MxNE test more robust (mne-tools#13315)
  Adjust Pupil channel units (again) (mne-tools#13314)
  ...
WouterKroot pushed a commit to WouterKroot/mne-python that referenced this pull request Aug 13, 2025
zEdS15B3GCwq pushed a commit to zEdS15B3GCwq/mne-python that referenced this pull request Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Layout issues in documentation (horizontal navbar)

4 participants