From 7ae95519eaae7899b1763c6c22741852ad6cc841 Mon Sep 17 00:00:00 2001 From: Ken-ichi Date: Fri, 28 Jul 2023 13:22:34 -0400 Subject: [PATCH 01/12] Iconic taxa icons (#723) * Added iconic taxa icons; cleaned up some other icon files * Updated snapshots * Renamed ban icon to match fontawesome convention we use on the web --- README.md | 4 +- .../app/src/main/assets/fonts/INatIcon.ttf | Bin 19404 -> 26060 bytes android/link-assets-manifest.json | 2 +- assets/fonts/INatIcon.ttf | Bin 19404 -> 26060 bytes .../project.pbxproj | 10 +- ios/link-assets-manifest.json | 2 +- src/components/ObsDetails/ActivityHeader.js | 2 +- .../SharedComponents/INatIcon/glyphmap.json | 166 ++++++++++-------- src/images/icons/{withdraw-id.svg => ban.svg} | 0 src/images/icons/door-exit.svg | 2 +- src/images/icons/gear.svg | 2 +- src/images/icons/help-circle.svg | 6 +- src/images/icons/iconic-actinopterygii.svg | 4 + src/images/icons/iconic-amphibia.svg | 4 + src/images/icons/iconic-animalia.svg | 4 + src/images/icons/iconic-arachnida.svg | 4 + src/images/icons/iconic-aves.svg | 6 + src/images/icons/iconic-chromista.svg | 4 + src/images/icons/iconic-fungi.svg | 4 + src/images/icons/iconic-insecta.svg | 4 + src/images/icons/iconic-mammalia.svg | 4 + src/images/icons/iconic-mollusica.svg | 4 + src/images/icons/iconic-plantae.svg | 6 + src/images/icons/iconic-protozoa.svg | 4 + src/images/icons/iconic-reptilia.svg | 4 + src/images/icons/iconic-unknown.svg | 4 + .../__snapshots__/ActivityCount.test.js.snap | 2 +- .../__snapshots__/CommentsCount.test.js.snap | 140 +++++++-------- .../IdentificationsCount.test.js.snap | 6 +- .../__snapshots__/INatIconButton.test.js.snap | 2 +- .../__snapshots__/InlineUser.test.js.snap | 4 +- .../__snapshots__/UploadStatus.test.js.snap | 2 +- .../__snapshots__/INatIcon.test.js.snap | 2 +- 33 files changed, 244 insertions(+), 170 deletions(-) rename src/images/icons/{withdraw-id.svg => ban.svg} (100%) create mode 100644 src/images/icons/iconic-actinopterygii.svg create mode 100644 src/images/icons/iconic-amphibia.svg create mode 100644 src/images/icons/iconic-animalia.svg create mode 100644 src/images/icons/iconic-arachnida.svg create mode 100644 src/images/icons/iconic-aves.svg create mode 100644 src/images/icons/iconic-chromista.svg create mode 100644 src/images/icons/iconic-fungi.svg create mode 100644 src/images/icons/iconic-insecta.svg create mode 100644 src/images/icons/iconic-mammalia.svg create mode 100644 src/images/icons/iconic-mollusica.svg create mode 100644 src/images/icons/iconic-plantae.svg create mode 100644 src/images/icons/iconic-protozoa.svg create mode 100644 src/images/icons/iconic-reptilia.svg create mode 100644 src/images/icons/iconic-unknown.svg diff --git a/README.md b/README.md index 3c86c4cd9..5d54b5819 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,9 @@ We're using Nativewind, a styling system for React Native based on Tailwind CSS. We have a custom set of icons stored as SVG files and compiled into a font. New icons should be included with issues in a ready-to-use form, but some editing may be required. -1. Add / edit SVGs to / in `src/images/icons/` (`git add` any new icons) +1. Add / edit SVGs to / in `src/images/icons/` (`git add` any new icons). Icon SVGs must meet the following requirements + * `` element must have `width="24"` and `height="24"` attributes + * No paths with `fill-rule="evenodd"` attribute or `fill-rule: evenodd styles` 1. `npm run icons` 1. Rebuild the app (you'll have newly-linked assets that won't hot reload) diff --git a/android/app/src/main/assets/fonts/INatIcon.ttf b/android/app/src/main/assets/fonts/INatIcon.ttf index b9ea1778949db483e815a761e31f021321daab64..9de5bf5ac4140824f9ed95aed62424aaee591e6a 100644 GIT binary patch delta 7472 zcmY*dYm6jUb*}q<)w8>+YTiB5z1zLdnVnZRV6#gi>_B7@3-K^(d+pf=-XZ(KUK3+T z+5#gXgsg-i;7BOqheJdXL8Oh6NC^^3Py~q;5q>0+6Co5u2q{Qm5Q-8Kd-I*@83(4P zy6fJ$bzkQ@-}%mc`Sa}Mzhl4IpS%!7?9)*cJ$~u>&aIE16nPYh=b}iz^2D_dzyBkD zJ?uqMI2J|k{N&XuJC`5&oiDx*ZNG$jhI`k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wK+ZZJ;&;djlnqJq#uck3Jd5tp5RC(2OqqYYu=JC7E3j;DB)!8SP6!CVjvyv=Pm3g5zOg0=VyP(Tovu&pyl?R=336(dNbt>{kw z`1j}T{N7vNz}c0(@818F1@=C6o;}PSVUMy4>@oH@+hG^kC3cxzVejAj^e=r&iib}#K5zHsZ>&W+nUR}QCg>&ct9Z$5kT_4l8=a_jakrgqr;=^MX# T={ delta 795 zcmY+BUr19?9LLYO|NrgYyY24ok4t35oUtP2xD$~nl45(1@IeihZEULI4XEVuk_w4->7}&-#ve+Pc z-~^6WunuH%LnG;T`7@`#bF&e}up39|j5r$0XztOepU^kVCZr<8)SCqFo;)S*QdbxE<>6A_fE7zu405i52zx_Q@kSKETGIMo1?QZPYV=^3+~BLYL1rZ zv-A}GhGCcnCeB=E6YN8FgDr7w+#v7cd-xgtqYxA(gk>=x&Pv@DkL9XmOV;F8`MDBM zt|>)zOkGodSVPvhb>6yT>#;4^ZT6V`k>=ILwD*pB$Ef4A&go(Ovi?;6>|~rFXWT`( zW?fq@ce{Jp{@u5msnA_T5oEuhDV7llj7 Zaaeep`U(|sxOXU<9!w4&>P_P>`U`SKsL22T diff --git a/android/link-assets-manifest.json b/android/link-assets-manifest.json index 737c3193a..8e9dbe766 100644 --- a/android/link-assets-manifest.json +++ b/android/link-assets-manifest.json @@ -3,7 +3,7 @@ "data": [ { "path": "assets/fonts/INatIcon.ttf", - "sha1": "5ee81524df59ba0d7ef0efafdf940f528a8ee5af" + "sha1": "94ddb30161ddbd61eda2524a57b2c5eec804401e" }, { "path": "assets/fonts/Whitney-BookItalic-Pro.otf", diff --git a/assets/fonts/INatIcon.ttf b/assets/fonts/INatIcon.ttf index b9ea1778949db483e815a761e31f021321daab64..9de5bf5ac4140824f9ed95aed62424aaee591e6a 100644 GIT binary patch delta 7472 zcmY*dYm6jUb*}q<)w8>+YTiB5z1zLdnVnZRV6#gi>_B7@3-K^(d+pf=-XZ(KUK3+T z+5#gXgsg-i;7BOqheJdXL8O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uVnf;55E)&+;5{ zIId@ASK`&9`uBZctpx-xJwp)=5CC5*(*nw5Z4PTe z+Jxz0C$Y=COJgPON)Y*c5h!`m6FkUTX)iX5Ail)Jvs{|W^0l~yU^*9~lvs&TFws#S zRnc;EGFp$`)T9u<61@jTcqaNN<@&>MwK+ZZJ;&;djlnqJq#uck3Jd5tp5RC(2OqqYYu=JC7E3j;DB)!8SP6!CVjvyv=Pm3g5zOg0=VyP(Tovu&pyl?R=336(dNbt>{kw z`1j}T{N7vNz}c0(@818F1@=C6o;}PSVUMy4>@oH@+hG^kC3cxzVejAj^e=r&iib}#K5zHsZ>&W+nUR}QCg>&ct9Z$5kT_4l8=a_jakrgqr;=^MX# T={ delta 795 zcmY+BUr19?9LLYO|NrgYyY24ok4t35oUtP2xD$~nl45(1@IeihZEULI4XEVuk_w4->7}&-#ve+Pc z-~^6WunuH%LnG;T`7@`#bF&e}up39|j5r$0XztOepU^kVCZr<8)SCqFo;)S*QdbxE<>6A_fE7zu405i52zx_Q@kSKETGIMo1?QZPYV=^3+~BLYL1rZ zv-A}GhGCcnCeB=E6YN8FgDr7w+#v7cd-xgtqYxA(gk>=x&Pv@DkL9XmOV;F8`MDBM zt|>)zOkGodSVPvhb>6yT>#;4^ZT6V`k>=ILwD*pB$Ef4A&go(Ovi?;6>|~rFXWT`( zW?fq@ce{Jp{@u5msnA_T5oEuhDV7llj7 Zaaeep`U(|sxOXU<9!w4&>P_P>`U`SKsL22T diff --git a/ios/iNaturalistReactNative.xcodeproj/project.pbxproj b/ios/iNaturalistReactNative.xcodeproj/project.pbxproj index 4086ebd64..b13bf76b1 100644 --- a/ios/iNaturalistReactNative.xcodeproj/project.pbxproj +++ b/ios/iNaturalistReactNative.xcodeproj/project.pbxproj @@ -23,8 +23,7 @@ A252B2AEA64E47C9AC1D20E8 /* Whitney-Light-Pro.otf in Resources */ = {isa = PBXBuildFile; fileRef = BA9D41ECEBFA4C38B74009B3 /* Whitney-Light-Pro.otf */; }; BA2479FA3D7B40A7BEF7B3CD /* Whitney-Medium-Pro.otf in Resources */ = {isa = PBXBuildFile; fileRef = D09FA3A0162844FF80A5EF96 /* Whitney-Medium-Pro.otf */; }; D1A158A7F6C9E77B651BB4AA /* libPods-iNaturalistReactNative-ShareExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDD0D061046941F61CA31D /* libPods-iNaturalistReactNative-ShareExtension.a */; }; - F005F5581901496B8576FB4E /* BuildFile in Resources */ = {isa = PBXBuildFile; }; - 41DE3088F97E402FBC6E6DD8 /* INatIcon.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 63D7A2871FF24F76861F64DD /* INatIcon.ttf */; }; + 763319F15FC44DBF89C9DEB0 /* INatIcon.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A96A8C1FA45F4C8692AAE36F /* INatIcon.ttf */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -90,7 +89,7 @@ DEB901D3F8FB2DAE1CCED0CC /* Pods-iNaturalistReactNative-ShareExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iNaturalistReactNative-ShareExtension.release.xcconfig"; path = "Target Support Files/Pods-iNaturalistReactNative-ShareExtension/Pods-iNaturalistReactNative-ShareExtension.release.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; EE004FD2EC174086A7AB2908 /* inaturalisticons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = inaturalisticons.ttf; path = ../assets/fonts/inaturalisticons.ttf; sourceTree = ""; }; - 63D7A2871FF24F76861F64DD /* INatIcon.ttf */ = {isa = PBXFileReference; name = "INatIcon.ttf"; path = "../assets/fonts/INatIcon.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + A96A8C1FA45F4C8692AAE36F /* INatIcon.ttf */ = {isa = PBXFileReference; name = "INatIcon.ttf"; path = "../assets/fonts/INatIcon.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -228,7 +227,7 @@ D09FA3A0162844FF80A5EF96 /* Whitney-Medium-Pro.otf */, 374CB22E29943E63005885ED /* Whitney-BookItalic-Pro.otf */, EE004FD2EC174086A7AB2908 /* inaturalisticons.ttf */, - 63D7A2871FF24F76861F64DD /* INatIcon.ttf */, + A96A8C1FA45F4C8692AAE36F /* INatIcon.ttf */, ); name = Resources; sourceTree = ""; @@ -358,8 +357,7 @@ A252B2AEA64E47C9AC1D20E8 /* Whitney-Light-Pro.otf in Resources */, BA2479FA3D7B40A7BEF7B3CD /* Whitney-Medium-Pro.otf in Resources */, 4FB3B444D46A4115B867B9CC /* inaturalisticons.ttf in Resources */, - F005F5581901496B8576FB4E /* BuildFile in Resources */, - 41DE3088F97E402FBC6E6DD8 /* INatIcon.ttf in Resources */, + 763319F15FC44DBF89C9DEB0 /* INatIcon.ttf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ios/link-assets-manifest.json b/ios/link-assets-manifest.json index 737c3193a..8e9dbe766 100644 --- a/ios/link-assets-manifest.json +++ b/ios/link-assets-manifest.json @@ -3,7 +3,7 @@ "data": [ { "path": "assets/fonts/INatIcon.ttf", - "sha1": "5ee81524df59ba0d7ef0efafdf940f528a8ee5af" + "sha1": "94ddb30161ddbd61eda2524a57b2c5eec804401e" }, { "path": "assets/fonts/Whitney-BookItalic-Pro.otf", diff --git a/src/components/ObsDetails/ActivityHeader.js b/src/components/ObsDetails/ActivityHeader.js index 715e8c9cf..092a0b9f9 100644 --- a/src/components/ObsDetails/ActivityHeader.js +++ b/src/components/ObsDetails/ActivityHeader.js @@ -87,7 +87,7 @@ const ActivityHeader = ( { const renderIcon = () => { if ( idWithdrawn ) { - return ; + return ; } if ( item.vision ) return ; if ( flaggedStatus ) return ; diff --git a/src/components/SharedComponents/INatIcon/glyphmap.json b/src/components/SharedComponents/INatIcon/glyphmap.json index be5e3bb41..c200bac7f 100644 --- a/src/components/SharedComponents/INatIcon/glyphmap.json +++ b/src/components/SharedComponents/INatIcon/glyphmap.json @@ -9,80 +9,94 @@ "arrow-up-circle-dots": 61704, "arrow-up-small": 61705, "arrow-up": 61706, - "binoculars": 61707, - "book": 61708, - "briefcase": 61709, - "camera": 61710, - "check": 61711, - "checkmark-circle-outline": 61712, - "checkmark-circle": 61713, - "chevron-left-circle": 61714, - "chevron-left": 61715, - "chevron-right-circle": 61716, - "circle-dots": 61717, - "clock-outline": 61718, - "close-bold": 61719, - "close": 61720, - "comments-outline": 61721, - "comments": 61722, - "compass-rose-outline": 61723, - "copyright": 61724, - "crop": 61725, - "door-exit": 61726, - "flag": 61727, - "flash-off": 61728, - "flash-on": 61729, - "flip": 61730, - "gallery": 61731, - "gear": 61732, - "globe-outline": 61733, - "grid-square": 61734, - "grid": 61735, - "hamburger-menu": 61736, - "heart": 61737, - "help-circle-outline": 61738, - "help-circle": 61739, - "help": 61740, - "id-agree": 61741, - "inaturalist": 61742, - "info-circle-outline": 61743, - "kebab-menu": 61744, - "label-outline": 61745, - "label": 61746, - "laptop": 61747, - "layers": 61748, - "leaf": 61749, - "list-square": 61750, - "location-crosshairs": 61751, - "magnifying-glass": 61752, - "map-marker-outline": 61753, - "microphone-circle": 61754, - "microphone": 61755, - "noevidence": 61756, - "notifications-bell": 61757, - "pause-circle": 61758, - "pencil-outline": 61759, - "pencil": 61760, - "person": 61761, - "photos-outline": 61762, - "photos": 61763, - "play-circle": 61764, - "play": 61765, - "plus-bold": 61766, - "plus": 61767, - "pot-outline": 61768, - "rotate-exclamation": 61769, - "rotate-right": 61770, - "rotate": 61771, - "sliders": 61772, - "sound-bold-outline": 61773, - "sound-outline": 61774, - "sounds": 61775, - "sparkly-label": 61776, - "star-bold-outline": 61777, - "star": 61778, - "trash-outline": 61779, - "trash": 61780, - "triangle-exclamation": 61781, - "withdraw-id": 61782 + "ban": 61707, + "binoculars": 61708, + "book": 61709, + "briefcase": 61710, + "camera": 61711, + "check": 61712, + "checkmark-circle-outline": 61713, + "checkmark-circle": 61714, + "chevron-left-circle": 61715, + "chevron-left": 61716, + "chevron-right-circle": 61717, + "circle-dots": 61718, + "clock-outline": 61719, + "close-bold": 61720, + "close": 61721, + "comments-outline": 61722, + "comments": 61723, + "compass-rose-outline": 61724, + "copyright": 61725, + "crop": 61726, + "door-exit": 61727, + "flag": 61728, + "flash-off": 61729, + "flash-on": 61730, + "flip": 61731, + "gallery": 61732, + "gear": 61733, + "globe-outline": 61734, + "grid-square": 61735, + "grid": 61736, + "hamburger-menu": 61737, + "heart": 61738, + "help-circle-outline": 61739, + "help-circle": 61740, + "help": 61741, + "iconic-actinopterygii": 61742, + "iconic-amphibia": 61743, + "iconic-animalia": 61744, + "iconic-arachnida": 61745, + "iconic-aves": 61746, + "iconic-chromista": 61747, + "iconic-fungi": 61748, + "iconic-insecta": 61749, + "iconic-mammalia": 61750, + "iconic-mollusica": 61751, + "iconic-plantae": 61752, + "iconic-protozoa": 61753, + "iconic-reptilia": 61754, + "iconic-unknown": 61755, + "id-agree": 61756, + "inaturalist": 61757, + "info-circle-outline": 61758, + "kebab-menu": 61759, + "label-outline": 61760, + "label": 61761, + "laptop": 61762, + "layers": 61763, + "leaf": 61764, + "list-square": 61765, + "location-crosshairs": 61766, + "magnifying-glass": 61767, + "map-marker-outline": 61768, + "microphone-circle": 61769, + "microphone": 61770, + "noevidence": 61771, + "notifications-bell": 61772, + "pause-circle": 61773, + "pencil-outline": 61774, + "pencil": 61775, + "person": 61776, + "photos-outline": 61777, + "photos": 61778, + "play-circle": 61779, + "play": 61780, + "plus-bold": 61781, + "plus": 61782, + "pot-outline": 61783, + "rotate-exclamation": 61784, + "rotate-right": 61785, + "rotate": 61786, + "sliders": 61787, + "sound-bold-outline": 61788, + "sound-outline": 61789, + "sounds": 61790, + "sparkly-label": 61791, + "star-bold-outline": 61792, + "star": 61793, + "trash-outline": 61794, + "trash": 61795, + "triangle-exclamation": 61796 } \ No newline at end of file diff --git a/src/images/icons/withdraw-id.svg b/src/images/icons/ban.svg similarity index 100% rename from src/images/icons/withdraw-id.svg rename to src/images/icons/ban.svg diff --git a/src/images/icons/door-exit.svg b/src/images/icons/door-exit.svg index b9d7e00e7..da714fb3f 100644 --- a/src/images/icons/door-exit.svg +++ b/src/images/icons/door-exit.svg @@ -1,4 +1,4 @@ - + diff --git a/src/images/icons/gear.svg b/src/images/icons/gear.svg index 7aabb720f..1d4d5fde5 100644 --- a/src/images/icons/gear.svg +++ b/src/images/icons/gear.svg @@ -1,4 +1,4 @@ - + diff --git a/src/images/icons/help-circle.svg b/src/images/icons/help-circle.svg index 8b6fabbca..ff12b0076 100644 --- a/src/images/icons/help-circle.svg +++ b/src/images/icons/help-circle.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/src/images/icons/iconic-actinopterygii.svg b/src/images/icons/iconic-actinopterygii.svg new file mode 100644 index 000000000..41953752f --- /dev/null +++ b/src/images/icons/iconic-actinopterygii.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/images/icons/iconic-amphibia.svg b/src/images/icons/iconic-amphibia.svg new file mode 100644 index 000000000..a9af08820 --- /dev/null +++ b/src/images/icons/iconic-amphibia.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/images/icons/iconic-animalia.svg b/src/images/icons/iconic-animalia.svg new file mode 100644 index 000000000..798ede45e --- /dev/null +++ b/src/images/icons/iconic-animalia.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/images/icons/iconic-arachnida.svg b/src/images/icons/iconic-arachnida.svg new file mode 100644 index 000000000..deb2a5d82 --- /dev/null +++ b/src/images/icons/iconic-arachnida.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/images/icons/iconic-aves.svg b/src/images/icons/iconic-aves.svg new file mode 100644 index 000000000..f15e30801 --- /dev/null +++ b/src/images/icons/iconic-aves.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/images/icons/iconic-chromista.svg b/src/images/icons/iconic-chromista.svg new file mode 100644 index 000000000..3acf1f133 --- /dev/null +++ b/src/images/icons/iconic-chromista.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/images/icons/iconic-fungi.svg b/src/images/icons/iconic-fungi.svg new file mode 100644 index 000000000..728fe6680 --- /dev/null +++ b/src/images/icons/iconic-fungi.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/images/icons/iconic-insecta.svg b/src/images/icons/iconic-insecta.svg new file mode 100644 index 000000000..cf1117468 --- /dev/null +++ b/src/images/icons/iconic-insecta.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/images/icons/iconic-mammalia.svg b/src/images/icons/iconic-mammalia.svg new file mode 100644 index 000000000..9bfa359ba --- /dev/null +++ b/src/images/icons/iconic-mammalia.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/images/icons/iconic-mollusica.svg b/src/images/icons/iconic-mollusica.svg new file mode 100644 index 000000000..27fea3e8f --- /dev/null +++ b/src/images/icons/iconic-mollusica.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/images/icons/iconic-plantae.svg b/src/images/icons/iconic-plantae.svg new file mode 100644 index 000000000..0495ccee2 --- /dev/null +++ b/src/images/icons/iconic-plantae.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/images/icons/iconic-protozoa.svg b/src/images/icons/iconic-protozoa.svg new file mode 100644 index 000000000..beb624c25 --- /dev/null +++ b/src/images/icons/iconic-protozoa.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/images/icons/iconic-reptilia.svg b/src/images/icons/iconic-reptilia.svg new file mode 100644 index 000000000..88844ee06 --- /dev/null +++ b/src/images/icons/iconic-reptilia.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/images/icons/iconic-unknown.svg b/src/images/icons/iconic-unknown.svg new file mode 100644 index 000000000..f9af8d80a --- /dev/null +++ b/src/images/icons/iconic-unknown.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tests/unit/components/SharedComponents/ActivityCount/__snapshots__/ActivityCount.test.js.snap b/tests/unit/components/SharedComponents/ActivityCount/__snapshots__/ActivityCount.test.js.snap index 1f703563a..61167b2ce 100644 --- a/tests/unit/components/SharedComponents/ActivityCount/__snapshots__/ActivityCount.test.js.snap +++ b/tests/unit/components/SharedComponents/ActivityCount/__snapshots__/ActivityCount.test.js.snap @@ -36,7 +36,7 @@ exports[`ActivityCount renders reliably 1`] = ` ] } > -  +  - -  - - - 1 - - -`; - -exports[`CommentsCount renders filled reliably 1`] = ` `; +exports[`CommentsCount renders filled reliably 1`] = ` + + +  + + + 1 + + +`; + exports[`CommentsCount renders white reliably 1`] = ` -  +  -  +  -  +  -  +  -  +  diff --git a/tests/unit/components/SharedComponents/InlineUser/__snapshots__/InlineUser.test.js.snap b/tests/unit/components/SharedComponents/InlineUser/__snapshots__/InlineUser.test.js.snap index ba20cca70..721f61085 100644 --- a/tests/unit/components/SharedComponents/InlineUser/__snapshots__/InlineUser.test.js.snap +++ b/tests/unit/components/SharedComponents/InlineUser/__snapshots__/InlineUser.test.js.snap @@ -174,7 +174,7 @@ exports[`InlineUser when offline renders reliably 1`] = ` } testID="InlineUser.NoInternetPicture" > -  +  -  +  -  +  diff --git a/tests/unit/components/__snapshots__/INatIcon.test.js.snap b/tests/unit/components/__snapshots__/INatIcon.test.js.snap index dfae288d0..40215ecd6 100644 --- a/tests/unit/components/__snapshots__/INatIcon.test.js.snap +++ b/tests/unit/components/__snapshots__/INatIcon.test.js.snap @@ -20,6 +20,6 @@ exports[`INatIcon renders correctly 1`] = ` ] } > -  +  `; From 4db5498e6e9e4ce908135cc8da4dbed524418373 Mon Sep 17 00:00:00 2001 From: budowski Date: Tue, 1 Aug 2023 04:22:42 +0900 Subject: [PATCH 02/12] #710 - current location fetching timeout; fix crash when reaching location picker before current location was fetched in observation viewer (#727) --- src/components/LocationPicker/LocationPickerContainer.js | 6 ++++-- src/sharedHooks/useUserLocation.js | 9 ++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/LocationPicker/LocationPickerContainer.js b/src/components/LocationPicker/LocationPickerContainer.js index c82cf8c04..6140c5eda 100644 --- a/src/components/LocationPicker/LocationPickerContainer.js +++ b/src/components/LocationPicker/LocationPickerContainer.js @@ -64,8 +64,10 @@ const reducer = ( state, action ) => { locationName: action.currentObservation?.place_guess, region: { ...state.region, - latitude: action.currentObservation?.latitude, - longitude: action.currentObservation?.longitude, + // This was causing a crash when getting to the location picker before + // current location was fetched in the observation viewer + latitude: action.currentObservation?.latitude || 0.0, + longitude: action.currentObservation?.longitude || 0.0, latitudeDelta: DELTA, longitudeDelta: DELTA } diff --git a/src/sharedHooks/useUserLocation.js b/src/sharedHooks/useUserLocation.js index daba3ec51..fe00b694f 100644 --- a/src/sharedHooks/useUserLocation.js +++ b/src/sharedHooks/useUserLocation.js @@ -10,6 +10,9 @@ type Props = { skipPlaceGuess?: bool } +// Max time to wait while fetching current location +const CURRENT_LOCATION_TIMEOUT_MS = 30000; + const useUserLocation = ( { skipPlaceGuess = false }: Props ): Object => { const [latLng, setLatLng] = useState( null ); const [isLoading, setIsLoading] = useState( true ); @@ -58,7 +61,11 @@ const useUserLocation = ( { skipPlaceGuess = false }: Props ): Object => { setIsLoading( false ); }; - const options = { enableHighAccuracy: true, maximumAge: 0 }; + const options = { + enableHighAccuracy: true, + maximumAge: 0, + timeout: CURRENT_LOCATION_TIMEOUT_MS + }; Geolocation.getCurrentPosition( success, failure, options ); }; From af2a5fbcb83332b42a5f3384d845534131c178e5 Mon Sep 17 00:00:00 2001 From: Ken-ichi Ueda Date: Mon, 31 Jul 2023 12:59:09 -0700 Subject: [PATCH 03/12] Replace current loc button w/ loading; make lower right interactive --- .../LocationPicker/LoadingIndicator.js | 21 ++++- .../LocationPicker/LocationPicker.js | 93 ++++++++++++------- .../LocationPicker/LocationPickerContainer.js | 77 +++++++++------ src/components/LocationPicker/WarningText.js | 5 +- .../Buttons/INatIconButton.js | 16 +++- .../__snapshots__/INatIconButton.test.js.snap | 2 +- 6 files changed, 144 insertions(+), 70 deletions(-) diff --git a/src/components/LocationPicker/LoadingIndicator.js b/src/components/LocationPicker/LoadingIndicator.js index 4127a7c11..204b1a8d2 100644 --- a/src/components/LocationPicker/LoadingIndicator.js +++ b/src/components/LocationPicker/LoadingIndicator.js @@ -1,12 +1,29 @@ // @flow +import classnames from "classnames"; import { View } from "components/styledComponents"; import type { Node } from "react"; import React from "react"; import { ActivityIndicator } from "react-native-paper"; -const LoadingIndicator = ( ): Node => ( - +type Props = { + getShadow: Function, + theme: Object +}; + +const LoadingIndicator = ( { getShadow, theme }: Props ): Node => ( + ); diff --git a/src/components/LocationPicker/LocationPicker.js b/src/components/LocationPicker/LocationPicker.js index 5cee5d16c..8056d816e 100644 --- a/src/components/LocationPicker/LocationPicker.js +++ b/src/components/LocationPicker/LocationPicker.js @@ -10,9 +10,10 @@ import { View } from "components/styledComponents"; import type { Node } from "react"; import React from "react"; import MapView from "react-native-maps"; -import { useTheme } from "react-native-paper"; +import { ActivityIndicator, useTheme } from "react-native-paper"; import useTranslation from "sharedHooks/useTranslation"; import { getShadowStyle } from "styles/global"; +import colors from "styles/tailwindColors"; import CrosshairCircle from "./CrosshairCircle"; import DisplayLatLng from "./DisplayLatLng"; @@ -33,43 +34,45 @@ const getShadow = shadowColor => getShadowStyle( { } ); type Props = { - showMap: boolean, - loading: boolean, - accuracyTest: string, - region: Object, - mapView: any, - updateRegion: Function, - locationName: ?string, - updateLocationName: Function, accuracy: number, - returnToUserLocation: Function, - keysToUpdate: Object, + accuracyTest: string, goBackOnSave: Function, - toggleMapLayer: Function, + fetchingLocation: boolean, + hidePlaceResults: boolean, + keysToUpdate: Object, + loading: boolean, + locationName: ?string, mapType: string, - setMapReady: Function, + mapView: any, + region: Object, + returnToUserLocation: Function, selectPlaceResult: Function, - hidePlaceResults: boolean + setMapReady: Function, + showMap: boolean, + toggleMapLayer: Function, + updateLocationName: Function, + updateRegion: Function, }; const LocationPicker = ( { - showMap, - loading, - accuracyTest, - region, - mapView, - updateRegion, - locationName, - updateLocationName, accuracy, - returnToUserLocation, - keysToUpdate, + accuracyTest, goBackOnSave, - toggleMapLayer, + fetchingLocation, + hidePlaceResults, + keysToUpdate, + loading, + locationName, mapType, - setMapReady, + mapView, + region, + returnToUserLocation, selectPlaceResult, - hidePlaceResults + setMapReady, + showMap, + toggleMapLayer, + updateLocationName, + updateRegion }: Props ): Node => { const theme = useTheme( ); const { t } = useTranslation( ); @@ -98,7 +101,10 @@ const LocationPicker = ( { getShadow={getShadow} /> - + {showMap && ( - {loading && } + {loading && } {showMap @@ -148,13 +154,28 @@ const LocationPicker = ( { style={getShadow( theme.colors.primary )} className="absolute bottom-3 bg-white right-3 rounded-full" > - + { + fetchingLocation + ? ( + + + + ) + : ( + + ) + }