Skip to content

Conversation

@ksdmyanmar-lighter
Copy link

No description provided.

@ksdmyanmar-lighter ksdmyanmar-lighter requested a review from a team as a code owner December 23, 2025 18:20
@google-cla
Copy link

google-cla bot commented Dec 23, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist
Copy link

Summary of Changes

Hello @ksdmyanmar-lighter, 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 comments out the entirety of the AndroidStudioComposeSnippets.kt file. This action effectively deactivates all the Android Compose UI code snippets and their corresponding preview configurations that were previously defined in this file. The change suggests a removal or temporary disabling of these specific examples, though the exact reason is not specified.

Highlights

  • Code Deactivation: The entire content of the AndroidStudioComposeSnippets.kt file has been commented out, effectively deactivating all the Compose UI code snippets and their associated preview definitions.
  • File State: The file AndroidStudioComposeSnippets.kt remains in the repository but its functional code has been rendered inactive by commenting out every line.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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

@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 comments out the entire content of AndroidStudioComposeSnippets.kt. If this code is no longer necessary, it would be better for maintainability to delete the file or its contents entirely, rather than leaving it as commented-out code. Version control can be used to retrieve the code if it's needed again in the future. If this is a temporary change, it would be helpful to add a comment explaining the reason.

Comment on lines +17 to 192
//package com.example.compose.snippets.tooling

//import androidx.compose.foundation.background
//import androidx.compose.foundation.layout.Box
//import androidx.compose.material3.MaterialTheme
//import androidx.compose.material3.Surface
//import androidx.compose.material3.Text
//import androidx.compose.runtime.Composable
//import androidx.compose.ui.Modifier
//import androidx.compose.ui.graphics.Color
//import androidx.compose.ui.platform.LocalInspectionMode
//import androidx.compose.ui.res.stringResource
//import androidx.compose.ui.tooling.preview.Preview
//import androidx.compose.ui.tooling.preview.PreviewParameter
//import androidx.compose.ui.tooling.preview.PreviewParameterProvider
//import com.example.compose.snippets.R

// [START android_compose_tooling_simple_composable]
@Composable
fun SimpleComposable() {
Text("Hello World")
//@Composable
//fun SimpleComposable() {
// Text("Hello World")
}
// [END android_compose_tooling_simple_composable]

// [START android_compose_tooling_simple_composable_preview]
@Preview
@Composable
fun SimpleComposablePreview() {
SimpleComposable()
//@Preview
//@Composable
//fun SimpleComposablePreview() {
// SimpleComposable()
}
// [END android_compose_tooling_simple_composable_preview]

// [START android_compose_tooling_local_inspection_mode]
@Composable
fun GreetingScreen(name: String) {
if (LocalInspectionMode.current) {
//@Composable
//fun GreetingScreen(name: String) {
// if (LocalInspectionMode.current) {
// Show this text in a preview window:
Text("Hello preview user!")
// Text("Hello preview user!")
} else {
// Show this text in the app:
Text("Hello $name!")
// Text("Hello $name!")
}
}
// [END android_compose_tooling_local_inspection_mode]

// [START android_compose_tooling_multipreview_annotations]
@Preview(
name = "small font",
group = "font scales",
fontScale = 0.5f
//@Preview(
// name = "small font",
// group = "font scales",
//fontScale = 0.5f
)
@Preview(
name = "large font",
group = "font scales",
fontScale = 1.5f
//@Preview(
//name = "large font",
//group = "font scales",
//fontScale = 1.5f
)
annotation class FontScalePreviews
//annotation class FontScalePreviews
// [END android_compose_tooling_multipreview_annotations]

// [START android_compose_tooling_multipreview_usage]
@FontScalePreviews
@Composable
fun HelloWorldPreview() {
Text("Hello World")
//@FontScalePreviews
//@Composable
//fun HelloWorldPreview() {
// Text("Hello World")
}
// [END android_compose_tooling_multipreview_usage]

// [START android_compose_tooling_multipreview_combine]
@Preview(
name = "Spanish",
group = "locale",
locale = "es"
//@Preview(
// name = "Spanish",
// group = "locale",
//locale = "es"
)
@FontScalePreviews
annotation class CombinedPreviews
//@FontScalePreviews
//annotation class CombinedPreviews

@CombinedPreviews
@Composable
fun HelloWorldPreview2() {
MaterialTheme { Surface { Text(stringResource(R.string.hello_world)) } }
//@CombinedPreviews
//@Composable
//fun HelloWorldPreview2() {
// MaterialTheme { Surface { Text(stringResource(R.string.hello_world)) } }
}
// [END android_compose_tooling_multipreview_combine]

