Skip to content

Conversation

@devbridie
Copy link
Member

Last spatial layout for Androidify! Adds a spatial layout that just uses the medium layout - there's no design for the About screen, and my attempt at making one didn't look too great.

Spatial layout

Screenshot_071

Verified the flat layout changes on compact phone, foldable, and tablet.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @devbridie, 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 AboutScreen by introducing a spatial layout, making the application more adaptable to various device form factors, including extended reality (XR) environments. The screen's architecture has been refactored to dynamically adjust its presentation based on available screen space and XR capabilities, ensuring a consistent and optimized user interface. Additionally, the footer of the AboutScreen has been updated to provide direct access to privacy policies and terms of service.

Highlights

  • Spatial Layout Integration: Introduced a new spatial layout for the AboutScreen to enhance the user experience in XR environments, leveraging Orbiter and SpatialPanel components.
  • AboutScreen Refactoring: The AboutScreen composable has been significantly refactored into a more modular structure, including AboutScreenContents, AboutScreenScaffold, AboutScreenCompact, and AboutScreenMedium, to support adaptive layouts based on window size and XR enablement.
  • ViewModel for XR State: A new AboutViewModel was added to manage the isXrEnabled state, allowing the AboutScreen to dynamically switch between standard and spatial layouts.
  • Enhanced Footer Buttons: The FooterButtons component now includes direct links for 'Privacy' and 'Terms', with their click actions handled by LocalUriHandler in the MainNavigation.
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 effectively adds a spatial layout for the About screen, which is a great enhancement. The refactoring of AboutScreen.kt is particularly well-executed. By splitting the logic into AboutScreen, AboutScreenContents, and specific layout composables like AboutScreenCompact, AboutScreenMedium, and AboutScreenSpatial, you've significantly improved the code's modularity, reusability, and testability. The introduction of AboutViewModel to manage UI state is also a good practice. My review includes one suggestion to improve maintainability by extracting hardcoded URLs into constants. Overall, this is a solid contribution.

Comment on lines +196 to +201
onPrivacyClicked = {
uriHandler.openUri("https://policies.google.com/privacy")
},
onTermsClicked = {
uriHandler.openUri("https://policies.google.com/terms")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For better maintainability and to avoid magic strings, it's recommended to extract these URLs into constants. You could define them in a companion object or a separate Constants file. This makes them easier to manage and update if they ever change, and prevents potential typos if they are used in multiple places.

For example:

object AppConstants {
    const val PRIVACY_POLICY_URL = "https://policies.google.com/privacy"
    const val TERMS_OF_SERVICE_URL = "https://policies.google.com/terms"
}

@devbridie devbridie merged commit 70e3cd7 into main Sep 26, 2025
4 checks passed
@devbridie devbridie deleted the feature/xr/about-screen branch September 26, 2025 09:17
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