Conversation
📝 WalkthroughWalkthroughA reusable Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/src/main/java/com/cornellappdev/android/eatery/ui/screens/SupportScreen.kt (1)
289-305: Optional simplification: remove redundantRowwrapper aroundReportIssueButton.Line 290-305 can be flattened with no behavior change, reducing layout noise.
♻️ Suggested simplification
`@Composable` private fun ReportButton(onClick: () -> Unit) { - Row( - modifier = Modifier - .height(34.dp) - .fillMaxWidth() - .background(color = currentColors.backgroundDefault), - horizontalArrangement = Arrangement.Start - ) { - ReportIssueButton( - modifier = Modifier.fillMaxHeight(), - onClick = onClick, - textStyle = EateryBlueTypography.button, - containerColor = currentColors.accentPrimary, - contentColor = currentColors.textPrimary, - ) - } + ReportIssueButton( + modifier = Modifier + .height(34.dp) + .fillMaxWidth(), + onClick = onClick, + textStyle = EateryBlueTypography.button, + containerColor = currentColors.accentPrimary, + contentColor = currentColors.textPrimary, + ) }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/src/main/java/com/cornellappdev/android/eatery/ui/screens/SupportScreen.kt` around lines 289 - 305, The Row wrapper around ReportIssueButton is redundant; remove the Row and apply its layout modifiers directly to ReportIssueButton so the visual behavior stays identical: set ReportIssueButton's modifier to Modifier.height(34.dp).fillMaxWidth().background(currentColors.backgroundDefault) (and keep the original Modifier.fillMaxHeight behavior if needed by using height/fill as appropriate), preserving existing props textStyle = EateryBlueTypography.button, containerColor = currentColors.accentPrimary, and contentColor = currentColors.textPrimary in the ReportButton function.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@app/src/main/java/com/cornellappdev/android/eatery/ui/screens/SupportScreen.kt`:
- Around line 289-305: The Row wrapper around ReportIssueButton is redundant;
remove the Row and apply its layout modifiers directly to ReportIssueButton so
the visual behavior stays identical: set ReportIssueButton's modifier to
Modifier.height(34.dp).fillMaxWidth().background(currentColors.backgroundDefault)
(and keep the original Modifier.fillMaxHeight behavior if needed by using
height/fill as appropriate), preserving existing props textStyle =
EateryBlueTypography.button, containerColor = currentColors.accentPrimary, and
contentColor = currentColors.textPrimary in the ReportButton function.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e57e8117-8b28-4705-a702-ddc9c4c3cdbd
📒 Files selected for processing (4)
app/src/main/java/com/cornellappdev/android/eatery/ui/components/general/ReportIssueButton.ktapp/src/main/java/com/cornellappdev/android/eatery/ui/screens/EateryDetailScreen.ktapp/src/main/java/com/cornellappdev/android/eatery/ui/screens/SupportScreen.ktapp/src/main/res/drawable/ic_report.xml
| action = { | ||
| Row { | ||
| action = { onClick -> | ||
| Row(modifier = Modifier.clickable { onClick() }) { |
There was a problem hiding this comment.
Nit: was probably there before, but we can use TextButton instead of clickable rows
AndrewCheung360
left a comment
There was a problem hiding this comment.
LGTM. minor comment about TextButton from code that was there before.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/src/main/java/com/cornellappdev/android/eatery/ui/screens/SupportScreen.kt (1)
236-263: De-duplicate repeated reportactionlambdas.The three FAQ entries use the same
actionlambda. Consider extracting one shared local lambda to reduce repetition.Refactor sketch
+ val reportFaqAction: `@Composable` ((() -> Unit) -> Unit) = { onClick -> + ReportButton(onClick = onClick) + } + FAQCreation( title = stringResource(R.string.support_faq_wrong_menus_title), dropdownText = stringResource(id = R.string.wrong_empty_menus), - action = { onClick -> - ReportButton(onClick = onClick) - } + action = reportFaqAction ) { issue = Issue.ITEM showReportSheet = true } FAQCreation( title = stringResource(R.string.support_faq_closed_hours_title), dropdownText = stringResource(id = R.string.eatery_closed_when_open), - action = { onClick -> - ReportButton(onClick = onClick) - } + action = reportFaqAction ) { issue = Issue.HOURS showReportSheet = true } FAQCreation( title = stringResource(R.string.support_faq_wait_times_title), dropdownText = stringResource(id = R.string.wait_time_longer), - action = { onClick -> - ReportButton(onClick = onClick) - } + action = reportFaqAction ) { issue = Issue.WAIT_TIMES showReportSheet = true }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/src/main/java/com/cornellappdev/android/eatery/ui/screens/SupportScreen.kt` around lines 236 - 263, Extract the repeated ReportButton-producing lambda into a single local val (e.g., reportAction) and reuse it for each FAQCreation call instead of repeating the same inline lambda; specifically create a local lambda that accepts onClick and returns ReportButton(onClick = onClick), then replace the three FAQCreation action = { onClick -> ReportButton(onClick = onClick) } occurrences with action = reportAction while keeping the rest of each block (setting issue = Issue.ITEM/HOURS/... and showReportSheet = true) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@app/src/main/java/com/cornellappdev/android/eatery/ui/screens/SupportScreen.kt`:
- Around line 236-263: Extract the repeated ReportButton-producing lambda into a
single local val (e.g., reportAction) and reuse it for each FAQCreation call
instead of repeating the same inline lambda; specifically create a local lambda
that accepts onClick and returns ReportButton(onClick = onClick), then replace
the three FAQCreation action = { onClick -> ReportButton(onClick = onClick) }
occurrences with action = reportAction while keeping the rest of each block
(setting issue = Issue.ITEM/HOURS/... and showReportSheet = true) unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 72b5a8ab-c50a-4ab3-b3f9-1c5fdca9cb8a
📒 Files selected for processing (1)
app/src/main/java/com/cornellappdev/android/eatery/ui/screens/SupportScreen.kt
* Add Display settings with dark mode toggle and settings access from login - Add DisplayBottomSheet with Light / Dark / Device Theme radio options - Add Display row to SettingsScreen wired to ThemeViewModel - Expose isLoggedIn from ThemeViewModel; hide logout button when not logged in - Make settings list scrollable to prevent logout button from squishing - Add settings icon to LoginPage header so unauthenticated users can access settings - Add settings_display_* string resources Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add spacing below filter row in UpcomingMenuScreen Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Address CodeRabbit review comments - Use collectAsStateWithLifecycle() instead of collectAsState() for lifecycle-aware state collection - Set logout icon contentDescription to null to avoid TalkBack reading redundant icon label alongside visible "Log out" text Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Refactor theme state to ThemePreference enum; move isLoggedIn to SettingsViewModel - Add ThemePreference enum (LIGHT/DARK/SYSTEM) to data/models - Expose themePreferenceFlow from UserPreferencesRepository instead of nullable Boolean - Replace isDarkMode: StateFlow<Boolean?> with themePreference: StateFlow<ThemePreference> in ThemeViewModel; drop isLoggedIn - Add isLoggedIn: StateFlow<Boolean> to SettingsViewModel (injecting UserPreferencesRepository) - Update rememberResolvedDarkMode in Theme.kt to switch on ThemePreference enum - Update DisplayBottomSheet to accept ThemePreference param directly, removing private DisplayTheme enum - Update SettingsScreen to use ThemePreference and collect isLoggedIn from settingsViewModel Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix report issue button (#257) * Delayed nit fixes (#258) * Bump versions for patch release (#259) * Bump version * Update whatsnew --------- Co-authored-by: Andrew Cheung <andrewcheung360@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Overview
This PR fixes the report issue icon and the button shape.
Related PRs or Issues
Summary by CodeRabbit