streamlit / docs

Source code for the Streamlit Python library documentation
https://docs.streamlit.io
Apache License 2.0
110 stars 459 forks source link

Fix broken `st.navigation` API reference example #1109

Closed mahotd closed 2 months ago

mahotd commented 2 months ago

Closes https://github.com/streamlit/streamlit/issues/9026

📚 Context

There is a typo in the 3rd example for the st.navigation API reference, which results in broken code.

🧠 Description of Changes

I added the missing brackets around the st.navigation page argument.

Revised:

image

Current:

image

💥 Impact

It is a minor change which results in a non broken example.

Size:

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

snehankekre commented 2 months ago

Hi @mahotd 👋 thanks for catching the typo!

The docstrings on the docs site are pulled from the open-source library. To fix them on the site and in Streamlit, I'd suggest submitting a PR in streamlit/streamlit :)

Here's the line you need to edit: https://github.com/streamlit/streamlit/blob/develop/lib/streamlit/commands/navigation.py#L158

I'll close this PR for now and will be on the lookout for your PR in streamlit/streamlit.

mahotd commented 2 months ago

Yeah that explains why it felt weird to edit a monstruous 144000 lines json for this :sweat_smile: I'll fix it there

mahotd commented 2 months ago

@snehankekre thanks for the help and patience ! I think the issue creation workflow is a little bit misleading : I wanted to create an issue on streamlit/streamlit, but as my problem was related to the docs, I clicked on the "Streamlit documentation" button here:

image

which redirected me to streamlit/docs here I read the README and found instructions for contributing.

Maybe it should be clearer that changes to the documentation python content should happen on streamlit/streamlit ?

snehankekre commented 2 months ago

I agree 👍 We'll make sure to clarify that in the issue template. Thanks again!