refactor: Render icons via react-native-nano-icons#514
Conversation
- As it reduced its dependency footprint via: https://redirect.github.com/software-mansion-labs/react-native-nano-icons/pull/17
…tead of passing it as a prop
- It would be nice if they add support for reading the svg files from nested folders.
- Also there were still some places where we used the icon components.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds ChangesIcon System Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes |
…on on GitHub preview
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/components/Form/NumberStepper.tsx`:
- Around line 47-50: The plus button (icon="add") in the NumberStepper component
is using the wrong accessibility label template. Replace the accessibilityLabel
translation key from template.entryRemove to an appropriate increment-specific
label (such as template.entryAdd or a similar key that describes
adding/incrementing). The current label incorrectly announces the increment
control as a remove action instead of an add action.
🪄 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: f685e1cc-cfe1-4fac-8985-2014b9ab40df
⛔ Files ignored due to path filters (71)
mobile/android/app/src/main/assets/fonts/app-icons.ttfis excluded by!**/*.ttfmobile/assets/icons/app-icons/activity-zone.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/add.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/archive.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/arrow-back.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/autoplay.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/bar-chart-4-bars.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/cached.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/cancel.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/check-circle.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/check.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/close.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/color-wand.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/conversion-path.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/create-new-folder.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/delete.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/do-not-disturb-on.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/document-search.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/drag-handle.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/edit.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/favorite-filled.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/favorite.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/file-save.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/flask-filled.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/folder.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/format-paint.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/graph-1.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/graphic-eq.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/grid-view.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/history.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/home-filled.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/home.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/image.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/info.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/keyboard-arrow-down.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/link-off.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/logo-github.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/logo-google-playstore.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/low-priority.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/lyrics.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/mobile-arrow-down.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/more-horiz.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/more-vert.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/nothing-arrow-right.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/open-in-new.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/pause-filled.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/play-arrow-filled.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/playlist-add.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/queue-music.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/remove.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/repeat-one.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/repeat.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/save.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/schedule.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/search.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/settings.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/shuffle.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/skip-next-filled.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/skip-previous-filled.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/slow-motion-video.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/sort.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/timer.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/translate.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/view-agenda.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/view-module.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/visibility-off-filled.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/voice-selection.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/volume-up-filled.svgis excluded by!**/*.svgmobile/assets/icons/app-icons/warning.svgis excluded by!**/*.svgmobile/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlmobile/src/resources/icons/app-icons.ttfis excluded by!**/*.ttf
📒 Files selected for processing (130)
THIRD_PARTY.mdmobile/app.config.tsmobile/assets/icons/README.mdmobile/package.jsonmobile/src/components/Base/AnimatedMaterialSymbol.tsxmobile/src/components/Form/Button/Icon.tsxmobile/src/components/Form/Checkbox.tsxmobile/src/components/Form/NumberStepper.tsxmobile/src/components/Form/Radio.tsxmobile/src/components/Form/SegmentedPicker.tsxmobile/src/components/Form/Slider.tsxmobile/src/components/List/RemovableItem.tsxmobile/src/components/Swipeable.tsxmobile/src/modules/audio/_components/AudioEffectSlider.tsxmobile/src/modules/audio/_components/PlaybackParameterSettings.tsxmobile/src/modules/audio/_components/PlaybackParameterSlider.tsxmobile/src/modules/audio/_components/VolumeSettings.tsxmobile/src/modules/customization/font/screens/CreateView.tsxmobile/src/modules/customization/font/screens/View.tsxmobile/src/modules/customization/theme/screens/View.tsxmobile/src/modules/form/FormState/FormInput.tsxmobile/src/modules/form/FormState/index.tsxmobile/src/modules/lyric/components/LyricsOverlay.tsxmobile/src/modules/lyric/screens/CurrentView.tsxmobile/src/modules/lyric/screens/ProviderView.tsxmobile/src/modules/lyric/screens/View.tsxmobile/src/modules/media/components/MediaControls.tsxmobile/src/modules/media/components/MediaImage.tsxmobile/src/modules/media/components/MediaListControls.tsxmobile/src/modules/media/components/Track.tsxmobile/src/modules/scanning/components/ScanningProgressView.tsxmobile/src/modules/search/components/SearchBar.tsxmobile/src/navigation/components/BottomActions/MiniPlayer.tsxmobile/src/navigation/components/BottomActions/NavActions.tsxmobile/src/navigation/components/CurrentListMenu.tsxmobile/src/navigation/components/TopAppBar.tsxmobile/src/navigation/layouts/CurrentListLayout.tsxmobile/src/navigation/layouts/NScrollLayout.tsxmobile/src/navigation/screens/HomeView.tsxmobile/src/navigation/screens/albums/CurrentView.tsxmobile/src/navigation/screens/now-playing/UpcomingView.tsxmobile/src/navigation/screens/now-playing/View.tsxmobile/src/navigation/screens/now-playing/components/TopAppBar.tsxmobile/src/navigation/screens/now-playing/sheets/PlaybackOptionsSheet.tsxmobile/src/navigation/screens/playlists/CurrentView.tsxmobile/src/navigation/screens/playlists/View.tsxmobile/src/navigation/screens/playlists/components/ModifyViewBase.tsxmobile/src/navigation/screens/playlists/sheets/ExportM3USheet.tsxmobile/src/navigation/screens/settings/AppUpdateView.tsxmobile/src/navigation/screens/settings/ExperimentalSettingsView.tsxmobile/src/navigation/screens/settings/HiddenTracksView.tsxmobile/src/navigation/screens/settings/PackageLicenseView.tsxmobile/src/navigation/screens/settings/View.tsxmobile/src/navigation/screens/settings/sheets/LanguageSheet.tsxmobile/src/navigation/screens/settings/sheets/ScanFilterListSheet.tsxmobile/src/navigation/screens/settings/sheets/SeparatorsSheet.tsxmobile/src/navigation/screens/settings/sheets/TabOrderSheet.tsxmobile/src/navigation/screens/tracks/ModifyView.tsxmobile/src/navigation/screens/tracks/sheets/TrackSheet.tsxmobile/src/navigation/sheets/ViewOptionsSheet.tsxmobile/src/resources/icons/ActivityZone.tsxmobile/src/resources/icons/Add.tsxmobile/src/resources/icons/Archive.tsxmobile/src/resources/icons/ArrowBack.tsxmobile/src/resources/icons/AutoPlay.tsxmobile/src/resources/icons/BarChart4Bars.tsxmobile/src/resources/icons/Cached.tsxmobile/src/resources/icons/Cancel.tsxmobile/src/resources/icons/Check.tsxmobile/src/resources/icons/CheckCircle.tsxmobile/src/resources/icons/Close.tsxmobile/src/resources/icons/ColorWand.tsxmobile/src/resources/icons/ConversionPath.tsxmobile/src/resources/icons/CreateNewFolder.tsxmobile/src/resources/icons/Delete.tsxmobile/src/resources/icons/DoNotDisturbOn.tsxmobile/src/resources/icons/DocumentSearch.tsxmobile/src/resources/icons/DragHandle.tsxmobile/src/resources/icons/Edit.tsxmobile/src/resources/icons/Favorite.tsxmobile/src/resources/icons/FileSave.tsxmobile/src/resources/icons/Flask.tsxmobile/src/resources/icons/Folder.tsxmobile/src/resources/icons/FormatPaint.tsxmobile/src/resources/icons/Graph1.tsxmobile/src/resources/icons/GraphicEQ.tsxmobile/src/resources/icons/GridView.tsxmobile/src/resources/icons/History.tsxmobile/src/resources/icons/Home.tsxmobile/src/resources/icons/Image.tsxmobile/src/resources/icons/Info.tsxmobile/src/resources/icons/KeyboardArrowDown.tsxmobile/src/resources/icons/LinkOff.tsxmobile/src/resources/icons/LogoGitHub.tsxmobile/src/resources/icons/LogoPlayStore.tsxmobile/src/resources/icons/LowPriority.tsxmobile/src/resources/icons/Lyrics.tsxmobile/src/resources/icons/MobileArrowDown.tsxmobile/src/resources/icons/MoreHoriz.tsxmobile/src/resources/icons/MoreVert.tsxmobile/src/resources/icons/NothingArrowRight.tsxmobile/src/resources/icons/OpenInNew.tsxmobile/src/resources/icons/Pause.tsxmobile/src/resources/icons/PlayArrow.tsxmobile/src/resources/icons/PlaylistAdd.tsxmobile/src/resources/icons/QueueMusic.tsxmobile/src/resources/icons/Remove.tsxmobile/src/resources/icons/Repeat.tsxmobile/src/resources/icons/RepeatOne.tsxmobile/src/resources/icons/Save.tsxmobile/src/resources/icons/Schedule.tsxmobile/src/resources/icons/Search.tsxmobile/src/resources/icons/Settings.tsxmobile/src/resources/icons/Shuffle.tsxmobile/src/resources/icons/SkipNext.tsxmobile/src/resources/icons/SkipPrevious.tsxmobile/src/resources/icons/SlowMotionVideo.tsxmobile/src/resources/icons/Sort.tsxmobile/src/resources/icons/Timer.tsxmobile/src/resources/icons/Translate.tsxmobile/src/resources/icons/ViewAgenda.tsxmobile/src/resources/icons/ViewModule.tsxmobile/src/resources/icons/VisibilityOff.tsxmobile/src/resources/icons/VoiceSelection.tsxmobile/src/resources/icons/VolumeUp.tsxmobile/src/resources/icons/Warning.tsxmobile/src/resources/icons/app-icons.glyphmap.jsonmobile/src/resources/icons/index.tsxmobile/src/resources/icons/type.tsmobile/src/resources/licenses.json
💤 Files with no reviewable changes (67)
- mobile/src/resources/icons/Close.tsx
- mobile/src/resources/icons/Edit.tsx
- mobile/src/resources/icons/Add.tsx
- mobile/src/resources/icons/LowPriority.tsx
- mobile/src/resources/icons/DocumentSearch.tsx
- mobile/src/resources/icons/PlaylistAdd.tsx
- mobile/src/resources/icons/Search.tsx
- mobile/src/resources/icons/RepeatOne.tsx
- mobile/src/resources/icons/Shuffle.tsx
- mobile/src/resources/icons/LogoPlayStore.tsx
- mobile/src/resources/icons/GraphicEQ.tsx
- mobile/src/resources/icons/Image.tsx
- mobile/src/resources/icons/Cancel.tsx
- mobile/src/resources/icons/Graph1.tsx
- mobile/src/resources/icons/Flask.tsx
- mobile/src/resources/icons/Home.tsx
- mobile/src/resources/icons/LogoGitHub.tsx
- mobile/src/resources/icons/PlayArrow.tsx
- mobile/src/resources/icons/Remove.tsx
- mobile/src/resources/icons/Delete.tsx
- mobile/src/resources/icons/Lyrics.tsx
- mobile/src/resources/icons/Repeat.tsx
- mobile/src/resources/icons/VolumeUp.tsx
- mobile/src/resources/icons/ArrowBack.tsx
- mobile/src/resources/icons/Translate.tsx
- mobile/src/resources/icons/OpenInNew.tsx
- mobile/src/resources/icons/Pause.tsx
- mobile/src/resources/icons/VisibilityOff.tsx
- mobile/src/resources/icons/AutoPlay.tsx
- mobile/src/resources/icons/type.ts
- mobile/src/resources/icons/History.tsx
- mobile/src/resources/icons/SkipPrevious.tsx
- mobile/src/resources/icons/Cached.tsx
- mobile/src/resources/icons/Warning.tsx
- mobile/src/resources/icons/ConversionPath.tsx
- mobile/src/resources/icons/ViewModule.tsx
- mobile/src/resources/icons/Favorite.tsx
- mobile/src/resources/icons/VoiceSelection.tsx
- mobile/src/resources/icons/CheckCircle.tsx
- mobile/src/resources/icons/BarChart4Bars.tsx
- mobile/src/resources/icons/DragHandle.tsx
- mobile/src/resources/icons/LinkOff.tsx
- mobile/src/resources/icons/KeyboardArrowDown.tsx
- mobile/src/resources/icons/Schedule.tsx
- mobile/src/resources/icons/Save.tsx
- mobile/src/resources/icons/DoNotDisturbOn.tsx
- mobile/src/resources/icons/FileSave.tsx
- mobile/src/resources/icons/FormatPaint.tsx
- mobile/src/resources/icons/ViewAgenda.tsx
- mobile/src/resources/icons/Sort.tsx
- mobile/src/resources/icons/ActivityZone.tsx
- mobile/src/resources/icons/SlowMotionVideo.tsx
- mobile/src/resources/icons/Info.tsx
- mobile/src/resources/icons/CreateNewFolder.tsx
- mobile/src/resources/icons/SkipNext.tsx
- mobile/src/resources/icons/GridView.tsx
- mobile/src/resources/icons/Check.tsx
- mobile/src/resources/icons/NothingArrowRight.tsx
- mobile/src/resources/icons/MobileArrowDown.tsx
- mobile/src/resources/icons/ColorWand.tsx
- mobile/src/resources/icons/QueueMusic.tsx
- mobile/src/resources/icons/MoreHoriz.tsx
- mobile/src/resources/icons/MoreVert.tsx
- mobile/src/resources/icons/Archive.tsx
- mobile/src/resources/icons/Folder.tsx
- mobile/src/resources/icons/Timer.tsx
- mobile/src/resources/icons/Settings.tsx
Why
This PR has it so that icons are now rendered via
react-native-nano-iconsinstead of JSX components created usingreact-native-svg. This is is done by converting raw.svgfiles into a single font file. At the cost of~0.05 MBin increased app size, we should see slightly better render times.With this API of rendering the icons via a font file, we can create a new
Iconcomponent to:.svgfile to a folder.nameprop on theIconcomponent instead of fixing import names.Note
We disabled

allowFontScalingon the rendered icon as it will randomly shift and look out of place. For example (on Pixel Fold Simulator):Checklist
pnpm sync:licenses.pnpm android:prod.Summary by CodeRabbit
Summary
Refactor
Bug Fixes
Documentation
Chores