Skip to content

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Nov 29, 2025

Right now, the release cycle SVGs are monochrome when viewed as standalone images:

image

This is because all the colours are defined in the website's own .css file.

This PR moves the colours into the SVG files themselves, except for the theme-aware overrides using things like --color-foreground-primary from Furo, needed for dark/light mode support.

Also serve these images, so we can display them on https://www.python.org/downloads/ where our end users visit, and not just in the CPython developer's guide. Re: https://endoflife.date/recommendations#bad---python

Needed for PR: pythondotorg#2837


📚 Documentation preview 📚: https://cpython-devguide--1708.org.readthedocs.build/

conf.py Outdated
Comment on lines 40 to 43
html_extra_path = [
'include/release-cycle.svg',
'include/release-cycle-all.svg',
]
Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed? Semantically, I think we should prefer static path to extra path: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_extra_path

A list of paths that contain extra files not directly related to the documentation

A

Copy link
Member Author

Choose a reason for hiding this comment

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

Why is this needed?

So that they're served at https://devguide.python.org/release-cycle.svg

Semantically, I think we should prefer static path to extra path: sphinx-doc.org/en/master/usage/configuration.html#confval-html_extra_path

A list of paths that contain extra files not directly related to the documentation

A

Okay, so have the generate script save them to _static, and have them served at https://devguide.python.org/_static/release-cycle.svg ?

I've pushed a commit for this.

@encukou
Copy link
Member

encukou commented Dec 1, 2025

Would it make sense to provide light, dark, and “responsive” variants?
More generally: is this just for python.org, or do we want others to easily reuse this?

If we decide that serving 3×2 static images, rather than 2, is worth it, I'd prefer doing the related changes myself -- I can clean up and adjust the CSS while doing that.

@hugovk
Copy link
Member Author

hugovk commented Dec 1, 2025

Right now this is just for python.org which only has a light theme.

No objections to making more variants in the future, and I'm happy for you to do it.

What would a "responsive" variant be? The SVG is already, well, scalable :)

- Use CSS variables from outside if present
- Use light or dark theme
- Add an outline to labels to improve readability (especially on
  incompatible background colours, and above the day line)
- Reorder elements to improve readability (put text on top of
  the day line)
@encukou
Copy link
Member

encukou commented Dec 1, 2025

What would a "responsive" variant be? The SVG is already, well, scalable :)

Responding to the user's light/dark preference :)

I've sent my suggestions here: hugovk#36

@hugovk
Copy link
Member Author

hugovk commented Dec 3, 2025

Thanks, hugovk#36 merged!

image

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.

3 participants