kkemple / hwyd

How Was Your Day? Quickly track your ups and downs
37 stars 9 forks source link

add android and ios specific app icon and splash pngs #17

Closed rdela closed 6 years ago

rdela commented 6 years ago

closes #7, closes #8

per expo docs thx @SaraVieira <3 https://github.com/kkemple/hwyd/issues/7#issuecomment-374808423

went with the 1242 × 2436 splash size https://docs.expo.io/versions/latest/guides/splash-screens.html#make-a-splash-image

but made sure the face and text would not be wider than iPhone SE, 640px https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/launch-screen/

so I could set resizeMode to cover and not worry about background color since we have a gradient bg

added keys in app.json

[…]
"icon": "./assets/icons/hwyd-icon-sq-1024.png",
  "ios": {
    "icon": "./assets/icons/hwyd-icon-sq-1024.png"
  },
  "android": {
    "icon": "./assets/icons/hwyd-icon-circle-full-1024.png"
  },
  "splash": {
    "image": "./assets/icons/hwyd-splash-1242x2436.png",
    "resizeMode": "cover"
  },
[…]

ios sim iphone x 11.2

splash-ios-20180322-153316

android emulator nexus 5x api 27 x86

splash-android-1521766275

also looks p. cute in xde dash

splash-xde-20180322-175930

SaraVieira commented 6 years ago

What is that expo app?

rdela commented 6 years ago

Good idea on shrinking splash icon. Was concerned about spilling off-screen on non-hi-res (1:1) pixel ratios anyway, reducing this much solves. Wanna try 160px wide below …is half 320 / quarter 640, so margin ratios should look nice on skinniest phones and typical width.

The app is XDE and I lurrrrrrve it. https://github.com/expo/xde https://expo.io/tools#xde

It soooooo fancy 🎩

Syncs w/ expo client too, so a second or two after you copy the exp:// URL on desktop, thinking you are going to email it to yourself or whatever, it just appears in client, ready for you to tap on.

Also think XDE did some reverse URL magic to get ADB/android emulator talkin to expo service that the CLI might have been able to do, but XDE made easy.

The Restart button is my buddy as well, not strictly necessary but nice to have 🔄🔘💘

rdela commented 6 years ago

Ok think this does the trick, 160px W logo

reduce splash logo to 160px W, for a whopping 3x file size drop :) 29,125 bytes / 10,139 bytes = 2.8725712595

ios sim

splash-ios-20180323-115734

android emulator

splash-and-20180323-1521831731

bonus android emu. shot

splash-and-20180323-120210

rdela commented 6 years ago
$ jest
 PASS  components/__tests__/Button.js (13.037s)
 PASS  components/__tests__/JournalEntry.js (13.587s)
 PASS  components/__tests__/BackgroundGradient.js
 PASS  components/__tests__/Done.js
 PASS  components/__tests__/Loader.js
 PASS  components/__tests__/Input.js (14.93s)
 PASS  screens/__tests__/Login.js
 PASS  screens/__tests__/CheckIn.js (15.72s)
 PASS  screens/__tests__/Journal.js (16.508s)
 PASS  screens/__tests__/Calendar.js (18.98s)
 PASS  screens/__tests__/Reports.js (27.573s)
 PASS  __tests__/App.js (13.817s)

Test Suites: 12 passed, 12 total
Tests:       21 passed, 21 total
Snapshots:   21 passed, 21 total
Time:        39.98s
Ran all test suites.
✨  Done in 40.91s.
rdela commented 6 years ago

merge commit was unnecessary, feel free to squash and merge and/or use git fu plus tell me what to do in situations like these. (pretty much goes for everything about this project/life in general, lol)

kkemple commented 6 years ago

i think it looks great!! :tada:

rdela commented 6 years ago

ok @SaraVieira will you plz give this a final once-over and then merge or squash and merge, whatevah u prefer?

rdela commented 6 years ago

or request changes of course! and no rush, but I am happy :)

kkemple commented 6 years ago

🎉 ❤️