Skip to content

feat: implement Jetpack Compose sample catalog - #2422

Open
dkhawk wants to merge 3 commits into
mainfrom
feat/compose-sample-catalog
Open

dkhawk wants to merge 3 commits into
mainfrom
feat/compose-sample-catalog

Conversation

@dkhawk

@dkhawk dkhawk commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Introduce :ApiDemos:common-ui with SampleCatalogRegistry, SampleMetadata, and SampleEvaluation domain models.
  • Implement CatalogScreen and CatalogActivity using Jetpack Compose with search, complexity/category filtering, and key API call signatures.
  • Wire CatalogActivity as the main launcher in kotlin-app and java-app manifests and MainActivity.
  • Per catalog architecture, rely on concise @Sample(apiCalls) signatures rather than embedding raw source code strings in the APK.

Stacked Base

Stacked on #2421 (chore/build-security-hygiene).

Reviewers

@kikoso @LoyalAbbas

@dkhawk
dkhawk force-pushed the feat/compose-sample-catalog branch from 7f4845b to d9bc7d6 Compare September 15, 2026 00:24
@dkhawk
dkhawk force-pushed the feat/compose-sample-catalog branch from d9bc7d6 to 970df98 Compare September 15, 2026 00:32
@dkhawk
dkhawk marked this pull request as ready for review September 15, 2026 00:38
@dkhawk
dkhawk requested review from LoyalAbbas and kikoso September 15, 2026 00:38
@snippet-bot

snippet-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

No region tags are edited in this PR.

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

@dkhawk
dkhawk added this pull request to stack #2429 September 15, 2026 00:42
popupMenu.show();
});
}
// [END_EXCLUDE]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Blocker (Why CI snippet-bot check is Failing)
SampleCodeProvider.kt Contains Unbalanced / Duplicate Region Tags
File: SampleCodeProvider.kt:L2426-L3029
Problem: SampleCodeProvider.kt embeds copy-pasted source code inside raw Kotlin string literals ("""..."""), including literal // [START ...] and // [END ...] documentation tags, plus an orphan // [END_EXCLUDE] at line 3029 with no matching // [START_EXCLUDE].
Impact: Google's snippet-bot scans all .kt/.java files in the repo for region tags and fails the PR because of duplicate tags and the unmatched [END_EXCLUDE].

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @LoyalAbbas! In 4ab1994b we stripped the literal region tags to resolve the snippet-bot failure. Furthermore, per our catalog architectural standard (favoring concise @Sample(apiCalls) signatures over embedding ~4,000 lines of raw source code strings in the APK), in 35231636 we completely removed SampleCodeProvider and unused snippet views. All CI checks are green.

@dkhawk
dkhawk force-pushed the feat/compose-sample-catalog branch from 970df98 to 4ab1994 Compare September 15, 2026 17:16

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Android Lint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Base automatically changed from chore/build-security-hygiene to main September 17, 2026 22:33
- Introduce :ApiDemos:common-ui with SampleCatalogRegistry and pure domain SampleEvaluation model
- Implement CatalogScreen and CatalogActivity using Jetpack Compose with search, framework filtering, and sample details
- Add syntax-highlighted CodeSnippetView and SampleCodeProvider
- Wire CatalogActivity as the main launcher in kotlin-app and java-app manifests and MainActivity
@dkhawk
dkhawk force-pushed the feat/compose-sample-catalog branch from 4ab1994 to 4206975 Compare September 17, 2026 22:33
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