8000 Added documentation for Child Items by arkivanov · Pull Request #880 · arkivanov/Decompose · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added documentation for Child Items #880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2025
Merged

Added documentation for Child Items #880

merged 1 commit into from
May 31, 2025

Conversation

arkivanov
Copy link
Owner
@arkivanov arkivanov commented May 28, 2025

Summary by CodeRabbit

  • Documentation
    • Added comprehensive documentation for the experimental "Child Items" navigation model, including an overview, navigation interface details, lifecycle management, and usage examples.
    • Introduced a new section on Child Items navigation with Compose, explaining lifecycle handling in lazy lists and grids.
    • Updated the documentation navigation to include the new "Child Items" section with direct links to relevant guides.
    • Updated sample descriptions and navigation model names for clarity and consistency, including adding a new "Shared Transitions" fullscreen component section.

Copy link
coderabbitai bot commented May 28, 2025

Walkthrough

Three new documentation files were added to describe the experimental "Child Items" navigation model, its lifecycle management, and navigation API. The Compose extension documentation was updated with a new section on integrating Child Items navigation. The mkdocs configuration was updated to include the new documentation sections. Minor import path updates for subscribeAsState were applied in Compose examples. Sample documentation was refined with updated navigation model names and new sample descriptions.

Changes

File(s) Change Summary
docs/extensions/compose.md Added "Child Items navigation with Compose" section describing lifecycle management, usage, and import updates.
docs/navigation/items/overview.md New file introducing "Child Items" navigation model, entities, lifecycle, usage, and state preservation.
docs/navigation/items/navigation.md New file detailing navigation API for child items with examples and lifecycle synchronization.
docs/navigation/overview.md Added "Child Items" as a new predefined navigation model.
docs/component/overview.md, docs/getting-started/quick-start.md Updated import statements for subscribeAsState to new package location.
docs/samples.md Refined sample descriptions, renamed navigation models, added "Shared Transitions" sample section.
mkdocs.yml Added "Child Items" subsection under "Navigation" linking to new docs.

Poem

In docs, a new path we chart,
With Child Items, navigation’s an art.
Compose now guides with gentle care,
Lifecycles managed, states laid bare.
Rabbits hop through markdown fields anew,
Documenting wonders for all to view!
🐇✨


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@arkivanov arkivanov marked this pull request as ready for review May 28, 2025 21:37
Copy link
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
docs/navigation/items/navigation.md (2)

24-24: Fix missing article in sentence.

Add the missing article "the" before "lifecycles" for proper grammar.

-ensures that all deactivated or removed components are de
8000
stroyed, and updates lifecycles of the active components to
+ensures that all deactivated or removed components are destroyed, and updates the lifecycles of the active components to
🧰 Tools
🪛 LanguageTool

[uncategorized] ~24-~24: Possible missing article found.
Context: ...d components are destroyed, and updates lifecycles of the active components to match the n...

(AI_HYDRA_LEO_MISSING_THE)


28-28: Add comma before "and" in compound sentence.

Add a comma before "and" to properly separate the two independent clauses.

-`navigate` method returns, the navigation is finished and all component lifecycles are moved into required states.
+`navigate` method returns, the navigation is finished, and all component lifecycles are moved into required states.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~28-~28: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...thod returns, the navigation is finished and all component lifecycles are moved into...

(COMMA_COMPOUND_SENTENCE_2)

docs/navigation/items/overview.md (1)

1-116: LGTM! Comprehensive and well-structured documentation.

This new documentation file provides excellent coverage of the Child Items navigation model, including:

  • Clear experimental status warning
  • Detailed explanation of the three main entities (Items, ChildItems, ItemsNavigation)
  • Proper initialization steps and requirements
  • Comprehensive code examples that align with the sample implementations
  • Important notes about state preservation and multiple instances

The documentation will be very valuable for developers adopting this new navigation model. The code examples match the sample implementations perfectly, ensuring consistency between docs and code.

Note: There's a minor formatting issue flagged by static analysis tools regarding list indentation, but this doesn't affect the content quality.

🧰 Tools
🪛 LanguageTool

