Small UI changes (#903)

* Swap places in Explore segmented button

* Remove identify button from Explore

* Remove explanation text for no activity items
This commit is contained in:
Johannes Klein
2023-11-13 16:17:41 +01:00
committed by GitHub
parent 4307ee829e
commit cedaa68fcd
7 changed files with 11 additions and 39 deletions

View File

@@ -44,7 +44,7 @@ const Explore = ( {
const { t } = useTranslation( );
const [showExploreBottomSheet, setShowExploreBottomSheet] = useState( false );
const [headerRight, setHeaderRight] = useState( null );
const [observationsView, setObservationsView] = useState( "map" );
const [observationsView, setObservationsView] = useState( "list" );
const [heightAboveFilters, setHeightAboveFilters] = useState( 0 );

View File

@@ -105,22 +105,10 @@ const Header = ( {
onPress={( ) => setShowExploreBottomSheet( true )}
/>
{headerRight
? (
&& (
<View className="mt-4">
<Body1>{headerRight}</Body1>
</View>
)
: (
<View className="bg-darkGray rounded-full h-[46px] w-[46px]">
<INatIconButton
icon="label"
color={colors.white}
className="self-center"
onPress={( ) => navigation.navigate( "Identify" )}
accessibilityLabel={t( "Identification-label" )}
accessibilityHint={t( "Navigates-to-identify" )}
/>
</View>
)}
</View>
<View className="flex-row items-center">

View File

@@ -26,9 +26,7 @@ const ObservationsViewBar = ( {
} );
return (
<View
className="bottom-5 absolute left-5 z-10"
>
<View className="bottom-5 absolute left-5 z-10">
<SegmentedButtons
value={observationsView}
onValueChange={updateObservationsView}
@@ -39,11 +37,6 @@ const ObservationsViewBar = ( {
}}
style={getShadowForColor( theme.colors.primary )}
buttons={[
{
style: buttonStyle( "map" ),
value: "map",
icon: "map"
},
{
style: buttonStyle( "list" ),
value: "list",
@@ -53,6 +46,11 @@ const ObservationsViewBar = ( {
style: buttonStyle( "grid" ),
value: "grid",
icon: "grid"
},
{
style: buttonStyle( "map" ),
value: "map",
icon: "map"
}
]}
/>

View File

@@ -1,8 +1,7 @@
// @flow
import { Body3 } from "components/SharedComponents";
import { View } from "components/styledComponents";
import * as React from "react";
import { useCurrentUser, useTranslation } from "sharedHooks";
import { useCurrentUser } from "sharedHooks";
import ActivityItem from "./ActivityItem";
@@ -21,7 +20,6 @@ const ActivityTab = ( {
onIDAgreePressed,
isOnline
}: Props ): React.Node => {
const { t } = useTranslation( );
const currentUser = useCurrentUser( );
const userId = currentUser?.id;
@@ -38,9 +36,8 @@ const ActivityTab = ( {
return (
<View testID="ActivityTab">
{activityItems.length === 0
? <Body3>{t( "No-comments-or-ids-to-display" )}</Body3>
: activityItems.map( item => (
{activityItems.length > 0
&& activityItems.map( item => (
<ActivityItem
userAgreedId={userAgreedToId}
key={item.uuid}

View File

@@ -484,8 +484,6 @@ No = No
# When the user tries to reset password but enters a non-existent email
No-account-found = No account found with that email
No-comments-or-ids-to-display = No comments or ids to display
No-Location = No Location
No-model-found = No model found
@@ -1041,7 +1039,6 @@ Navigates-to-user-profile = Navigates to user profile.
Navigates-to-drawer-item = Navigates to drawer item.
Navigate-to-taxon-details = Navigate to taxon details
Navigates-to-add-identification = Navigates to add identification.
Navigates-to-identify = Navigates to identify.
Opens-add-comment-modal = Opens add comment modal.
Opens-add-observation-modal = Opens add observation modal.
Opens-the-side-drawer-menu = Opens the side drawer menu.
@@ -1113,7 +1110,6 @@ Map-layers = Map layers
Share-map = Share map
Copy-map-coordinates = Copy map coordinates
Filters = Filters
Identification-label = Identification label
Sound-recorder = Sound recorder
Observation-with-no-evidence = Observation with no evidence
Photo-importer = Photo importer

View File

@@ -290,7 +290,6 @@
"comment": "When the user tries to reset password but enters a non-existent email",
"val": "No account found with that email"
},
"No-comments-or-ids-to-display": "No comments or ids to display",
"No-Location": "No Location",
"No-model-found": "No model found",
"none": "none",
@@ -661,7 +660,6 @@
"Navigates-to-drawer-item": "Navigates to drawer item.",
"Navigate-to-taxon-details": "Navigate to taxon details",
"Navigates-to-add-identification": "Navigates to add identification.",
"Navigates-to-identify": "Navigates to identify.",
"Opens-add-comment-modal": "Opens add comment modal.",
"Opens-add-observation-modal": "Opens add observation modal.",
"Opens-the-side-drawer-menu": "Opens the side drawer menu.",
@@ -739,7 +737,6 @@
"Map-layers": "Map layers",
"Share-map": "Share map",
"Copy-map-coordinates": "Copy map coordinates",
"Identification-label": "Identification label",
"Observation-with-no-evidence": "Observation with no evidence",
"Photo-importer": "Photo importer",
"AR-Camera": "AR Camera",

View File

@@ -484,8 +484,6 @@ No = No
# When the user tries to reset password but enters a non-existent email
No-account-found = No account found with that email
No-comments-or-ids-to-display = No comments or ids to display
No-Location = No Location
No-model-found = No model found
@@ -1041,7 +1039,6 @@ Navigates-to-user-profile = Navigates to user profile.
Navigates-to-drawer-item = Navigates to drawer item.
Navigate-to-taxon-details = Navigate to taxon details
Navigates-to-add-identification = Navigates to add identification.
Navigates-to-identify = Navigates to identify.
Opens-add-comment-modal = Opens add comment modal.
Opens-add-observation-modal = Opens add observation modal.
Opens-the-side-drawer-menu = Opens the side drawer menu.
@@ -1113,7 +1110,6 @@ Map-layers = Map layers
Share-map = Share map
Copy-map-coordinates = Copy map coordinates
Filters = Filters
Identification-label = Identification label
Sound-recorder = Sound recorder
Observation-with-no-evidence = Observation with no evidence
Photo-importer = Photo importer