Problem
The FAQ entry "Can I write Android-only or iOS-only code?" in docs/meta/faq.md only shows IS_ANDROID and IS_IOS. It still needs an explicit branch for browser preview behavior.
The original desktop instructions are obsolete: #74 replaced the Tkinter preview. On current main, pn preview and pn start set PN_PLATFORM=web; pythonnative.utils.IS_WEB and Platform.is_web identify this runtime, and Platform.OS is "web". IS_DESKTOP and docs/guides/desktop-preview.md no longer exist.
This remains a small documentation issue. It is assigned to @nigelseah24, whose existing PR #85 should be updated for this scope.
Requested change
-
Extend the FAQ's platform-branching bullet and snippet to include IS_WEB:
from pythonnative.utils import IS_ANDROID, IS_IOS, IS_WEB
if IS_ANDROID:
...
elif IS_IOS:
...
elif IS_WEB:
...
-
Explain that pn preview / pn start use PN_PLATFORM=web for the browser preview, and link to ../guides/browser-preview.md.
-
Keep the link to Platform.select({...}) in ../api/platform.md as the declarative alternative. The preview uses the "web" key.
-
Keep the existing distinction that browser preview is a development tool; Android and iOS are the app deployment targets.
-
Update PR docs(mkdocs): cover IS_WEB in the platform-specific code FAQ #85's title and description to refer to browser preview / IS_WEB.
Scope: the platform-specific code FAQ. No runtime changes or new desktop compatibility flags are needed. The Platform reference and browser preview guide already document the current APIs.
Follow AGENTS.md and the documentation style guide: straight quotes, no em dashes, and CMOS grammar.
Verification
- uv run --group docs mkdocs build --strict passes.
- View the FAQ with uv run --group docs mkdocs serve; check the snippet and both guide/API links.
- The change contains no IS_DESKTOP imports or links to the removed desktop preview guide.
Suggested commit message
docs(mkdocs): cover IS_WEB in the platform-specific code FAQ
Reactions are currently unavailable
Problem
The FAQ entry "Can I write Android-only or iOS-only code?" in docs/meta/faq.md only shows IS_ANDROID and IS_IOS. It still needs an explicit branch for browser preview behavior.
The original desktop instructions are obsolete: #74 replaced the Tkinter preview. On current main, pn preview and pn start set PN_PLATFORM=web; pythonnative.utils.IS_WEB and Platform.is_web identify this runtime, and Platform.OS is "web". IS_DESKTOP and docs/guides/desktop-preview.md no longer exist.
This remains a small documentation issue. It is assigned to @nigelseah24, whose existing PR #85 should be updated for this scope.
Requested change
Extend the FAQ's platform-branching bullet and snippet to include IS_WEB:
Explain that pn preview / pn start use PN_PLATFORM=web for the browser preview, and link to ../guides/browser-preview.md.
Keep the link to Platform.select({...}) in ../api/platform.md as the declarative alternative. The preview uses the "web" key.
Keep the existing distinction that browser preview is a development tool; Android and iOS are the app deployment targets.
Update PR docs(mkdocs): cover IS_WEB in the platform-specific code FAQ #85's title and description to refer to browser preview / IS_WEB.
Scope: the platform-specific code FAQ. No runtime changes or new desktop compatibility flags are needed. The Platform reference and browser preview guide already document the current APIs.
Follow AGENTS.md and the documentation style guide: straight quotes, no em dashes, and CMOS grammar.
Verification
Suggested commit message