FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs(mkdocs): add run instructions to the navigation example by abhiramvsmg · Pull Request #63 · pythonnative/pythonnative · GitHub

docs(mkdocs): add run instructions to the navigation example - #63

Merged
owenthcarey merged 3 commits into
pythonnative:mainfrom
abhiramvsmg:docs/navigation-run-instructions
Sep 5, 2026
Merged

owenthcarey merged 3 commits into
pythonnative:mainfrom
abhiramvsmg:docs/navigation-run-instructions

Conversation

Copy link
Copy Markdown
Contributor

What

docs/examples/navigation.md had five code snippets but never said
how to run them. This adds that.

Changes

  • Intro note: scaffold with pn init, paste a snippet into
    app/main.py, run pn preview (or pn run android / pn run ios). Covers Stack, Tab, and Drawer, which each define a runnable
    App.
  • Nesting: notes the snippet sketches composition only (Post is
    referenced but never defined) and what to add to run it.
  • Focus-aware effects: points to pn preview app.main.CameraScreen
    (the dotted-component syntax from the desktop preview
    guide
    ), since
    CameraScreen isn't wrapped in a navigator.

Verification

  • Pasted the Stack navigator snippet into a fresh pn init project;
    pn preview renders it following only the new instructions.
  • mkdocs build --strict introduces no new warnings.

Closes #60

owenthcarey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks, this is nearly there. Two small accuracy fixes before I merge (inline below). Everything else looks good, and thanks for verifying with mkdocs build --strict.

Comment thread docs/examples/navigation.md Outdated

Paste any of the snippets below into `app/main.py` of a project
scaffolded with `pn init`, then run `pn preview` (or `pn run android`
/ `pn run ios`). The Stack, Tab, and Drawer examples define `App`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Only the Stack snippet actually runs as is. The Tab and Drawer snippets don't include import pythonnative as pn, so pasting either one alone into app/main.py fails with NameError: name 'pn' is not defined.

Could you either add the import line to those two code blocks (the Counter and Forms examples each carry their own import, so that matches the rest of the docs), or reword this sentence so readers know to add it?

Comment thread docs/examples/navigation.md Outdated

This snippet sketches the composition rather than a complete app:
`Feed` is defined in the Tab navigator example above, and `Post`
isn't shown. To try it, add a `Post` screen and use this `App` in

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

ProfileStack is also undefined here, not just Post. Someone who adds a Post screen as instructed will still hit a NameError on ProfileStack. Please mention it too, for example "Post and ProfileStack aren't shown."

owenthcarey merged commit d3e7a96 into pythonnative:main Sep 5, 2026
18 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Navigation example page does not say how to run the snippets

2 participants


Back | FazBrowse Home | New Git URL