// [START android_compose_tooling_preview_bg_color]
@Preview(showBackground = true, backgroundColor = 0xFF00FF00)
@Composable
fun WithGreenBackground() {
Text("Hello World")
//@Preview(showBackground = true, backgroundColor = 0xFF00FF00)
//@Composable
//fun WithGreenBackground() {
// Text("Hello World")
}
// [END android_compose_tooling_preview_bg_color]

// [START android_compose_tooling_preview_dimens]
@Preview(widthDp = 50, heightDp = 50)
@Composable
fun SquareComposablePreview() {
Box(Modifier.background(Color.Yellow)) {
Text("Hello World")
//@Preview(widthDp = 50, heightDp = 50)
//@Composable
//fun SquareComposablePreview() {
// Box(Modifier.background(Color.Yellow)) {
// Text("Hello World")
}
}
// [END android_compose_tooling_preview_dimens]

// [START android_compose_tooling_preview_locale]
@Preview(locale = "fr-rFR")
@Composable
fun DifferentLocaleComposablePreview() {
Text(text = stringResource(R.string.greeting))
//@Preview(locale = "fr-rFR")
//@Composable
//fun DifferentLocaleComposablePreview() {
// Text(text = stringResource(R.string.greeting))
}
// [END android_compose_tooling_preview_locale]

// [START android_compose_tooling_preview_system_ui]
@Preview(showSystemUi = true)
@Composable
fun DecoratedComposablePreview() {
Text("Hello World")
//@Preview(showSystemUi = true)/
//@Composable
//fun DecoratedComposablePreview() {
// Text("Hello World")
}
// [END android_compose_tooling_preview_system_ui]

// [START android_compose_tooling_preview_parameter_provider_composable]
@Preview
@Composable
fun UserProfilePreview(
@PreviewParameter(UserPreviewParameterProvider::class) user: User
) {
UserProfile(user)
//@Preview
//@Composable
//fun UserProfilePreview(
// @PreviewParameter(UserPreviewParameterProvider::class) user: User
) //{
//UserProfile(user)
}

// [START_EXCLUDE silent]
@Composable
fun UserProfile(user: User) {
//@Composable
//fun UserProfile(user: User) {
}
// [END_EXCLUDE]
// [END android_compose_tooling_preview_parameter_provider_composable]

// [START android_compose_tooling_preview_parameter_provider]
class UserPreviewParameterProvider : PreviewParameterProvider<User> {
override val values = sequenceOf(
User("Elise"),
User("Frank"),
User("Julia")
//class UserPreviewParameterProvider : PreviewParameterProvider<User> {
// override val values = sequenceOf(
// User("Elise"),
// User("Frank"),
//User("Julia")
)
}
// [END android_compose_tooling_preview_parameter_provider]

// [START android_compose_tooling_preview_parameter_provider_composable2]
@Preview
@Composable
fun UserProfilePreview2(
@PreviewParameter(UserPreviewParameterProvider::class, limit = 2) user: User
//@Preview
//@Composable
//fun UserProfilePreview2(
// @PreviewParameter(UserPreviewParameterProvider::class, limit = 2) user: User
) {
UserProfile(user)
//UserProfile(user)
}
// [END android_compose_tooling_preview_parameter_provider_composable2]


// [START android_compose_tooling_preview_parameter_provider_composable3]
class UserAgePreviewParameterProvider : PreviewParameterProvider<User> {
//class UserAgePreviewParameterProvider : PreviewParameterProvider<User> {
// Using a List internally for efficient index-based access
private val userList = listOf(
User(name = "Elise", age = 30),
User(name = "Frank", age = 31),
User(name = "Julia", age = 40)
// private val userList = listOf(
// User(name = "Elise", age = 30),
// User(name = "Frank", age = 31),
//User(name = "Julia", age = 40)
)

override val values = userList.asSequence()
// override val values = userList.asSequence()

override fun getDisplayName(index: Int): String? {
//override fun getDisplayName(index: Int): String? {
// Return null or an empty string to use the default index-based name
val user = userList.getOrNull(index) ?: return null
return "${user.name} - ${user.age}"
// val user = userList.getOrNull(index) ?: return null
//return "${user.name} - ${user.age}"
}
}
// [END android_compose_tooling_preview_parameter_provider_composable3]

// [START_EXCLUDE silent]
data class User(val name: String, val age: Int = 0)
//data class User(val name: String, val age: Int = 0)
// [END_EXCLUDE]

Choose a reason for hiding this comment

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

high

The entire content of this file has been commented out. If this code is no longer needed, it is best practice to delete it rather than commenting it out. This helps to keep the codebase clean and avoids confusion for other developers. Code history is preserved in version control, so it can be retrieved if necessary.

If there is a specific reason to temporarily disable this code, please add a comment explaining the context or document it in the pull request description.

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.

1 participant