[typographical] ~18-~18: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...p should also be present in the items list, otherwise the behavior is undefined. - [ChildItem...

(THUS_SENTENCE)

🪛 markdownlint-cli2 (0.17.2)

17-17: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


18-18: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


20-20: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


21-21: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bbf7f24 and 741b000.

📒 Files selected for processing (8)
  • docs/extensions/compose.md (44 hunks)
  • docs/navigation/items/navigation.md (1 hunks)
  • docs/navigation/items/overview.md (1 hunks)
  • extensions-compose/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/lazyitems/ChildItemsLifecycleController.kt (2 hunks)
  • mkdocs.yml (1 hunks)
  • sample/shared/compose/src/commonMain/kotlin/com/arkivanov/sample/shared/Foo.kt (1 hunks)
  • sample/shared/shared/src/commonMain/kotlin/com/arkivanov/sample/shared/foo/ItemComponent.kt (1 hunks)
  • sample/shared/shared/src/commonMain/kotlin/com/arkivanov/sample/shared/foo/ItemsComponent.kt (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
extensions-compose/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/lazyitems/ChildItemsLifecycleController.kt (1)
decompose/src/commonMain/kotlin/com/arkivanov/decompose/router/items/ItemsNavigation.kt (1)
  • ItemsNavigation (23-25)
sample/shared/compose/src/commonMain/kotlin/com/arkivanov/sample/shared/Foo.kt (2)
sample/shared/shared/src/commonMain/kotlin/com/arkivanov/sample/shared/foo/ItemsComponent.kt (1)
  • items (10-12)
extensions-compose/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/lazyitems/ChildItemsLifecycleController.kt (3)
  • ChildItemsLifecycleController (34-63)
  • ChildItemsLifecycleController (80-109)
  • ChildItemsLifecycleController (111-140)
sample/shared/shared/src/commonMain/kotlin/com/arkivanov/sample/shared/foo/ItemsComponent.kt (2)
sample/shared/shared/src/commonMain/kotlin/com/arkivanov/sample/shared/foo/ItemComponent.kt (1)
  • componentContext (13-16)
decompose/src/commonMain/kotlin/com/arkivanov/decompose/router/items/ItemsNavigation.kt (1)
  • ItemsNavigation (23-25)
🪛 LanguageTool
docs/navigation/items/navigation.md

[uncategorized] ~24-~24: Possible missing article found.
Context: ...d components are destroyed, and updates lifecycles of the active components to match the n...

(AI_HYDRA_LEO_MISSING_THE)


[uncategorized] ~28-~28: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...thod returns, the navigation is finished and all component lifecycles are moved into...

(COMMA_COMPOUND_SENTENCE_2)


[style] ~60-~60: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 2047 characters long)
Context: ...e states using a transformer function. !!! note "Illustration" ```title="Befo...

(EN_EXCESSIVE_EXCLAMATION)

docs/navigation/items/overview.md

[typographical] ~18-~18: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...p should also be present in the items list, otherwise the behavior is undefined. - [ChildItem...

(THUS_SENTENCE)

🪛 markdownlint-cli2 (0.17.2)
docs/navigation/items/overview.md

17-17: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


18-18: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


20-20: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


21-21: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

docs/extensions/compose.md

1271-1271: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build on Linux
  • GitHub Check: Build on macOS
🔇 Additional comments (12)
mkdocs.yml (1)

50-52: LGTM! Navigation structure follows established patterns.

The new Child Items navigation section is properly integrated following the same structure as other navigation sections (Child Stack, Child Slot, etc.).

extensions-compose/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/lazyitems/ChildItemsLifecycleController.kt (1)

14-14: Import is correctly added.

The import for ItemsNavigation is needed for the demonstration function below.

sample/shared/compose/src/commonMain/kotlin/com/arkivanov/sample/shared/Foo.kt (1)

1-37: Excellent sample implementation of Child Items navigation model.

This sample code correctly demonstrates:

  • Proper state subscription with subscribeAsState()
  • Integration of ChildItemsLifecycleController for lifecycle management
  • Appropriate preload counts and index converter usage
  • Clean separation between list rendering and lifecycle control

The implementation aligns well with the newly documented Child Items navigation model.

docs/navigation/items/navigation.md (1)

1-75: Excellent documentation structure and content.

The documentation provides comprehensive coverage of the ItemsNavigator interface, navigation patterns, and helpful illustrations. The content is well-organized and clearly explains the synchronous/asynchronous navigation behavior and extension functions.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~24-~24: Possible missing article found.
Context: ...d components are destroyed, and updates lifecycles of the active components to match the n...

(AI_HYDRA_LEO_MISSING_THE)


[uncategorized] ~28-~28: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...thod returns, the navigation is finished and all component lifecycles are moved into...

(COMMA_COMPOUND_SENTENCE_2)


[style] ~60-~60: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 2047 characters long)
Context: ...e states using a transformer function. !!! note "Illustration" ```title="Befo...

(EN_EXCESSIVE_EXCLAMATION)

sample/shared/shared/src/commonMain/kotlin/com/arkivanov/sample/shared/foo/ItemComponent.kt (3)

1-8: LGTM! Clean interface design.

The ItemComponent interface is well-designed with a clear, focused responsibility. The package structure and imports are appropriate for the sample code.


10-11: LGTM! Proper serialization setup.

The Item data class is correctly annotated with @Serializable and includes a helpful comment about the kotlinx-serialization plugin requirement. The class structure with id and data properties is appropriate for the sample.


13-16: LGTM! Correct implementation pattern.

The DefaultItemComponent implementation follows the proper Decompose pattern by delegating ComponentContext and cleanly implementing the ItemComponent interface. The constructor parameter structure aligns well with the factory usage in ItemsComponent.

docs/extensions/compose.md (1)

377-458: LGTM! Comprehensive documentation for Child Items navigation.

This new section provides excellent documentation for the experimental Child Items navigation model with Compose. The content includes:

  • Clear warning about experimental status
  • Detailed explanation of ChildItemsLifecycleController functionality
  • Practical code examples showing both lazy list and grid usage
  • Good alignment with the sample implementations

The documentation will be very helpful for users adopting this new navigation model.

sample/shared/shared/src/commonMain/kotlin/com/arkivanov/sample/shared/foo/ItemsComponent.kt (4)

10-12: LGTM! Clean interface design.

The ItemsComponent interface is well-designed with a single, focused responsibility exposing the lazy child items.


14-18: LGTM! Proper setup and initialization.

The DefaultItemsComponent correctly implements the interface and delegates ComponentContext. The ItemsNavigation initialization follows the documented pattern for the Child Items navigation model.


20-36: LGTM! Comprehensive childItems configuration.

The childItems function call is properly configured with:

  • Correct navigation source
  • Appropriate serializer with helpful comment about disabling state saving
  • Reasonable initial data (100 items for demonstration)
  • Proper factory function creating DefaultItemComponent instances

This demonstrates the Child Items navigation model effectively.


38-40: LGTM! Demonstrates navigation manipulation.

The addMoreItems method shows how to properly update the navigation state using the setItems function. This is a good example of dynamic item management in the Child Items model.

Copy link
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (15)
docs/navigation/items/overview.md (8)

3-3: Suggest removing the article "The" in the subheading for consistency.

The section title reads ## The Child Items. To match other headings and improve readability, consider changing it to ## Child Items.


12-12: Fix comma splice in sentence.

The sentence

It is possible to have more than one `Child Items` navigation model in a component, nested navigation is also supported.

is a run-on. Consider splitting into two sentences or using a semicolon:

It is possible to have more than one `Child Items` navigation model in a component; nested navigation is also supported.

18-18: Clarify use of "otherwise" for better flow.

Rather than

Configurations in the map should also be present in the `items` list, otherwise the behavior is undefined.

you could write:

If a configuration in the map is not present in the `items` list, the behavior is undefined.
🧰 Tools
🪛 LanguageTool

[typographical] ~18-~18: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...p should also be present in the items list, otherwise the behavior is undefined. - [ChildItem...

(THUS_SENTENCE)


19-19: Insert missing preposition.

The phrase

stores a list component configurations

should read:

stores a list of component configurations

to include the missing "of".

🧰 Tools
🪛 LanguageTool

[uncategorized] ~19-~19: Possible missing preposition found.
Context: ... a simple data class that stores a list component configurations, as well as a map of act...

(AI_EN_LECTOR_MISSING_PREPOSITION)


107-107: Reword awkward heading.

The heading

## Screen recreation and process death on (not only) Android

is hard to parse. Consider:

## Screen recreation and process death

and mention cross-platform support in the paragraph below.


109-109: Add missing article before argument.

Change

pass `serializer = null` argument

to

pass the `serializer = null` argument

for grammatical correctness.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~109-~109: You might be missing the article “the” here.
Context: ...ble state preservation completely, pass serializer = null argument. When naviga...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


111-111: Add missing article before argument.

Similarly, change

pass `stateSaver = transientNavStateSaver()` argument

to

pass the `stateSaver = transientNavStateSaver()` argument
```.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 LanguageTool</summary>

[uncategorized] ~111-~111: You might be missing the article “the” here.
Context: ... changes on Android. In this case, pass `stateSaver = transientNavStateSaver()` a...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

</details>

</details>

---

`115-115`: **Clarify wording around multiple instances.**

The sentence

each such Child Items must have a unique key argument associated.

could be clearer as:

each Child Items instance must have a unique key argument.


</blockquote></details>
<details>
<summary>docs/navigation/items/navigation.md (4)</summary><blockquote>

`1-1`: **Align page title with other docs.**

The main header reads:

Navigation with Child Items

For consistency with other pages (e.g. "# Child Stack overview"), consider:

Child Items Navigation


---

`33-38`: **Rephrase for clarity.**

The sentence

There are ItemsNavigator extension functions to simplify the navigation. Some of which were already used in the Child Items Overview example.

can be smoothed out:

There are extension functions for ItemsNavigator that simplify navigation; some of these were already used in the Child Items Overview example.


---

`43-47`: **Specify a language for the illustration block.**

The code fence is written as
[Item1:DESTROYED, Item2:STARTED, Item3:RESUMED]
to improve syntax highlighting, prepend a language (e.g., `text`):
[Item1:DESTROYED, Item2:STARTED, Item3:RESUMED]

53-56: Specify a language for the second illustration block.

Similarly, change

```title="After"
[Item2:STARTED, Item3:RESUMED, Item4:DESTROYED]
to
[Item2:STARTED, Item3:RESUMED, Item4:DESTROYED]
docs/extensions/compose.md (3)

377-377: Capitalize "Navigation" in the heading.

The section heading reads:

## Child Items navigation with Compose

For consistency and title-case style, consider:

## Child Items Navigation with Compose

379-381: Add space after admonition marker.

In mkdocs, admonitions should have a space after the exclamations. Change:

!!!warning

to

!!! warning

382-383: Improve sentence flow with a comma.

Rather than

provides [ChildItems] as `LazyChildItems` that extends both `Value<ChildItems>` and `ItemsNavigator`

consider

provides [ChildItems] as `LazyChildItems`, which extends both `Value<ChildItems>` and `ItemsNavigator`
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 741b000 and 1dd6c51.

📒 Files selected for processing (4)
  • docs/extensions/compose.md (44 hunks)
  • docs/navigation/items/navigation.md (1 hunks)
  • docs/navigation/items/overview.md (1 hunks)
  • mkdocs.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • mkdocs.yml
🧰 Additional context used
🪛 LanguageTool
docs/navigation/items/overview.md

[typographical] ~18-~18: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...p should also be present in the items list, otherwise the behavior is undefined. - [ChildItem...

(THUS_SENTENCE)


[uncategorized] ~19-~19: Possible missing preposition found.
Context: ... a simple data class that stores a list component configurations, as well as a map of act...

(AI_EN_LECTOR_MISSING_PREPOSITION)


[uncategorized] ~109-~109: You might be missing the article “the” here.
Context: ...ble state preservation completely, pass serializer = null argument. When naviga...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~111-~111: You might be missing the article “the” here.
Context: ... changes on Android. In this case, pass stateSaver = transientNavStateSaver() a...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

docs/extensions/compose.md

[style] ~389-~389: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...g delta are moved to CREATED state. - Items outside the viewport and outside the pr...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/navigation/items/navigation.md

[uncategorized] ~28-~28: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...thod returns, the navigation is finished and all component lifecycles are moved into...

(COMMA_COMPOUND_SENTENCE_2)


[style] ~60-~60: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 2047 characters long)
Context: ...e states using a transformer function. !!! note "Illustration" ```title="Befo...

(EN_EXCESSIVE_EXCLAMATION)

🪛 markdownlint-cli2 (0.17.2)
docs/extensions/compose.md

1271-1271: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build on Linux
  • GitHub Check: Build on macOS

Copy link
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
docs/samples.md (1)

8-8: Updated list of navigation models
The sample now correctly includes “Child Items” in the navigation models list. Consider adding an Oxford comma before “and Generic Navigation” for consistency in list formatting.

docs/navigation/items/navigation.md (1)

21-31: Synchronous vs. asynchronous navigation explanation
The description of how recursive navigate calls are queued during active navigation is clear.

Consider adding a comma before “and all component lifecycles” in line 28 to improve readability of the compound sentence.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~24-~24: Possible missing article found.
Context: ...d components are destroyed, and updates lifecycles of the active components to match the n...

(AI_HYDRA_LEO_MISSING_THE)


[uncategorized] ~28-~28: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...thod returns, the navigation is finished and all component lifecycles are moved into...

(COMMA_COMPOUND_SENTENCE_2)

docs/navigation/items/overview.md (1)

14-23: Entities list and sub-descriptions
Defining Items, ChildItems, and ItemsNavigation with sub-points is comprehensive; however, the indentation of sub-bullets is deeper than the surrounding docs standard. Consider adjusting to two-space indentation for nested list items to satisfy markdownlint.

🧰 Tools
🪛 LanguageTool

[typographical] ~18-~18: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...p should also be present in the items list, otherwise the behavior is undefined. - [ChildItem...

(THUS_SENTENCE)


[uncategorized] ~19-~19: Possible missing preposition found.
Context: ... a simple data class that stores a list component configurations, as well as a map of act...

(AI_EN_LECTOR_MISSING_PREPOSITION)

🪛 markdownlint-cli2 (0.17.2)

17-17: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


18-18: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


20-20: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


21-21: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1dd6c51 and d3640a2.

📒 Files selected for processing (8)
  • docs/component/overview.md (1 hunks)
  • docs/extensions/compose.md (47 hunks)
  • docs/getting-started/quick-start.md (1 hunks)
  • docs/navigation/items/navigation.md (1 hunks)
  • docs/navigation/items/overview.md (1 hunks)
  • docs/navigation/overview.md (1 hunks)
  • docs/samples.md (2 hunks)
  • mkdocs.yml (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • docs/component/overview.md
  • docs/getting-started/quick-start.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • mkdocs.yml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: arkivanov
PR: arkivanov/Decompose#880
File: docs/extensions/compose.md:429-431
Timestamp: 2025-05-28T22:32:21.601Z
Learning: In Decompose documentation, the correct import path for `subscribeAsState` in the Child Items navigation example is `com.arkivanov.decompose.extensions.compose.subscribeAsState`, not the jetbrains-specific variant. The import paths vary depending on the specific compose variant being used (general compose vs jetbrains/multiplatform compose).
docs/extensions/compose.md (1)
Learnt from: arkivanov
PR: arkivanov/Decompose#880
File: docs/extensions/compose.md:429-431
Timestamp: 2025-05-28T22:32:21.601Z
Learning: In Decompose documentation, the correct import path for `subscribeAsState` in the Child Items navigation example is `com.arkivanov.decompose.extensions.compose.subscribeAsState`, not the jetbrains-specific variant. The import paths vary depending on the specific compose variant being used (general compose vs jetbrains/multiplatform compose).
🪛 LanguageTool
docs/navigation/items/overview.md

[typographical] ~18-~18: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...p should also be present in the items list, otherwise the behavior is undefined. - [ChildItem...

(THUS_SENTENCE)


[uncategorized] ~19-~19: Possible missing preposition found.
Context: ... a simple data class that stores a list component configurations, as well as a map of act...

(AI_EN_LECTOR_MISSING_PREPOSITION)


[uncategorized] ~109-~109: You might be missing the article “the” here.
Context: ...ble state preservation completely, pass serializer = null argument. When naviga...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~111-~111: You might be missing the article “the” here.
Context: ... changes on Android. In this case, pass stateSaver = transientNavStateSaver() a...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

docs/extensions/compose.md

[style] ~389-~389: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...g delta are moved to CREATED state. - Items outside the viewport and outside the pr...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/navigation/items/navigation.md

[uncategorized] ~24-~24: Possible missing article found.
Context: ...d components are destroyed, and updates lifecycles of the active components to match the n...

(AI_HYDRA_LEO_MISSING_THE)


[uncategorized] ~28-~28: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ...thod returns, the navigation is finished and all component lifecycles are moved into...

(COMMA_COMPOUND_SENTENCE_2)


[style] ~60-~60: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 2047 characters long)
Context: ...e states using a transformer function. !!! note "Illustration" ```title="Befo...

(EN_EXCESSIVE_EXCLAMATION)

docs/navigation/overview.md

[style] ~11-~11: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ti-pane mode with dynamic switching. - Child Items...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/samples.md

[typographical] ~26-~26: Consider adding a comma here.
Context: ...ut, for generic master-detail navigation please refer to the Sample Todo List App descr...

(PLEASE_COMMA)


[grammar] ~26-~26: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...l navigation please refer to the Sample Todo List App described below.** ...

(TO_DO_HYPHEN)

🪛 markdownlint-cli2 (0.17.2)
docs/navigation/items/overview.md

17-17: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


18-18: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


20-20: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


21-21: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

docs/extensions/compose.md

1271-1271: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)

docs/samples.md

26-26: Unordered list indentation
Expected: 4; Actual: 8

(MD007, ul-indent)


27-27: Unordered list indentation
Expected: 6; Actual: 12

(MD007, ul-indent)


28-28: Unordered list indentation
Expected: 6; Actual: 12

(MD007, ul-indent)


29-29: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


30-30: Unordered list indentation
Expected: 4; Actual: 8

(MD007, ul-indent)


31-31: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


32-32: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


33-33: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


34-34: Unordered list indentation
Expected: 4; Actual: 8

(MD007, ul-indent)


35-35: Unordered list indentation
Expected: 4; Actual: 8

(MD007, ul-indent)


36-36: Unordered list indentation
Expected: 4; Actual: 8

(MD007, ul-indent)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build on macOS
  • GitHub Check: Build on Linux
🔇 Additional comments (25)
docs/navigation/overview.md (1)

11-11: New navigation model added: Child Items
Good addition of the “Child Items” bullet to the list of predefined navigation models. This clearly highlights the new experimental model in the overview.

🧰 Tools
🪛 LanguageTool

[style] ~11-~11: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ti-pane mode with dynamic switching. - Child Items...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

docs/samples.md (3)

26-26: Sample renamed: Multi Pane
Renaming “Multi-Pane” to “Multi Pane” matches the naming in other documentation sections. Looks good.

🧰 Tools
🪛 LanguageTool

[typographical] ~26-~26: Consider adding a comma here.
Context: ...ut, for generic master-detail navigation please refer to the Sample Todo List App descr...

(PLEASE_COMMA)


[grammar] ~26-~26: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...l navigation please refer to the Sample Todo List App described below.** ...

(TO_DO_HYPHEN)

🪛 markdownlint-cli2 (0.17.2)

26-26: Unordered list indentation
Expected: 4; Actual: 8

(MD007, ul-indent)


29-30: Renamed Dynamic Features sample headings
Updating “Dynamic Features” and its child “Dynamic Feature” for consistent pluralization is clear and correct.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

29-29: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


30-30: Unordered list indentation
Expected: 4; Actual: 8

(MD007, ul-indent)


33-36: New Shared Transitions sample added
The “Shared Transitions” fullscreen component and its child entries (Gallery, Thumbnail, Photo) are well-introduced. This enhances the sample catalog.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

33-33: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


34-34: Unordered list indentation
Expected: 4; Actual: 8

(MD007, ul-indent)


35-35: Unordered list indentation
Expected: 4; Actual: 8

(MD007, ul-indent)


36-36: Unordered list indentation
Expected: 4; Actual: 8

(MD007, ul-indent)

docs/navigation/items/navigation.md (6)

1-8: Clear introduction and header
The “Navigation with Child Items” header and high-level description of ItemsNavigator and ItemsNavigation are concise and informative.


9-14: navigate API arguments well documented
The transformer and optional onComplete parameters for navigate are clearly explained, and the convenience overload is noted.


16-19: Creating the navigation snippet
The code example for instantiating ItemsNavigation is straightforward and correct.


33-38: Extension functions introduction
Good overview of the ItemsNavigator extension helpers and linking to the extension source.


39-55: setItems transformer usage
The setItems example and before/after illustration effectively demonstrate how to replace the list of items.


57-75: setActiveItems transformer usage
The example showing lifecycle state manipulation through setActiveItems is well-presented and easy to follow.

🧰 Tools
🪛 LanguageTool

[style] ~60-~60: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 2047 characters long)
Context: ...e states using a transformer function. !!! note "Illustration" ```title="Befo...

(EN_EXCESSIVE_EXCLAMATION)

docs/extensions/compose.md (7)

22-26: Corrected import path for subscribeAsState
The import has been updated to com.arkivanov.decompose.extensions.compose.subscribeAsState, matching the general Compose variant.


88-91: Consistent import in navigation observation example
The subscribeAsState import in the manual observation snippet now matches the documented path.


377-383: New section: Child Items navigation with Compose
Introducing “Child Items navigation with Compose” underlines the experimental API availability since 3.4.0-alpha01. Well-placed warning and context.


384-392: Lifecycle controller feature list
The bullet points succinctly cover how ChildItemsLifecycleController manages item lifecycles in lazy layouts.

🧰 Tools
🪛 LanguageTool

[style] ~389-~389: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...g delta are moved to CREATED state. - Items outside the viewport and outside the pr...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


395-405: List variant signature for ChildItemsLifecycleController
The function signature for lazy lists is properly documented with parameters and defaults.


411-419: Grid variant signature for ChildItemsLifecycleController
The analogous grid API variant is also accurately specified.


423-459: Complete Compose usage example
The ItemsContent Composable demonstrates state subscription, item rendering, and lifecycle controller usage in a cohesive example.

docs/navigation/items/overview.md (8)

1-9: Introduction and experimental warning
The “Child Items overview” header, high-level description, and warning about experimental status are clear and aligned with other docs.


10-13: Multiple active components highlighted
Emphasis on the ability to maintain different lifecycle states is well stated.


32-35: Duplicate configurations mode
Correctly clarifies that duplicates always throw IllegalStateException, irrespective of flags.


36-43: Initialization steps
The three-step process for wiring up Child Items via childItems is clear and actionable.


46-63: ItemComponent example
The basic ItemComponent and default implementation snippet are well structured and demonstrate usage of @Serializable.


65-104: ItemsComponent example
The comprehensive example showcasing initialization, initial state, and dynamic updates effectively illustrates how to use ItemsNavigation and childItems.


107-112: State preservation behavior
Details on disabling state saving and transient savers are clearly explained.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~109-~109: You might be missing the article “the” here.
Context: ...ble state preservation completely, pass serializer = null argument. When naviga...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~111-~111: You might be missing the article “the” here.
Context: ... changes on Android. In this case, pass stateSaver = transientNavStateSaver() a...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


113-116: Multiple instances requirement
Reiterating the need for unique keys in multiple Child Items instances completes the overview.

@arkivanov arkivanov merged commit 7ebc825 into master May 31, 2025
3 checks passed
@arkivanov arkivanov deleted the items-docs branch May 31, 2025 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments

Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0