Skip to content

Conversation

@dturner
Copy link
Collaborator

@dturner dturner commented Nov 18, 2025

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 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.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Migration Recipe Refactor: The step-by-step migration recipe has been refactored into a more direct, atomic 'before and after' example, simplifying the demonstration of Navigation 2 to Navigation 3 migration.
  • Package Structure Update: The previous start and stepX packages have been removed and replaced with atomic/begin (demonstrating the initial Navigation 2 state) and atomic/end (demonstrating the final migrated Navigation 3 state).
  • Code Duplication Reduction: Screen content has been refactored into a shared content package to significantly reduce code duplication across the migration examples.
  • Cleanup of Legacy Components: Intermediate migration step files and the legacy Navigator class have been deleted, streamlining the codebase.
  • Test and Manifest Updates: The AndroidManifest has been updated to reflect the new activity names, and the associated instrumented test MigrationActivityNavigationTest has been renamed to AtomicMigrationTest.
  • Documentation Added: A README.md file has been added to explain the new atomic structure of the migration recipe.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

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`.
@dturner dturner changed the title Refactor migration recipe to be atomic Simplify migration recipe Nov 18, 2025
@dturner dturner merged commit 081baba into main Nov 19, 2025
2 checks passed
@dturner dturner deleted the dt/migration branch November 19, 2025 11:30
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