# Sidebar Deep Audit — Methodology & Scoring Rubric

## Research Sources Used
- Google tv-material3: NavigationDrawer / NavigationDrawerItem API
- Android Developers: Focus in Compose, Change focus behavior/traversal
- Google TV: Focus System guide (developer.android.com/design/ui/tv)
- Material Design 3 Expressive (May 2025): NavigationRail replaces NavigationDrawer
- android/tv-samples: JetStreamCompose (official Google sample)
- Joe Birch (GDE): Navigation Drawers for Android TV using Jetpack Compose
- Prahalad Sharma: Android TV D-Pad Navigation Handling (Jetpack Compose)
- DestinyJob: TV-SideBar-Plugin (GitHub, MIT)
- Alex Zaitsev: Focus as state (Substack)
- Kodeco: Jetpack Compose Accessibility (Tori Gonda)
- Kotlin Multiplatform: Semantics properties docs
- XML2Compose: Building Accessible Apps with Compose guide
- Float Left Interactive: Google TV platform notes
- TO THE NEW: Migrating from Leanback to Jetpack Compose

## Audit Dimensions

### 1. Architecture — Custom vs Built-in NavigationDrawer
Compare against tv-material3 `NavigationDrawer` + `NavigationDrawerItem`. Custom approaches trade off automatic focus/state handling for visual freedom (glass, shimmer). Score based on: state management quality, focus routing correctness, and necessity of custom approach.

### 2. Focus Management
Compare against Google TV focus guidelines. Check: `focusRestorer`, `focusGroup`, `focusProperties` usage, programmatic focus moves, focus memory per zone, D-pad wrap behavior, sidebar→content routing, Menu key handler.

### 3. Accessibility (TalkBack)
Compare against WCAG 2.1 + Google TV accessibility docs. Check: `role = Role.Button`, `stateDescription`, `mergeDescendants`, `isTraversalGroup`, `contentDescription`, min 48dp touch target, traversalIndex, disabled item focusability.

### 4. Performance
Check: lazy loading (LazyColumn), stable keys, animation efficiency (animateColorAsState vs full recompose), shimmer gating, baseline profile, scroll animation guards.

### 5. Animation & UX
Check: label appear/disappear animation, shimmer sweep, scroll-to-item animation, content dim, sidebar open/close transition, focus indicator animation.

### 6. Code Quality & Maintainability
Check: single responsibility, state management pattern, string externalization, theme token usage, duplicate code, dead code.

## Scoring
- 9-10: Production-ready premium
- 7-8.9: Strong, few gaps
- 5-6.9: Functional but has notable gaps
- <5: Needs significant rework

## Top-Tier App Comparison Table

| Pattern | Netflix | Disney+ | YouTube | Max | Our App |
|---------|---------|---------|---------|-----|---------|
| Icon rail (~72dp) | ✅ | ✅ | Modal | ✅ | ✅ |
| Labels on focus | ✅ | Always visible | Always visible | Always visible | ✅ |
| Glass/blur | ❌ | ❌ | ❌ | ❌ | ✅ (differentiator) |
| Focus memory | ✅ | ✅ | ✅ | ✅ | ✅ (fixed) |
| Menu key handler | ✅ | ✅ | ✅ | ✅ | ✅ (fixed) |
| Wrap-around | ✅ | ✅ | ❌ | ❌ | ✅ (fixed) |
| 48dp touch target | ✅ | ✅ | ✅ | ✅ | ✅ (fixed) |
| Accessibility compliant | ✅ | ✅ | ✅ | ✅ | ✅ (fixed) |
