Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Sphinx theme used for Zope documentation #1221

Merged
merged 8 commits into from
Aug 8, 2024

Conversation

dataflake
Copy link
Member

In a discussion about the never ending annoyance that the currently used sphinx_rtd_theme forbids the latest docutils (-> #1220) Steve Piercy suggested two other themes, the plone-sphinx-theme that is now used for Plone 6 documentation, and furo, another lightweight and modern theme.

This PR updates all compatible dependencies and switches the documentation theme to furo. You can test it all locally and look at the furo-themed documentation by running bin/tox -edocs and then opening the page at docs/_build/html/index.html.

This PR is a suggestion, not a "must". I do like the theme and as a maintainer I do like the fact that I have to stop worrying about dependency restrictions that make no sense.

I have taken a quick look at plone-sphinx-theme as well, but it explicitly only supports Python 3.9 and up with no fallback for Python 3.8. I respect the Plone team's decision to drop Python 3.8 support, but we're not there yet. Our documentation should build on all Python versions supported by Zope.

Copy link

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

I'm not sure about the conflicting versions of docutils and Sphinx in these changes. Should they be consistent or different?

versions.cfg Show resolved Hide resolved
constraints.txt Show resolved Hide resolved
docs/requirements.txt Show resolved Hide resolved
versions.cfg Show resolved Hide resolved
versions.cfg Show resolved Hide resolved
@dataflake
Copy link
Member Author

I'm not sure about the conflicting versions of docutils and Sphinx in these changes. Should they be consistent or different?

They are different for Python 3.8 because Sphinx 8 does not support Python 3.8. That means there must be a separate lower pin for Sphinx, which in turn requires a separate lower pin for docutils. The section with the lower pins only applies on Python 3.8.

stevepiercy
stevepiercy previously approved these changes Aug 7, 2024
Copy link

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

Thanks for the explanation. I overlooked the section header.

d-maurer
d-maurer previously approved these changes Aug 8, 2024
constraints.txt Outdated Show resolved Hide resolved
requirements-full.txt Outdated Show resolved Hide resolved
@dataflake dataflake dismissed stale reviews from d-maurer and stevepiercy via 590d1cb August 8, 2024 05:46
Copy link
Member

@icemac icemac left a comment

Choose a reason for hiding this comment

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

LGTM from reading through the diff. I did not take a look at the result.

@dataflake dataflake merged commit a1d559f into master Aug 8, 2024
28 checks passed
@dataflake dataflake deleted the dataflake/deps_update_sphinx_theme_change branch August 8, 2024 06:51
@mauritsvanrees
Copy link
Member

Thanks!

For those who want to compare:

@dataflake
Copy link
Member Author

If you compare https://zope.readthedocs.io/en/4.x/INSTALL.html and https://zope.readthedocs.io/en/latest/INSTALL.html you can also see how local tables of content are handled. They are stuck in their fixed location on the page with the RTD theme and thus scroll out of view while remaining in view on the right hand side with the furo theme.

@stevepiercy
Copy link

Dark mode and better typography in Furo eases my eye strain, too. The right-side navigation also has scroll-spy, highlighting the current location within the page.

@dataflake
Copy link
Member Author

"scroll spy" - cool term. Never heard that before.

@stevepiercy
Copy link

I first saw it Twitter Bootstrap. https://getbootstrap.com/docs/3.4/javascript/#scrollspy

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.

5 participants