feat(catalog): modern Compose sample catalog, Key API signatures, and Reviewer mode - #2413
Draft
dkhawk wants to merge 36 commits into
Draft
feat(catalog): modern Compose sample catalog, Key API signatures, and Reviewer mode#2413dkhawk wants to merge 36 commits into
dkhawk wants to merge 36 commits into
Conversation
…ctive verification dashboard, and falsifiable test suites - Restructure snippets into dual-language Kotlin (kotlin-app) and Java (java-app) modules with TrackedMap wrapping GoogleMap for deterministic programmatic state verification - Implement comprehensive 2D Maps SDK capability catalog covering Map Initialization, Camera Controls, Markers, Events, Overlays, Shapes, Dataset Layers, Data-Driven Boundaries, and Cloud Customization - Build interactive verification dashboard (MANUAL_VERIFY_CATALOG.html) served via test/server.py (port 8888) with live Gradle test execution, ADB sample launcher, process cancellation, and real-time rating storage (ratings_db.json) - Implement scientific Falsifiable Testing Standard (FALSIFIABLE_TASK_LIST.md) across dual-language test suites (CatalogCapabilitiesTestSuite, MarkerSnippetsTest, CameraControlSnippetsTest, MapInitSnippetsTest, EventsSnippetsTest)
…ask wizard - Standardized @SnippetItem descriptions with explicit 'What it does' and 'How to see the effect' guidance across 25 snippet classes (Kotlin + Java) - Added interactive Verification Task Wizard and auto-advancing queue to MANUAL_VERIFY_CATALOG.html and test/server.py - Synchronized FALSIFIABLE_TASK_LIST.md task completion and rating status
…eviewer mode - Rebase extended samples stack on latest main - Introduce @sample annotation with title, description, HTML expectations, complexity scale, and hashtags - Implement Room database (SampleCatalogDatabase), DAO, and SampleReviewRepository singleton for persistence - Implement on-device Reviewer Mode with status evaluations (Passing, Needs Work, Unchecked) and reviewer notes - Implement Airing of Grievances markdown report generator and shared storage exporter - Implement UnifiedCatalogActivity with framework switcher, real-time search, complexity chips, and hashtag filters - Enhance SamplesBaseActivity (Kotlin & Java) with in-sample criteria viewing, evaluation bottom sheet, and cross-framework switcher - Annotate sample activities across Kotlin and Java demo applications
…mode - Enable Jetpack Compose in ApiDemos:common-ui and ApiDemos:kotlin-app - Add Material 3 CatalogTheme with light and dark color schemes - Implement modern CatalogScreen composable supporting both User Catalog mode and Code Reviewer mode - Isolate the 'Airing of Grievances' component (Room DB, status evaluation toggles, notes editor, and Markdown exporter) strictly to the Reviewer UI - Create standalone Compose CatalogActivity (public catalog) and ReviewerActivity (on-device validation & grievances) - Maintain unified single versions of the catalog and reviewer apps across Kotlin and Java modules
… and Java - Update SampleItem and SampleCatalogRegistry to use Fully Qualified Class Names (FQCN) as evaluation identifiers - Scope Framework enum to Kotlin Views and Java Views (Compose lives in android-maps-compose repository) - Update Compose CatalogScreen tabs to Kotlin and Java - Update SampleReviewRepository to record reviews and grievances keyed by target activity FQCN - Update GrievanceReportExporter to prominently feature FQCN target identifiers and framework breakdowns
… to catalog - Isolate all code viewer components inside common-ui module (CodeHighlighter, CodeSnippetView, SampleCodeProvider) - Implement pure-Compose syntax highlighter tokenizing keywords, annotations, types, numbers, strings, and comments - Add CodeSnippetView with Kotlin/Java language tabs, line number gutter, monospace formatting, and one-tap clipboard copy - Embed CodeSnippetView directly in the sample expectations sheet for all samples and snippets
…-screen dialog - Replace cramped bottom sheet with SampleDetailFullScreenDialog for comfortable code inspection and reviews - Fix reviewer button layout wrapping (clear, full-width status selection for Passing, Needs Work, Unchecked) - Expand code snippet viewer to full width with generous vertical room and line numbers gutter - Add top app bar navigation and pinned bottom action bar with cross-framework launcher
…quick evaluation dialogs - Add Good Job (👍 Pass) and Something's Wrong (⚠️ Issue) action buttons to top app bar in running samples (Kotlin and Java SamplesBaseActivity) - Add Criteria & Purpose (ℹ️) top bar action to view sample purpose, success criteria, failure watch-outs, and source code snippet on demand - Create ReviewEvaluationDialog allowing reviewers to record pass or issues with custom feedback notes directly from the running sample - Add in-card quick grading buttons (👍 Good Job,⚠️ Issue) with note dialogs on the Catalog/Reviewer list view for crash-resistant grading
…attachment - Add BasicMapReviewerUiTest verifying toolbar action buttons and supportActionBar binding - Fix SamplesBaseActivity (Kotlin & Java) to attach topBar as supportActionBar, enabling top app bar action icons - Verify test failure prior to fix and clean 100% test pass on connected Pixel 6
…e back navigation - Implement Compose AnimatedVisibility with spring physics transforms and NestedScrollConnection: scrolling down through samples smoothly collapses tabs, search bar, and filter chips for full screen real estate - Add instant filter toggle action button and dynamic subtitle showing active framework and sample count - Implement navigateBackToCatalog() in Kotlin & Java SamplesBaseActivity: tapping the toolbar back arrow (or android.R.id.home) reliably returns the user to the samples catalog screen
- Add Unchecked Only badged toggle button to TopAppBar in reviewer mode - Add dynamic status filter chips (All Status, ⚪ Unchecked, 🔴 Needs Work, 🟢 Passing) showing real-time counts - Dynamically filter sample list based on evaluation status in Room DB
- Route the primary launcher entry point (MainActivity in Kotlin and Java) directly to the Jetpack Compose ReviewerActivity - Display the Airing of Grievances Floating Action Button and TopAppBar action directly upon app launch
…e Report - Change FAB to a clean icon-only FloatingActionButton with assessment icon - Rename Airing of Grievances to Generate Report and Evaluation Report across UI, share chooser, and generated markdown headers
- Create res/xml/file_paths.xml configured for external_files, reports, and cache directories - Declare androidx.core.content.FileProvider in kotlin-app and java-app AndroidManifest.xml - Save markdown evaluation reports to external files directory without requiring legacy storage permissions - Add content URI permissions and direct markdown text stream to ACTION_SEND share intent
- Add clearAllEvaluations and deleteEvaluation to SampleReviewRepository - Add sweep/clear action icon in TopAppBar when evaluations exist - Implement confirmation AlertDialog before wiping evaluations back to Unchecked - Add individual sample Reset option in full screen detail dialog
- Enable WindowInsetsControllerCompat BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE and hide systemBars in SamplesBaseActivity (Kotlin & Java) - Remove awkward subtitle line to provide clean, uncrowded single-line titles in sample top app bar - Adjust topBar and mapContainer insets to respect camera cutouts without redundant status bar paddings - Verify 100% pass on BasicMapReviewerUiTest
…-integrated header and add reset options menu - Embed Framework Tabs, Search Bar, and Filter Chips inside LazyColumn for 120Hz butter-smooth scrolling without threshold snaps or layout judder - Add direct Restart/Reset icon button in TopAppBar - Add More Options (⋮) overflow menu with Reset All Evaluations, Generate Report, and Filter Unchecked Only - Add jump-to-search action icon in TopAppBar to instantly scroll to top
- Collapse reviewed samples (PASSING and NEEDS_WORK) by default to a compact single-line row showing Title, Status badge, category, and expand chevron - Allow clicking any collapsed card or chevron to expand full details, notes, and quick action buttons - Keep unchecked samples expanded by default for quick grading and reviewing
…d status badge only - Eliminate cluttered/overlapping sublines in collapsed card state - Show title, status badge, quick play button, and expand chevron cleanly on a single line - Fix duplicate 'Kotlin Kotlin Views' top bar subtitle
…t in ProgrammaticDemoActivity - Fix NullPointerException when launching ProgrammaticDemoActivity where no XML layout exists - Update SamplesBaseActivity.applyInsets to accept nullable View and perform null checks - Safely attach window insets to android.R.id.content for programmatically instantiated map fragments
… top app bar - Create activity_sample_base.xml with standard MaterialToolbar and FrameLayout container - Update SamplesBaseActivity (Kotlin & Java) to automatically provide the top app bar for all samples - Wrap child content views if top_bar is omitted in their XML layout - Enable programmatic samples like ProgrammaticDemoActivity to attach directly to sample_content_container with full top app bar functionality (back navigation, title, reviewer grading actions, criteria modal, and framework switching)
- Set contentInsetStartWithNavigation to 0dp and apply TitleMedium text style - Keep primary grading actions (Good Job / Something's Wrong) always visible while moving secondary actions (Criteria / Framework Switch) to overflow menu - Set supportActionBar.title dynamically from SampleCatalogRegistry so full sample names render cleanly without ellipsis truncation
…m, and issue reporting
…ng, and add external editor reload
…ation using rememberSaveable
…dd Save & Next to catalog dialogs
…ighlights, and active tool label
…a & Purpose dialog
…atalog samples in Kotlin and Java
…on tags as single source of truth
…developer/reviewer modes - Replace full code snippets in sample details with concise, high-value Key API Calls - Add apiCalls property to @sample annotation and SampleCatalogRegistry across all 31 samples - Distinctly separate Developer/Learner Mode (MainActivity) from Reviewer/Grader Mode (ReviewerActivity) - Remove evaluation UI (success criteria, failure indicators, reviewer notes) from Developer Mode - Retain comprehensive grading, markup, notes, and sequential review tools in Reviewer Mode - Add scripts/verify_dev_cycle.sh for fast, automated end-to-end verification
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the modern Jetpack Compose Sample Catalog and Reviewer Mode across the repository, replacing full code snippets with high-value Key API signatures, cleanly bifurcating Developer/Learner Mode from Reviewer/Grader Mode, and providing deterministic automated verification tools.
Key Changes
Key API Calls (replacing full in-app code viewer):
SupportMapFragment.getMapAsync(...),GoogleMap.addMarker(...)).@Sampleannotation andSampleCatalogRegistrywith anapiCallsproperty across all 31 samples."Info & Code"to"About & APIs".Clean Separation of Developer and Reviewer Modes:
MainActivity): Clean, distraction-free educational experience focusing on sample description, taxonomy tags, Key API Calls, and launching samples, without any internal grading or evaluation widgets.ReviewerActivity): Dedicated internal QA tool equipped with:⚪ Unchecked (31),🔴 Needs Work,🟢 Pass).👍 Good Job,⚠️ Issue).▶️ Review Next (31)FAB.Save & Next ⏭️.Automated Verification Script (
scripts/verify_dev_cycle.sh):--scenario [dev-catalog | reviewer-catalog | sample | sample-info | full-suite | build-only | install-only].DevRel Hub Registration:
com.google.maps.samplehubvia ADB broadcast upon installation.Verification