-
Notifications
You must be signed in to change notification settings - Fork 257
Add XR support for the home layout #107
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
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.
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 application's home screen by introducing support for Extended Reality (XR) environments. The changes allow the home layout to adapt to different device capabilities and user preferences, offering a more immersive experience where available. This refactoring also improves modularity and prepares the application for future spatial computing features.
Highlights
- XR Support Integration: Introduced comprehensive XR (Extended Reality) support for the home layout, enabling spatial UI experiences.
- Dynamic Layout Selection: Refactored the
HomeScreento dynamically select betweenCompact,Medium, andSpatiallayouts based on window size, XR capabilities, and a new remote configuration flag. - New XR Module: Added a new
core/xrmodule to encapsulate XR-related dependencies, utilities, and UI components. - Remote Configuration for XR: Implemented a remote configuration option to enable or disable XR spatial layouts, providing flexibility for feature rollout.
- Spatial UI Enhancements: Added a 'To Full Space Mode' action item, allowing users to transition to an immersive spatial experience when XR is enabled.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| 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 issue 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
-
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. ↩
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 introduces significant changes to add XR support for the home layout, including a new :core:xr module and a major refactoring of the HomeScreen composable. The code is well-structured, splitting the layouts into separate, more manageable files, which greatly improves maintainability. I've identified a high-severity bug where the remote configuration to disable XR is not being correctly applied, and a minor style issue in a test file. Overall, this is a great enhancement.
feature/home/src/main/java/com/android/developers/androidify/home/HomeScreenLayoutType.kt
Outdated
Show resolved
Hide resolved
core/testing/src/main/java/com/android/developers/testing/network/TestRemoteConfigDataSource.kt
Outdated
Show resolved
Hide resolved
571d84c to
f5e05bf
Compare
feature/home/src/main/java/com/android/developers/androidify/home/HomeScreenCompact.kt
Outdated
Show resolved
Hide resolved
feature/home/src/main/java/com/android/developers/androidify/home/HomeScreenComponents.kt
Outdated
Show resolved
Hide resolved
feature/home/src/main/java/com/android/developers/androidify/home/HomeScreenMedium.kt
Outdated
Show resolved
Hide resolved
feature/home/src/main/java/com/android/developers/androidify/home/HomeScreenSpatial.kt
Show resolved
Hide resolved
3a7ac14 to
fba4ee7
Compare
core/network/src/main/java/com/android/developers/androidify/RemoteConfigDataSource.kt
Outdated
Show resolved
Hide resolved
|
/gemini review |
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 introduces significant changes to support XR layouts on the home screen. The refactoring is well-done, splitting the HomeScreen into multiple components for different layouts (Compact, Medium, and a new Spatial layout), which greatly improves code organization and maintainability. A new core/xr module is added to encapsulate XR-related utilities, which is a good architectural choice. The TopAppBar has also been refactored to be more flexible.
My feedback focuses on improving accessibility and code consistency by using string resources for content descriptions instead of hardcoded values and cleaning up unused resources. Overall, this is a solid implementation of a major new feature.
core/xr/src/main/java/com/android/developers/androidify/xr/SpatialUiModes.kt
Outdated
Show resolved
Hide resolved
core/xr/src/main/java/com/android/developers/androidify/xr/SpatialUiModes.kt
Outdated
Show resolved
Hide resolved
This commit also adds the About button to the Medium layouts by removing the Translucent top bar. This matches the new spec and also makes the Compact layout and Medium layout more similar in functionality.
…ApplicationSubspaces
Adds a shim SharedTransitionScope that does nothing when motion is disabled.
e7486a4 to
e1899f6
Compare
6dc5eaf to
a1f5582
Compare
HomeScreenintoHomeScreenMediumandHomeScreenCompactlayouts, withHomeScreenComponents.HomeScreen()now picks a layout depending on size class, XR capabilities, and the remote XR configuration.HomeScreenSpatiallayoutTopAppBarto support multiple actions (was only able to show an About button)Screenshots
Medium
Compact
Spatial