Skip to content

Conversation

@stichbury
Copy link
Contributor

@stichbury stichbury commented Dec 10, 2025

Closes https://github.com/McK-Internal/vizro-internal/issues/2316 by transitioning Vizro, Vizro-MCP and Vizro-AI docs over from MkDocs to Zensical.

Description

Ready for review! You can see the builds on RtD:

While I have created a new zensical.toml file (rather than just use the existing mkdocs.yml) we have had to revert to use the mkdocs.yml for now because of an issue with PyCafe. I will update as soon as the fix is in place from Zensical because using the toml format means we can pick up new features as they're added.

The settings are almost identical, but I added the feature header.autohide to increase viewport when scrolling down the page and added the feature navigation.path for breadcrumbs. We also now have light/dark theme support.

Issues

(a) There are some unsupported settings which we used -- like strict building. I think this is important but it's not here, so that means we could break an internal link and it won't be flagged. That's not ideal IMO but we may be able to catch these with a linkchecker instead, and it's in the backlog for Zensical to provide it.

(b) PyCafe isn't working at present but I have identified the reason (probably) and raised an issue. Resolved by using mkdocs.yml while awaiting fix for the issue.

(c) The llms-md buttons aren't working at present and that's another priority to investigate. Now fixed

Screenshot

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

    • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
    • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorized to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
    • I have not referenced individuals, products or companies in any commits, directly or indirectly.
    • I have not added data or restricted code in any commits, directly or indirectly.

@stichbury stichbury self-assigned this Dec 10, 2025
Copilot AI review requested due to automatic review settings December 10, 2025 18:09
@stichbury stichbury added the Docs 🗒️ Issue for markdown and API documentation label Dec 10, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

View the example dashboards of the current commit live on PyCafe ☕ 🚀

Updated on: 2025-12-18 15:05:04 UTC
Commit: a8b5216

Compare the examples using the commit's wheel file vs the latest released version:

vizro-core/examples/scratch_dev

View with commit's wheel vs View with latest release

vizro-core/examples/dev/

View with commit's wheel vs View with latest release

vizro-core/examples/visual-vocabulary/

View with commit's wheel vs View with latest release

vizro-core/examples/tutorial/

View with commit's wheel vs View with latest release

This comment was marked as resolved.

@github-actions github-actions bot added the Vizro-AI 🤖 Issue/PR that addresses Vizro-AI package label Dec 15, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

@huong-li-nguyen huong-li-nguyen left a comment

Choose a reason for hiding this comment

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

I mostly looked at the rendered docs, they look fine 👍

Copy link
Contributor

@petar-qb petar-qb left a comment

Choose a reason for hiding this comment

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

First of all, I’m impressed by how fast the documentation is built with Zensical!! 🚀

@stichbury, huge thanks for such a quick and smooth migration to Zensical. Really impressive work 🥇 ❤️

I’m not an expert when it comes to documentation tooling and yml/toml files behind it, so this is a humble, high-level review. That said, the docs definitely look and feel better, especially the search experience, and the build times are noticeably faster.

Zensical is still quite new, but it already shows a lot of promise and will likely evolve faster than our previous mkdocs setup.

Copy link
Contributor

@maxschulz-COL maxschulz-COL left a comment

Choose a reason for hiding this comment

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

I definitely see some issues in the rendered docs (atm checking on RtD) - see below:

image

pip = '"{env:HATCH_UV}" pip {args}'
pycafe-links = "../tools/pycafe/docs_links_filtering.sh"
serve = "mkdocs serve --open {args}"
serve = "zensical serve --open"
Copy link
Contributor

Choose a reason for hiding this comment

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

I naively tried to run this locally, and it gives me the following error:

hatch run docs:serve
Serving /Users/Maximilian_Schulz/Documents_no_backup/Python/Vizro/vizro/vizro-core/site on http://localhost:8000
Build started
Error: AttributeError: Failed to initiate extension 'mkdocstrings': module 'mkdocstrings' has no attribute 'makeExtension

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You will be able to run locally but still need the mkdocstrings package as a dependency.

Copy link
Contributor

Choose a reason for hiding this comment

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

What does that mean? Do I need to install it manually? Should this not work with the hatch command?

@stichbury
Copy link
Contributor Author

stichbury commented Dec 18, 2025

I definitely see some issues in the rendered docs (atm checking on RtD) - see below:

image

@maxschulz-COL My friend, Cursor, and I have worked on this. This is the analysis:

Zensical doesn't currently support the autorefs plugin, which is part of the mkdocstrings ecosystem in MkDocs. This plugin automatically resolves reference-style links like [vizro.models.Graph] to the correct API documentation URLs.
Since Zensical is still in early development (version 0.0.11), it hasn't yet implemented support for all MkDocs plugins, including autorefs.

I have prevailed on Cursor to make content changes across the docs to accommodate this issue, and they are all in a single commit.

See this page rebuilt now for example

Copy link
Contributor

@maxschulz-COL maxschulz-COL left a comment

Choose a reason for hiding this comment

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

I think we are still not there, see comments

Copy link
Contributor

Choose a reason for hiding this comment

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

Many of the settings here are shuffled around, why is that? Makes it a little harder to review to see what is new and what just changed place

pip = '"{env:HATCH_UV}" pip {args}'
pycafe-links = "../tools/pycafe/docs_links_filtering.sh"
serve = "mkdocs serve --open {args}"
serve = "zensical serve --open"
Copy link
Contributor

Choose a reason for hiding this comment

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

What does that mean? Do I need to install it manually? Should this not work with the hatch command?

Copy link
Contributor

Choose a reason for hiding this comment

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

I found some more occurences. These originate from the docstrings itself. This was found by just clicking around..

image


# Strictest settings possible, and will be elevated to ERROR when run with --strict.
# See https://www.mkdocs.org/user-guide/configuration/#validation.
# Keep these for now as strict building will be enabled by Zensical soon
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we not also keep the old comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we need it -- we aren't explaining all the other settings in the file and some of those are far less evident from their naming.

@stichbury
Copy link
Contributor Author

Setting this PR aside for now.

Note that I reverted this commit (e6078819773f90d740f0172d37668669eb0d646b) to deal with the fact that autorefs is not supported. It means that API refdocs aren't correctly linked, but we should ideally hold out for that support to be added before we adopt Zensical.

The other ideals would be:

  • Python 3.14 support
  • kwds argument support for superfences so that we can use the .toml file to specify our docs build and still enable PyCafe linking
  • strict building and other validation

@stichbury stichbury closed this Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs 🗒️ Issue for markdown and API documentation Vizro-AI 🤖 Issue/PR that addresses Vizro-AI package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants