Skip to content

Conversation

@arkivanov
Copy link
Owner

@arkivanov arkivanov commented Dec 26, 2025

Summary by CodeRabbit

  • Documentation

    • Updated component context documentation to reflect API changes in lifecycle handling
  • Refactor

    • Restructured component architecture for improved lifecycle owner accessibility and property-based access patterns
  • Chores

    • Simplified sample app build by removing unused dependencies and plugins
    • Removed sample navigation and component implementation examples to streamline codebase

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 26, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The PR modifies the RootComponent.Child API by removing delegation-based LifecycleOwner exposure and replacing it with an explicit property, deletes the sample Android app's Foo.kt file containing navigation components, and removes corresponding build dependencies on jetpack-component-context and extensions-compose.

Changes

Cohort / File(s) Change Summary
Component API Updates
docs/component/jetpack-component-context.md
Changed RootComponent.Child from delegating LifecycleOwner (sealed class Child(lifecycleOwner: LifecycleOwner) : LifecycleOwner by lifecycleOwner) to an explicit property pattern (sealed class Child(val lifecycleOwner: LifecycleOwner)). Updated RootContent usage to access lifecycle via it.instance.lifecycleOwner instead of delegation.
Sample App Cleanup
sample/app-android/src/main/java/com/arkivanov/sample/app/Foo.kt
Deleted entire file containing navigation components: HomeComponent interface, RootComponent interface, DefaultHomeComponent/DefaultRootComponent implementations, HomeContent/RootContent composables, and navigation Config sealed interface with stack-based routing.
Build Configuration
sample/app-android/build.gradle.kts
Removed kotlinx-serialization plugin, project(":jetpack-component-context") dependency, and project(":extensions-compose") dependency.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Hop along, delegation's gone!
LifecycleOwner now stands alone,
A property explicit, clean and bright,
Navigation samples fade from sight,
Dependencies pruned with gentle care—
Simpler code awaits us there!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-LocalLifecycleOwner-docs

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b908e9e and 6fbd6d4.

📒 Files selected for processing (3)
  • docs/component/jetpack-component-context.md
  • sample/app-android/build.gradle.kts
  • sample/app-android/src/main/java/com/arkivanov/sample/app/Foo.kt

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@arkivanov arkivanov merged commit 9cc3bd3 into master Dec 26, 2025
2 of 3 checks passed
@arkivanov arkivanov deleted the update-LocalLifecycleOwner-docs branch December 26, 2025 19:14
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.

2 participants