Skip to content

Conversation

@hermannakos
Copy link
Collaborator

Test plan:

  • Unit tests pass (DashboardViewModelTest - 5 tests)
  • Instrumentation tests pass (DashboardScreenTest - 4 tests)
  • Feature flag toggles between old and new dashboard
  • Pull-to-refresh works on new dashboard
  • Drawer opens from toolbar hamburger menu
  • Dark/light mode works correctly
  • Landscape/tablet layout works correctly
  • Accessibility checks pass

refs: MBL-19452
affects: Student
release note: Dashboard redesign infrastructure with Jetpack Compose foundation

Checklist

  • Tested in dark mode
  • Tested in light mode
  • Test in landscape mode and/or tablet
  • A11y checked
  • Approve from product

hermannakos and others added 2 commits November 6, 2025 16:00
Implement Jetpack Compose-based dashboard foundation with feature flag routing:
- Create DashboardUiState with loading, error, refresh, and empty states
- Implement DashboardViewModel with pull-to-refresh and error retry callbacks
- Build DashboardScreenContent composable with toolbar and state-based UI
- Add DashboardFragment integrating with navigation drawer
- Set up feature flag (dashboard_redesign) for conditional routing
- Rename old DashboardFragment to OldDashboardFragment
- Add comprehensive unit and instrumentation tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Dashboard Redesign - Initial Implementation Review

This PR introduces the foundation for a new Compose-based dashboard implementation, along with useful base classes for use cases. The overall architecture follows good patterns with MVVM and Compose, though there are several issues that should be addressed.

Issues Found

  • DashboardScreenTest.kt:16 - Missing Hilt test rule setup despite @HiltAndroidTest annotation
  • DashboardScreenTest.kt:36 - Hardcoded test tags should be extracted to constants
  • DashboardViewModel.kt:52 - loadDashboard() is placeholder implementation with no actual data loading
  • DashboardViewModel.kt:33 - networkStateProvider injected but never used
  • DashboardViewModel.kt:67 - _refreshSignal emitted but no subscribers handle it
  • DashboardUiState.kt:19 - Callbacks stored in UI state (anti-pattern - should be direct ViewModel methods)
  • DashboardViewModelTest.kt:84 - Use assertFalse()/assertNull() instead of assertEquals(false/null, ...)
  • DashboardViewModelTest.kt:108 - testCallbacksExist() doesn't provide meaningful verification
  • DashboardModule.kt:23 - Empty Dagger module serves no purpose
  • UseCaseResult.kt:46 - Consider data object Loading for consistency

Positive Aspects

✅ Good separation of concerns with Fragment, Screen, ViewModel, and UiState
✅ Proper use of Hilt for dependency injection
✅ Comprehensive test coverage including both unit and UI tests
✅ Feature flag (DASHBOARD_REDESIGN) allows safe rollout
✅ Clean migration strategy preserving old dashboard as OldDashboardFragment
✅ Well-documented base use case classes with clear usage examples
✅ Proper use of StateFlow for reactive UI updates
✅ Pull-to-refresh implementation follows Material Design patterns

Recommendations

  1. Complete the implementation: The ViewModel currently doesn't load any actual dashboard data. Before merging, implement the data loading logic or clearly mark this as a WIP.

  2. Fix the UI state pattern: Move callbacks out of DashboardUiState and expose them as ViewModel methods that the UI calls directly.

  3. Clean up unused code: Remove unused dependencies (networkStateProvider, _refreshSignal) or implement their intended functionality.

  4. Improve test quality: Fix the Hilt setup in tests and make assertions more meaningful.

  5. Consider accessibility: Ensure test tags also serve as content descriptions where appropriate.

Security & Performance

No security concerns identified. Performance should be good with Compose, but actual dashboard data loading will need performance consideration when implemented.

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

📊 Code Coverage Report

⚠️ Student

  • PR Coverage: 43.64%
  • Master Coverage: 43.82%
  • Delta: -0.18%

✅ Teacher

  • PR Coverage: 25.58%
  • Master Coverage: 25.58%
  • Delta: +0.00%

⚠️ Pandautils

  • PR Coverage: 22.42%
  • Master Coverage: 22.43%
  • Delta: -0.00%

📈 Overall Average

  • PR Coverage: 30.55%
  • Master Coverage: 30.61%
  • Delta: -0.06%

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

Student Install Page

@instructure instructure deleted a comment from inst-danger Nov 7, 2025
@instructure instructure deleted a comment from inst-danger Nov 7, 2025
@instructure instructure deleted a comment from inst-danger Nov 7, 2025
@instructure instructure deleted a comment from inst-danger Nov 7, 2025
@hermannakos hermannakos changed the title [MBL-19452][Student] Dashboard Redesign MVP Infrastructure [MBL-19452][Student] Dashboard Redesign Infrastructure Nov 7, 2025
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