1266 location icon associated with an observation should change based on geoprivacy across the app (#1412)

* Add new icons, change ObservationLocation to include icons

*Change observationLocation to include new icons for geoprivacy

* update snapshot
This commit is contained in:
Angie
2024-04-17 16:56:18 -07:00
committed by GitHub
parent 73b8f6e5ee
commit 902be59b5a
12 changed files with 70 additions and 41 deletions

View File

Binary file not shown.

View File

@@ -3,7 +3,7 @@
"data": [
{
"path": "assets/fonts/INatIcon.ttf",
"sha1": "e6311871bfa114078a3adb8900359160b001f0ba"
"sha1": "efff2cbb4d311b22384cfade07cdd4e7ab8516b0"
},
{
"path": "assets/fonts/Lato-Bold.ttf",

View File

Binary file not shown.

View File

@@ -1465,12 +1465,12 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
BVLinearGradient: 880f91a7854faff2df62518f0281afb1c60d49a3
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
FasterImage: 60d0750ddbcefff0070c4c17309c2d1d6cc650f0
FBLazyVector: f64d1e2ea739b4d8f7e4740cde18089cd97fe864
FBReactNativeSpec: 9f2b8b243131565335437dba74923a8d3015e780
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
hermes-engine: 9cecf9953a681df7556b8cc9c74905de8f3293c0
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
MMKV: ed58ad794b3f88c24d604a5b74f3fba17fcbaf74
@@ -1561,4 +1561,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: eebd76aa39f99b44754431ed68ce0cfbfc5ec2f7
COCOAPODS: 1.14.3
COCOAPODS: 1.14.2

View File

@@ -32,6 +32,7 @@
AE4DC81B3A87484CB3FD6750 /* Lato-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4B0AEEF6CA584BCF9880EB35 /* Lato-Regular.ttf */; };
E23E0899594A7C6DF680FFDB /* libPods-iNaturalistReactNative-ShareExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A336AF0ADEAE537AB1B73F98 /* libPods-iNaturalistReactNative-ShareExtension.a */; };
E5DFC1C6FBFA45739CE91C69 /* Lato-MediumItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 69DF855D92EA4ADFB73B47F1 /* Lato-MediumItalic.ttf */; };
943B8BFBECD94A6491253036 /* INatIcon.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 39F729E2068E4F75A65F5FB2 /* INatIcon.ttf */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -104,6 +105,7 @@
D8663889EABFBFC3077401E3 /* 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 = "<group>"; };
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 = "<group>"; };
39F729E2068E4F75A65F5FB2 /* INatIcon.ttf */ = {isa = PBXFileReference; name = "INatIcon.ttf"; path = "../assets/fonts/INatIcon.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -941,7 +943,11 @@
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
@@ -1013,7 +1019,11 @@
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;

View File

@@ -3,7 +3,7 @@
"data": [
{
"path": "assets/fonts/INatIcon.ttf",
"sha1": "e6311871bfa114078a3adb8900359160b001f0ba"
"sha1": "efff2cbb4d311b22384cfade07cdd4e7ab8516b0"
},
{
"path": "assets/fonts/Lato-Bold.ttf",

View File

@@ -83,33 +83,35 @@
"microphone": 61778,
"noevidence": 61779,
"notifications-bell": 61780,
"observers": 61781,
"offline": 61782,
"pause-circle": 61783,
"pause": 61784,
"pencil-outline": 61785,
"pencil": 61786,
"person": 61787,
"photos-outline": 61788,
"photos": 61789,
"play-circle": 61790,
"play": 61791,
"plus-bold": 61792,
"plus": 61793,
"pot-outline": 61794,
"rotate-exclamation": 61795,
"rotate-right": 61796,
"rotate": 61797,
"share": 61798,
"sliders": 61799,
"sound-bold-outline": 61800,
"sound-outline": 61801,
"sounds": 61802,
"sparkly-label": 61803,
"star-bold-outline": 61804,
"star": 61805,
"stop": 61806,
"trash-outline": 61807,
"trash": 61808,
"triangle-exclamation": 61809
"obscured": 61781,
"observers": 61782,
"offline": 61783,
"pause-circle": 61784,
"pause": 61785,
"pencil-outline": 61786,
"pencil": 61787,
"person": 61788,
"photos-outline": 61789,
"photos": 61790,
"play-circle": 61791,
"play": 61792,
"plus-bold": 61793,
"plus": 61794,
"pot-outline": 61795,
"private": 61796,
"rotate-exclamation": 61797,
"rotate-right": 61798,
"rotate": 61799,
"share": 61800,
"sliders": 61801,
"sound-bold-outline": 61802,
"sound-outline": 61803,
"sounds": 61804,
"sparkly-label": 61805,
"star-bold-outline": 61806,
"star": 61807,
"stop": 61808,
"trash-outline": 61809,
"trash": 61810,
"triangle-exclamation": 61811
}

View File

@@ -131,6 +131,15 @@ const ObservationLocation = ( {
withCoordinates
] );
const locationIcon = () => {
if ( geoprivacy === "obscured" ) {
return "obscured";
} if ( geoprivacy === "private" ) {
return "private";
}
return "location";
};
if ( !observation ) {
return null;
}
@@ -144,7 +153,7 @@ const ObservationLocation = ( {
text: displayLocation
}}
>
<ContentWithIcon icon="location" size={14}>{ inner }</ContentWithIcon>
<ContentWithIcon icon={locationIcon()} size={14}>{ inner }</ContentWithIcon>
{( details || withGeoprivacy ) && showGeoprivacy()}
</View>
);

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.1" viewBox="0 0 24 24">
<path d="m12 0.375c-0.59365 0-1.1775 0.044583-1.7484 0.13075-0.55687 0.084059-0.94017 0.60364-0.85611 1.1605 0.084059 0.55687 0.60364 0.94016 1.1605 0.85611 0.4704-0.071006 0.95255-0.1079 1.444-0.1079s0.97356 0.03689 1.444 0.1079c0.55687 0.084059 1.0764-0.29923 1.1605-0.85611 0.084059-0.55688-0.29923-1.0765-0.85611-1.1605-0.57082-0.086164-1.1547-0.13075-1.7484-0.13075zm-5.6806 3.9032c0.45335-0.33413 0.55001-0.97252 0.21586-1.4259-0.33413-0.45337-0.97252-0.55001-1.4259-0.21587-0.94331 0.69525-1.7776 1.5296-2.4729 2.4729-0.33413 0.45335-0.23749 1.0917 0.21587 1.4259 0.45335 0.33415 1.0917 0.23749 1.4259-0.21586 0.57381-0.77856 1.2626-1.4673 2.0412-2.0412zm12.571-1.6417c-0.45342-0.33413-1.0917-0.23749-1.4258 0.21587-0.33415 0.45335-0.23756 1.0917 0.21586 1.4259 0.77859 0.57381 1.4673 1.2626 2.0411 2.0412 0.33415 0.45335 0.97258 0.55001 1.4258 0.21586 0.45342-0.33413 0.55-0.97252 0.21586-1.4259-0.69522-0.94331-1.5294-1.7776-2.4728-2.4729zm-16.368 7.9196c0.084059-0.55687-0.29923-1.0765-0.85611-1.1605-0.55688-0.084059-1.0765 0.29923-1.1605 0.85611-0.086164 0.57082-0.13075 1.1547-0.13075 1.7484s0.044583 1.1775 0.13075 1.7484c0.084059 0.55688 0.60364 0.94016 1.1605 0.85611 0.55687-0.084059 0.94016-0.60364 0.85611-1.1605-0.071006-0.4704-0.1079-0.95255-0.1079-1.444s0.03689-0.97356 0.1079-1.444zm20.972-0.3044c-0.08419-0.55687-0.60368-0.94017-1.1605-0.85611-0.55686 0.084059-0.94028 0.60364-0.85609 1.1605 0.07097 0.4704 0.10785 0.95255 0.10785 1.444s-0.03687 0.97356-0.10785 1.444c-0.08419 0.55687 0.29923 1.0764 0.85609 1.1605 0.55686 0.08406 1.0764-0.29923 1.1605-0.85611 0.086147-0.57082 0.13069-1.1547 0.13069-1.7484s-0.04454-1.1775-0.13069-1.7484zm-19.216 7.429c-0.33413-0.45342-0.97252-0.55-1.4259-0.21586-0.45337 0.33415-0.55001 0.97242-0.21587 1.4258 0.69525 0.94338 1.5296 1.7776 2.4729 2.4728 0.45335 0.33415 1.0917 0.23756 1.4259-0.21586 0.33415-0.45325 0.23749-1.0917-0.21586-1.4258-0.77856-0.57383-1.4673-1.2625-2.0412-2.0411zm17.085 1.21c0.33415-0.45342 0.23756-1.0917-0.21586-1.4258-0.45325-0.33415-1.0917-0.23756-1.4258 0.21586-0.57383 0.77859-1.2625 1.4673-2.0411 2.0411-0.45342 0.33415-0.55 0.97258-0.21586 1.4258 0.33415 0.45342 0.97242 0.55 1.4258 0.21586 0.94338-0.69522 1.7776-1.5294 2.4728-2.4728zm-10.807 2.587c-0.55687-0.08419-1.0765 0.29923-1.1605 0.85609-0.084059 0.55686 0.29923 1.0764 0.85611 1.1605 0.57082 0.086147 1.1547 0.13069 1.7484 0.13069s1.1775-0.04454 1.7484-0.13069c0.55688-0.08419 0.94016-0.60368 0.85611-1.1605-0.08406-0.55686-0.60364-0.94028-1.1605-0.85609-0.4704 0.07097-0.95255 0.10785-1.444 0.10785s-0.97356-0.03687-1.444-0.10785zm1.444-4.5829c2.6606 0 4.8947-2.1532 4.8947-4.8947 0-2.7416-2.2342-4.8947-4.8947-4.8947-2.6606 0-4.8947 2.1532-4.8947 4.8947 0 2.7416 2.2342 4.8947 4.8947 4.8947zm3.1951-4.8947c0 1.7469-1.4328 3.1672-3.1951 3.1672s-3.1951-1.4203-3.1951-3.1672 1.4328-3.1672 3.1951-3.1672 3.1951 1.4203 3.1951 3.1672z" clip-rule="evenodd" stroke-width="1.6316"/>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.1" viewBox="0 0 24 24">
<path class="b" d="m19.014 17.605c1.4-0.96 2.79-2.19 4.21-3.67 1.06-1.11 1.03-3.07-0.05-4.14-3.75-3.72-7.38-5.79-11.17-5.79-1.78 0-3.52 0.45-5.26 1.32l-4.43-4.43c-0.39-0.39-1.03-0.39-1.42 0-0.39 0.39-0.39 1.02 0 1.41l4.05 4.05c-1.37 0.9-2.73 2.05-4.12 3.42-1.09 1.08-1.1 3.07-0.03 4.17 3.74 3.82 7.38 6.02 11.19 6.05 1.78 0.01 3.52-0.45 5.25-1.34l4.45 4.45c0.39 0.39 1.02 0.39 1.41 0s0.39-1.02 0-1.41l-4.09-4.09zm-17.2-5.05c-0.35-0.36-0.35-1.01 0-1.36 1.52-1.5 2.98-2.69 4.4-3.56l1.75 1.75c-0.49 0.75-0.77 1.64-0.77 2.61 0 2.69 2.19 4.8 4.8 4.8 0.96 0 1.86-0.28 2.61-0.77l1.29 1.29c-4.65 2.03-9.06 0.37-14.09-4.77zm11.57 2.24c-0.42 0.2-0.88 0.32-1.38 0.32-1.73 0-3.13-1.39-3.13-3.11 0-0.5 0.12-0.97 0.33-1.39zm-2.76-5.58c0.42-0.2 0.88-0.32 1.38-0.32 1.73 0 3.13 1.39 3.13 3.11 0 0.5-0.12 0.97-0.33 1.39zm5.41 5.4c0.49-0.75 0.77-1.64 0.77-2.61 0-2.69-2.19-4.8-4.8-4.8-0.96 0-1.86 0.28-2.61 0.77l-1.3-1.3c4.65-1.97 9.06-0.46 14.09 4.53 0.35 0.35 0.36 0.99 0.02 1.35-1.53 1.61-3.01 2.87-4.45 3.78z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -375,7 +375,7 @@ exports[`CustomTabBar with advanced user layout should render correctly 1`] = `
]
}
>
</Text>
</View>
</BVLinearGradient>
@@ -467,7 +467,7 @@ exports[`CustomTabBar with advanced user layout should render correctly 1`] = `
]
}
>
</Text>
</View>
</View>

View File

@@ -169,7 +169,7 @@ exports[`InlineUser when offline renders reliably 1`] = `
}
testID="InlineUser.FallbackPicture"
>
</Text>
</View>
<Text
@@ -275,7 +275,7 @@ exports[`InlineUser when user has no icon set renders reliably 1`] = `
}
testID="InlineUser.FallbackPicture"
>
</Text>
</View>
<Text