-
Notifications
You must be signed in to change notification settings - Fork 74
Simplify migration recipe #134
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
Conversation
This commit refactors the step-by-step migration recipe into a more direct, atomic "before and after" example. The previous `start` and `stepX` packages have been removed and replaced with `atomic/begin` and `atomic/end` packages. These new packages demonstrate the initial Navigation 2 state and the final migrated Navigation 3 state, respectively. Key changes include: * Refactoring the screen content into a shared `content` package to reduce duplication. * Deleting the intermediate migration step files and the legacy `Navigator`. * Updating the AndroidManifest to reflect the new activity names. * Renaming the associated instrumented test from `MigrationActivityNavigationTest` to `AtomicMigrationTest`. * Adding a `README.md` to explain the new atomic structure.
This commit removes the "Navigation 2 to 3 migration guide" document and its associated images. It has been removed because it was too complex to be practical.
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 significantly enhances the clarity and maintainability of the Navigation 2 to Navigation 3 migration guide. By transitioning from a multi-step approach to an atomic 'before and after' example, it provides a more concise and easier-to-understand demonstration of the migration process. This refactoring involves restructuring packages, centralizing shared UI components, and updating associated tests and manifest entries, ultimately simplifying how developers can learn and apply the migration steps. 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request is a great refactoring of the migration recipe. It simplifies the example from a multi-step process to a clear 'before' and 'after' atomic structure, which is much easier to follow. The introduction of begin and end packages, along with the extraction of shared UI into a content package, significantly improves the clarity and maintainability of the recipe. The removal of the old step-by-step files and the corresponding migration guide document makes the repository cleaner. My main feedback is related to the instrumented test, which doesn't seem to be correctly updated to test the new begin and end activities.
app/src/androidTest/java/com/example/nav3recipes/AtomicMigrationTest.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/java/com/example/nav3recipes/AtomicMigrationTest.kt
Outdated
Show resolved
Hide resolved
The test classes for the atomic migration recipe have been renamed for clarity. `StartAtomicMigrationActivity` is now `BeginAtomicMigrationActivity`, and the test now also includes the newly named `EndAtomicMigrationActivity`.
This commit refactors the step-by-step migration recipe into a more direct, atomic "before and after" example.
The previous
startandstepXpackages have been removed and replaced withatomic/beginandatomic/endpackages. These new packages demonstrate the initial Navigation 2 state and the final migrated Navigation 3 state, respectively.Key changes include:
contentpackage to reduce duplication.Navigator.MigrationActivityNavigationTesttoAtomicMigrationTest.README.mdto explain the new atomic structure.