posit-dev / py-shiny

Shiny for Python
https://shiny.posit.co/py/
MIT License
1.24k stars 72 forks source link

docs: Upgrading Core links to Express links isn't always wanted #1315

Open gadenbuie opened 5 months ago

gadenbuie commented 5 months ago

The quartodocs rendering process finds shiny.ui.___ links and upgrades them to shiny.express.ui.____ links

https://github.com/posit-dev/py-shiny/blob/ea5db0e222c39128202da9d54afe51488f660d87/docs/_renderer.py#L61-L72

but this isn't always desirable, as in the case of :func:`~shiny.ui.page_auto` which only exists in shiny.ui. When the Express counterpart doesn't exist, the function is rendered as code without a link. See https://shiny.posit.co/py/api/express/express.ui.page_opts.html

image

schloerke commented 5 months ago

I'm ok if we white list exceptions until a bigger pattern emerges. The docs handling code doesn't need to be pretty

cpsievert commented 5 months ago

Maybe we could try importing converted using something like this, then informatively warn/error if it doesn't exist?

gadenbuie commented 5 months ago

...or just use the original link if the converted link doesn't exist.