Skip to content

[3/3] onboarding favorite sport selector - #119

Open
amjiao wants to merge 69 commits into
mainfrom
onboarding3
Open

amjiao wants to merge 69 commits into
mainfrom
onboarding3

Conversation

@amjiao

@amjiao amjiao commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Implement favorite sport selector screen UI
Implement navigation from profile picture selector to this screen.
Includes logic to remember the selected profile picture

Changes Made

  • some updates to files from [2/3] to use colors from theme/Color.kt

OnboardingFavoriteSportScreen.kt:

  • main UI for this PR

MainActivity.kt:

  • navigation to favorite sport selection to profile picture selection
  • save the selected picture

Test Coverage

visually matches design

Screenshots (delete if not applicable)

Screen_recording_20261021_142511.webm

Summary by CodeRabbit

  • New Features
    • Added a favorite-sports onboarding step after profile selection, with gender filters and selectable sport options.
    • Favorite sport selections are saved and restored when onboarding resumes.
    • Added a shared onboarding footer with a step indicator and selection-aware finish button.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c815a16b-45c8-4bbf-965d-207f1e3ab05d
Walkthrough

Onboarding now includes a favorite-sport selection step after profile selection. The screen supports sport-and-gender selections, restores saved selections, and saves the chosen keys when onboarding finishes.

Changes: Favorite Sports Onboarding

Layer / File(s) Summary
Shared gender division filter
app/src/main/java/com/cornellappdev/score/components/GenderDivisionFilter.kt, app/src/main/java/com/cornellappdev/score/components/SportSelectorHeader.kt
Adds a reusable filter with All, Male, and Female choices. SportSelectorHeader now uses it instead of its inline selector.
Favorite-sport selection screen
app/src/main/java/com/cornellappdev/score/screen/OnboardingFavoriteSportsScreen.kt, app/src/main/java/com/cornellappdev/score/theme/Color.kt, app/src/main/res/drawable/ic_light_gray_*_gender.xml, app/src/main/res/values/strings.xml
Adds sport-and-gender selection, key parsing and formatting, filtered options, selectable cards, and selection-specific finish labels. Adds supporting strings, a color, and gender icons.
Onboarding steps and persistence
app/src/main/java/com/cornellappdev/score/screen/OnboardingFooter.kt, app/src/main/java/com/cornellappdev/score/screen/OnboardingProfileSelectScreen.kt, app/src/main/java/com/cornellappdev/score/MainActivity.kt, app/src/main/java/com/cornellappdev/score/screen/ProfilePictureOptions.kt
Adds a shared footer for the profile and sport selection steps. MainActivity restores saved sport keys, opens the new screen after profile selection, and saves the returned selections when onboarding finishes. The profile screen uses the shared footer and theme text color.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant MainActivity
  participant Preferences
  participant OnboardingFavoriteSportsScreen
  MainActivity->>Preferences: Read saved favorite-sport keys
  MainActivity->>OnboardingFavoriteSportsScreen: Provide saved selections
  OnboardingFavoriteSportsScreen->>MainActivity: Return selected FavoriteSport values
  MainActivity->>Preferences: Save selected sport keys
Loading

Suggested reviewers: helenjb, thisjustin123

Merge Risk: Low · previous review b715e

Onboarding offers sports unavailable in game views. This inconsistency is bounded and can be addressed or accepted before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed

Check name Status Explanation
Title check Passed The title clearly identifies the favorite sport selector as the main onboarding change and indicates that this is the third PR in a three-part stack.
Description check Passed The description includes the required Overview, Changes Made, and Test Coverage sections, and provides a screenshot. The optional sections are omitted appropriately. Test coverage is brief but still i…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes the required Overview, Changes Made, and Test Coverage sections, and provides a screenshot. The optional sections are omitted appropriately. Test coverage is brief but still identifies visual comparison as the validation method.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 8 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 50c339dd-c5f4-4a81-b901-228ea57f1a23
Commits

Reviewing files that changed from the base of the PR and between fc6358c and b715e63.

Files selected for processing: 11

  • app/src/main/java/com/cornellappdev/score/MainActivity.kt
  • app/src/main/java/com/cornellappdev/score/components/GenderDivisionFilter.kt
  • app/src/main/java/com/cornellappdev/score/components/SportSelectorHeader.kt
  • app/src/main/java/com/cornellappdev/score/screen/OnboardingFavoriteSportsScreen.kt
  • app/src/main/java/com/cornellappdev/score/screen/OnboardingFooter.kt
  • app/src/main/java/com/cornellappdev/score/screen/OnboardingProfileSelectScreen.kt
  • app/src/main/java/com/cornellappdev/score/screen/ProfilePictureOptions.kt
  • app/src/main/java/com/cornellappdev/score/theme/Color.kt
  • app/src/main/res/drawable/ic_light_gray_female_gender.xml
  • app/src/main/res/drawable/ic_light_gray_male_gender.xml
  • app/src/main/res/values/strings.xml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@amjiao
amjiao marked this pull request as ready for review October 21, 2026 22:13
@amjiao
amjiao added this pull request to stack #118 October 21, 2026 22:49
… into onboarding3

# Conflicts:
#	app/src/main/java/com/cornellappdev/score/MainActivity.kt
#	app/src/main/java/com/cornellappdev/score/screen/OnboardingProfileSelectScreen.kt
#	app/src/main/java/com/cornellappdev/score/screen/OnboardingScreen.kt
#	app/src/main/java/com/cornellappdev/score/screen/ProfilePictureOptions.kt
#	app/src/main/res/values/strings.xml
Added documentation for sampleTrack, address warning with ImmutableList, remove unused parameter
… into onboarding2

# Conflicts:
#	app/src/main/java/com/cornellappdev/score/screen/OnboardingScreen.kt
# Conflicts:
#	app/src/main/java/com/cornellappdev/score/MainActivity.kt
… into onboarding3

# Conflicts:
#	app/src/main/java/com/cornellappdev/score/MainActivity.kt
#	app/src/main/java/com/cornellappdev/score/screen/OnboardingProfileSelectScreen.kt

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

  • Fix comments: Fix CodeRabbit comments on this PR

@amjiao
amjiao requested a review from caleb-bit November 3, 2026 18:48

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

UI looks good, but I had some architecture concerns.

@amjiao

amjiao commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

I merged emil's favorite sport selection page (by pulling from main) and factored out the common UI

Base automatically changed from onboarding2 to main November 11, 2026 07:27
… onboarding3

# Conflicts:
#	app/src/main/java/com/cornellappdev/score/MainActivity.kt
#	app/src/main/java/com/cornellappdev/score/model/OnboardingPreferencesRepository.kt
#	app/src/main/java/com/cornellappdev/score/screen/OnboardingProfileSelectScreen.kt
#	app/src/main/java/com/cornellappdev/score/screen/OnboardingScreen.kt
#	app/src/main/java/com/cornellappdev/score/screen/ProfilePictureOptions.kt
#	app/src/main/res/values/strings.xml
@amjiao
amjiao requested a review from caleb-bit November 11, 2026 07:54

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

Looks good, just one fix requested.

.orEmpty()
.joinToString("|")

setContent {

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.

Could we refactor most of what's in setContent out of MainActivity?

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