refactor: More centralization of "Audio Effect" code#505
Conversation
- For consistency as we show the `+` at 0 for the Pre-amp slider
…m "Playback Options" sheet
- Follows the same idea as the "ReplayGain Pre-amp" feature.
- This bugged me a bit and the cause was due to us changing the background color on press, but not the marquee color.
- It'll only show up in the "Audio Effects" screen if we navigate here via the "Playback Options" sheet.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughConsolidates audio settings: makes AudioEffects screen route-param-aware and conditionally shows hidden controls, moves playback speed into the segmented list, extracts Equalizer and PreAmp sliders into components, refactors EQ graph width to context, and updates navigation and icon usage. ChangesAudio Effects Screen and Component Refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 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. 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@mobile/src/modules/audio/_screens.tsx`:
- Around line 11-15: The component AudioEffectsView destructures showHidden from
route.params unguarded which will throw if route or params is undefined; update
the render to safely access the optional param (e.g., read route first and then
compute showHidden with optional chaining/default: use route?.params?.showHidden
?? <safe-default>) or provide a default params object before destructuring so
that references to route.params and showHidden inside AudioEffectsView are
always safe.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 65fac5bf-7941-4933-bf96-eb0f37bd10c7
📒 Files selected for processing (17)
mobile/src/modules/audio/_components/PlaybackSpeedSetting.tsxmobile/src/modules/audio/_screens.tsxmobile/src/modules/audio/equalizer/components/EQGraph.tsxmobile/src/modules/audio/equalizer/components/EqualizerSettings.tsxmobile/src/modules/audio/equalizer/components/FrequencySlider.tsxmobile/src/modules/audio/equalizer/core/actions.tsmobile/src/modules/audio/equalizer/core/constants.tsmobile/src/modules/audio/equalizer/core/store.tsmobile/src/modules/audio/replayGain/components/PreAmpSlider.tsxmobile/src/modules/audio/replayGain/components/ReplayGainSettings.tsxmobile/src/modules/equalizer/screens/View.tsxmobile/src/modules/scanning/hooks/useSetup.tsmobile/src/navigation/components/MiniPlayer.tsxmobile/src/navigation/routes.tsxmobile/src/navigation/screens/now-playing/sheets/PlaybackOptionsSheet.tsxmobile/src/navigation/screens/settings/ExperimentalSettingsView.tsxmobile/src/resources/icons/Equalizer.tsx
💤 Files with no reviewable changes (3)
- mobile/src/resources/icons/Equalizer.tsx
- mobile/src/modules/equalizer/screens/View.tsx
- mobile/src/navigation/routes.tsx
Why
A quick overview of the changes:
+0instead of0on the Equalizer sliders.~/modules/equalizercode into~/modules/audio/equalizer.Audio Effectsscreen, following a the design used for theReplayGainsettings.Playback Optionssheet now shows aAudio Effectsbutton instead of theEqualizerbutton.Audio Effectsscreen this way will reveal additional settings (currently thePlayback Speedsettings is shown this way).<Miniplayer />component when it was pressed.We plan for the
Audio Effectsscreen to contain all the settings. Some of these settings will only show up when we navigate to it from the "Now Playing" screen. This method saves a couple of steps if the user wanted to manipulate multiple settings while on the "Now Playing" screen (previously would require open the sheet multiple times).Checklist
pnpm sync:licenses.pnpm android:prod.Summary by CodeRabbit
New Features
Improvements