NWACus / avy

Mobile-Native Viewing of NAC Avalanche Forecasts
MIT License
10 stars 6 forks source link

Pick a single icon set if possible, and preload it #82

Open floatplane opened 1 year ago

floatplane commented 1 year ago

1) Right now we use a mixture of icons from five icon sets. This isn't good from a memory usage or a visual consistency standpoint. Designers have been using the AntDesign icons so we should probably follow suit.

❯ rg "import.*vector-icons"
components/AvalancheForecastZoneMap.tsx
20:import {FontAwesome5} from '@expo/vector-icons';

components/TelemetryStationMap.tsx
4:import {FontAwesome5} from '@expo/vector-icons';

components/icons/nac-icons.tsx
1:import {createIconSet} from '@expo/vector-icons';

components/content/Carousel.tsx
5:import {AntDesign, FontAwesome5} from '@expo/vector-icons';

components/content/Card.tsx
6:import {FontAwesome} from '@expo/vector-icons';

components/DangerScale.tsx
3:import {MaterialIcons} from '@expo/vector-icons';

components/Observations.tsx
8:import {FontAwesome, MaterialCommunityIcons} from '@expo/vector-icons';

components/Observation.tsx
5:import {FontAwesome5, MaterialCommunityIcons, Fontisto} from '@expo/vector-icons';

App.tsx
7:import {AntDesign} from '@expo/vector-icons';

2) We should preload icons so they're ready to go when we need them - https://docs.expo.dev/archive/classic-updates/preloading-and-caching-assets/#pre-loading-and-caching-assets

stevekuznetsov commented 11 months ago

@floatplane looks like we pre-load fonts these days but not icons, this seems relevant still.

stevekuznetsov commented 6 months ago

@beaucollins I'm not sure if our startup/loading time is at all an issue, anecdotally it does not seem to be, but this may be something we can improve on for bundle size etc.