Conversation
This commit introduces a new `faqs.md` file to the documentation. The document provides answers to frequently asked questions about Navigation 3 (Nav3), covering topics such as its design philosophy, Compose Multiplatform readiness, state management, transitions, and implementation details like deep linking.
This change adds a "Frequently asked questions" section to the `README.md` file, which includes a link to a new FAQs page.
Summary of ChangesHello @dturner, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a dedicated Frequently Asked Questions (FAQs) page for Navigation 3 (Nav3). The new page serves as a central resource to address common queries and provide clarity on Nav3's design principles, usage patterns, and advanced features. Concurrently, the project's main Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds a new FAQs page based on a YouTube video and links to it from the main README. The changes are well-structured and the new documentation is informative. I've found a couple of minor issues in the new FAQs file, including a typo and a missing newline at the end of the file. My suggestions address these points to improve the document's quality.
| * Upvote specific recipes; popular recipes may be promoted into the Nav3 API or other libraries. | ||
|
|
||
| ### Is Navigation 3 Compose Multiplatform (CMP) ready? | ||
| **Yes.** The Navigation 3 runtime depends on the Compose Runtime so is supported on all platforms that the Compose runtime supports. The Navigation 3 UI depends on Compose UI so is supported on all platforms where there is a Compose UI implementation. See [this article for more information](https://kotlinlang.org/docs/multiplatform/compose-navigation-3.html). |
There was a problem hiding this comment.
The CMP version of this repo (https://github.com/terrakok/nav3-recipes) is linked from the page here (and the overall README for this repo, but it might still be worth linking it here directly as well?
|
|
||
| ### How do I share a ViewModel between two screens? | ||
| You can achieve this in two main ways: | ||
| 1. **Custom Entry Decorator:** A custom decorator can control a `NavEntry`'s access to one or more `ViewModel`s. For example, a decorator could create a `ViewModel` that is shared between all entries on a back stack. Alternatively, a child entry could get access to a parent's view model by specifying the id of the parent in `metadata`. The custom decorator could then read that ID and provide the child entry with the parent's `ViewModel`. See [this recipe]() for an example. |
There was a problem hiding this comment.
"[this recipe]()" link needed
| ### Why do I have to manually add `rememberSavableStateHolderNavEntryDecorator`? | ||
| The team decided to give control back to the developers. While most apps should use it, allowing manual placement ensures you can control **where** the state is held or substitute it with your own implementation if necessary. | ||
|
|
||
| ### Why is `SaveStateConfiguration` needed? |
| ### How can I combine different strategies (e.g., ListDetail, Dialog, BottomSheet)? | ||
| You can use the **`then` infix operator** to chain multiple strategies together. This creates a single strategy that evaluates the individual strategies in order. |
There was a problem hiding this comment.
nit: "scene strategies" instead of just "strategies"
Add FAQs page based on content from https://www.youtube.com/watch?v=JsugLEM6po0