Skip to content

Add UI Layer snippets - #1123

Open
djubinville wants to merge 1 commit into
android:mainfrom
StellarElements:ui-layer-snippets-new
Open

djubinville wants to merge 1 commit into
android:mainfrom
StellarElements:ui-layer-snippets-new

Conversation

@djubinville

Copy link
Copy Markdown

Extracted code snippets for page:

https://developer.android.com/topic/architecture/ui-layer

in file: compose/snippets/src/main/java/com/example/compose/snippets/architecture/UiLayer.kt

List of modifications:

UI layer page: Migrated 8 Kotlin code snippets to

android_architecture_ui_layer_news_ui_state
android_architecture_ui_layer_viewmodel_expose_state
android_architecture_ui_layer_viewmodel_mutable_state
android_architecture_ui_layer_viewmodel_fetch_articles
android_architecture_ui_layer_news_can_bookmark
android_architecture_ui_layer_news_fetching_state
android_architecture_ui_layer_latest_news_screen
android_architecture_ui_layer_news_user_messages

UI layer page: In android_architecture_ui_layer_viewmodel_expose_state, applied the D23 twin pattern on val uiState: NewsUiState = /* ... */ with silent exclude for compiling NewsUiState() to ensure clean compilation while preserving the placeholder on DAC per review feedback.

Snippets not migrated:

None; all 8 snippets on the page were migrated.

cc: @kkuan2011

@djubinville
djubinville requested a review from a team as a code owner September 21, 2026 17:01
@snippet-bot

snippet-bot Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 8 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@kkuan2011 kkuan2011 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great! Thank you David!

@kkuan2011
kkuan2011 enabled auto-merge (squash) September 23, 2026 21:00
@kkuan2011
kkuan2011 disabled auto-merge September 23, 2026 21:01
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.

3 participants