From cedaa68fcdb7e866c28aae77f6d8fa1a47cdd08d Mon Sep 17 00:00:00 2001 From: Johannes Klein Date: Mon, 13 Nov 2023 16:17:41 +0100 Subject: [PATCH] Small UI changes (#903) * Swap places in Explore segmented button * Remove identify button from Explore * Remove explanation text for no activity items --- src/components/Explore/Explore.js | 2 +- src/components/Explore/Header.js | 14 +------------- src/components/Explore/ObservationsViewBar.js | 14 ++++++-------- .../ObsDetails/ActivityTab/ActivityTab.js | 9 +++------ src/i18n/l10n/en.ftl | 4 ---- src/i18n/l10n/en.ftl.json | 3 --- src/i18n/strings.ftl | 4 ---- 7 files changed, 11 insertions(+), 39 deletions(-) diff --git a/src/components/Explore/Explore.js b/src/components/Explore/Explore.js index b6e55776a..3ca2686df 100644 --- a/src/components/Explore/Explore.js +++ b/src/components/Explore/Explore.js @@ -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 ); diff --git a/src/components/Explore/Header.js b/src/components/Explore/Header.js index c2015025b..1a74850ea 100644 --- a/src/components/Explore/Header.js +++ b/src/components/Explore/Header.js @@ -105,22 +105,10 @@ const Header = ( { onPress={( ) => setShowExploreBottomSheet( true )} /> {headerRight - ? ( + && ( {headerRight} - ) - : ( - - navigation.navigate( "Identify" )} - accessibilityLabel={t( "Identification-label" )} - accessibilityHint={t( "Navigates-to-identify" )} - /> - )} diff --git a/src/components/Explore/ObservationsViewBar.js b/src/components/Explore/ObservationsViewBar.js index 59780e433..cc288acb4 100644 --- a/src/components/Explore/ObservationsViewBar.js +++ b/src/components/Explore/ObservationsViewBar.js @@ -26,9 +26,7 @@ const ObservationsViewBar = ( { } ); return ( - + diff --git a/src/components/ObsDetails/ActivityTab/ActivityTab.js b/src/components/ObsDetails/ActivityTab/ActivityTab.js index 22f4cdbe9..e48c7a9f2 100644 --- a/src/components/ObsDetails/ActivityTab/ActivityTab.js +++ b/src/components/ObsDetails/ActivityTab/ActivityTab.js @@ -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 ( - {activityItems.length === 0 - ? {t( "No-comments-or-ids-to-display" )} - : activityItems.map( item => ( + {activityItems.length > 0 + && activityItems.map( item => (