Skip to content

Extracted Code Snippets for Architecture - UILayer.kt - #1101

Open
djubinville wants to merge 1 commit into
android:katherinekuan/ui-layer-snippetsfrom
StellarElements:katherinekuan/ui-layer-snippets
Open

djubinville wants to merge 1 commit into
android:katherinekuan/ui-layer-snippetsfrom
StellarElements:katherinekuan/ui-layer-snippets

Conversation

@djubinville

@djubinville djubinville commented Sep 15, 2026

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 15, 2026 23:16
@djubinville
djubinville requested review from srikrishnasakunia and removed request for a team September 15, 2026 23:16
@google-cla

google-cla Bot commented Sep 15, 2026

Copy link
Copy Markdown

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.

@djubinville djubinville changed the title Code snippets are for: Extracted Code Snippets for Architecture - UILayer.kt Sep 15, 2026
https://developer.android.com/topic/architecture/ui-layer
cc @kkuan2011

List of modifications:

UI layer page: Migrated 8 Kotlin code snippets to compose/snippets/src/main/java/com/example/compose/snippets/architecture/UiLayer.kt:
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.
Cleaned up .gitignore to omit local reports/ directory.
Snippets not migrated:

None; all 8 snippets on the page were migrated.
@djubinville
djubinville force-pushed the katherinekuan/ui-layer-snippets branch from 05671ed to 6294e3a Compare September 16, 2026 20:24

@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.

When I click on "Files changed", I don't see the new snippets you added. Is the diff showing up for you as you expect?

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