-
Notifications
You must be signed in to change notification settings - Fork 264
Create a Spatial layout for the Edit portion of CreationScreen #121
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
Create a Spatial layout for the Edit portion of CreationScreen #121
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 CreationScreen by introducing adaptive layouts and a new spatial user interface for XR environments. The changes involve a major refactoring of the existing EditScreen into modular components, allowing the application to seamlessly switch between compact, medium, and immersive spatial experiences based on the device's capabilities. This improves UI responsiveness and prepares the application for extended reality platforms.
Highlights
- UI Refactoring and Modularity: The
EditScreenhas been extensively refactored and split into multiple dedicated composables:EditScreenCompact,EditScreenMedium, andEditScreenSpatial. This improves code organization, readability, and maintainability by separating concerns into smaller, more focused files. - Dynamic Layout Adaptation: A new
EditScreenLayoutTypeenum andcalculateLayoutTypefunction have been introduced. This enables the application to dynamically select the most appropriate UI layout (Compact, Medium, or Spatial) based on the device's capabilities, such as whether XR (Extended Reality) features are enabled. - Spatial UI Implementation for XR: A dedicated spatial layout (
EditScreenSpatial) has been implemented for the edit portion of theCreationScreen. This leverages XR Compose components likeSubspace,SpatialPanel, andOrbiterto provide an immersive 3D user experience, complete with a movable and resizableSquiggleBackgroundSubspace. - Dependency Updates: The project's build dependencies have been updated to include
androidx.xr.composeandcore.xr, essential for supporting the new XR functionalities. Additionally,core.networkwas added to thecreationfeature.
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 a significant and well-executed refactoring of the CreationScreen to support multiple layouts: compact, medium, and a new spatial layout for XR environments. The code is now much more modular, with different layouts and components split into their own files, which greatly improves maintainability. The introduction of SquiggleBackgroundSubspace and its reuse in the HomeScreen is a great example of creating shared components for spatial UI. The overall changes are excellent. However, I've found one critical bug in the implementation of drag-and-drop functionality which will prevent it from working as intended. My review includes a specific comment with a fix for this issue.
feature/creation/src/main/java/com/android/developers/androidify/creation/PhotoPrompt.kt
Outdated
Show resolved
Hide resolved
core/xr/src/main/java/com/android/developers/androidify/xr/SpatialComponents.kt
Show resolved
Hide resolved
| } | ||
| } | ||
|
|
||
| val fakeDropBehaviourFactory = object : DropBehaviourFactory { |
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.
Nit: (cc @tiwiz), should some feedback on the APIs be provided that they are not easy to use with Previews? or maybe our abstraction needs moving into the ViewModel 🤔 Just thinking out loud here that this seems a bit wrong..
Not blocking on this though.
feature/creation/src/main/java/com/android/developers/androidify/creation/PromptTypePager.kt
Outdated
Show resolved
Hide resolved
48cb7d8 to
f98fce3
Compare
|
Tested the flow with the nav3 changes on all types of emulators and it looks good! Merging |
EditScreenintoEditScreenMedium,EditScreenCompact, and its larger components into separate filesThoroughly tested the flows through the file picker on both the XR emulator and the Resizable emulator.
Screenshots