wagtail / sphinx-wagtail-theme

Wagtail's documentation theme for Sphinx
https://sphinx-wagtail-theme.readthedocs.io/
MIT License
30 stars 29 forks source link

ReadTheDocs notifications for PR builds and older versions do not show up #296

Closed laymonage closed 3 weeks ago

laymonage commented 4 weeks ago

Not sure how to fix this yet, but it seems we no longer have the admonition that shows up on PR builds and older versions:

Note – You are not reading the most recent version of this documentation. v6.2.2 is the latest version available.

I manually edited that in Wagtail's docs to demonstrate. This used to show up automatically. I think it's added by RTD's script.

The admonition not showing up anymore might be related to the new Read the Docs Addons enabled by default, and that some injected Sphinx context has been removed: https://github.com/readthedocs/readthedocs.org/issues/11474

It seems RTD is moving towards this new Notification add-on:

Image

Which I believe comes from this setting on the dashboard:

Image

However, that new notification popup at the top right seems to only trigger in old versions of Wagtail's docs where we still used RTD's theme:

This leads me to believe there's something in our theme that's causing the toast notification not to show up.

Also, not sure if this is related, but as you can see the old-style admonition doesn't show up in the v2.12 docs. However, in the v2.2 docs https://docs.wagtail.org/en/v2.2.2/, you can see both the old-style admonition and the new toast notification.

laymonage commented 4 weeks ago

Turns out the element is there – but again, Bootstrap messes with it because RTD uses a generic .toast class rather than a namespaced class name.

Image

See opacity: 0; at the bottom right.

I've raised https://github.com/readthedocs/addons/issues/413.

Maybe it's time we move away from Bootstrap too, as noted in https://github.com/wagtail/sphinx-wagtail-theme/issues/254#issuecomment-1987097237...

laymonage commented 3 weeks ago

Fixed in #299