Commit Graph

111 Commits

Author SHA1 Message Date
Ken-ichi
ae2f9eeddc Fix missing map tiles when taxon chosen on Explore (#1722)
* IconicTaxonChooser no longer takes a taxon or manages its own state
* Setting iconic taxon filter to Unknown is now its own action
* Unsetting a taxon can be done with the CHOOSE_TAXON action by setting taxon
  to null or undefined
* Omitted some extraneous params from tile requests
2024-06-28 10:13:51 -07:00
Amanda Bullington
7e6323831d Separate store for RootExplore (#1710)
* Create root explore slice; preserves root explore state when user backs out of nav

* Fix tests
2024-06-25 13:22:18 -07:00
Angie
048dea9377 1431 cant filter explore for observations w no taxon (#1701)
* Filter by no taxon explore filters

* remove comment

* remove console logs
2024-06-21 00:59:09 -07:00
Johannes Klein
4793b716ff 1520 explore offline notice (#1697)
* OfflineNotice TS

* Show OfflineNotice on Explore
2024-06-20 16:06:48 +02:00
Ken-ichi
4f46cf5dfd Explore nearby and map area (#1655)
* Bugfix: map area search was broken after Nearby filter set
* Made EXPLORE_ACTION.SET_MAP_BOUNDARIES remove lat, lng, and radius
  attributes so we don't end up applying both kinds of geographic filters at
  the same time
* Renamed setExploreLocation to defaultExploreLocation because it doesn't set
  anything
* Added a unit test fot the Explore reducer
* Bugfix: zoom Explore to nearby after granting permission
2024-06-05 17:10:49 -07:00
Amanda Bullington
829fa70f34 Make explore view sticky; default to species view (#1647)
* Remove tab bar when sharing photos into app; closes #1645

* Make explore view sticky with species as default view; closes #1614

* Fix Explore integration test; use default species view
2024-06-04 15:07:15 -07:00
budowski
137f9f1b03 Display taxon name according to user settings (#1496)
* display taxon name according to user settings
* Cleaned up Taxonomy style a bit

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-05-21 20:45:34 -07:00
Angie Ta
372dbc2493 Merge branch 'main' of github.com:inaturalist/iNaturalistReactNative 2024-05-21 19:33:19 -07:00
Angie Ta
6474fcdc18 Add safeareaview to explore filters modal 2024-05-21 19:32:08 -07:00
Amanda Bullington
799d83f286 Hide keyboard in location picker on tap (#1597)
* Add keyboard dismissable component to ViewWrapper; closes #1567

* Show region in Location Picker when current location tapped

* Fix tests with accessibility label

* Update strings
2024-05-21 17:02:49 -07:00
Amanda Bullington
e17045ca45 Show correct view in Explore when tapping species count (#1587)
* Show correct view in Explore when tapping species count; closes #1573

* Fix test
2024-05-21 15:35:52 -07:00
Angie
8c40d23570 1065 explore filters full screen experience should be a modal (#1562)
* Make Modal for ExploreFilters

* Show bottomsheets in modal

* TaxonSearch now a modal in explore fliters

* taxon search modal now clickable from explore page header

* more explore search modals. WIP nearby and worldwide buttons

* Adding explore user, location and project search modal files

* Nearby and worldwide buttons explore location modal

* Fix undefined place in useMapLocation

* Fix undefined place
2024-05-20 10:24:43 -07:00
Amanda Bullington
b841d0018d Autofocus search bar by default; closes #1532 (#1559) 2024-05-15 15:35:29 -07:00
Amanda Bullington
edef4d90ae Handle taps while keyboard open; closes #1533 (#1558) 2024-05-15 13:54:00 -07:00
Amanda Bullington
38ecbd7f84 Fix crash from changing explore params (#1550) 2024-05-14 16:09:24 -07:00
Johannes Klein
4d0165c89b Replace Explore header taxon display (#1525) 2024-05-10 13:42:18 +02:00
Ken-ichi Ueda
03280fb2e0 Minor fixes for count text in user search results & Group Photos title 2024-05-07 18:38:52 -07:00
Amanda Bullington
32c761ec4f Save previous map region; update zustand slice with TS; closes #1273 (#1470) 2024-04-25 17:40:19 -07:00
Amanda Bullington
146e00bb5f Keep previous explore view when changing filters (#1469)
* Keep previous explore view when changing filters; closes #1454

* Fix test; navigating back to Explore will navigate to previous explore view
2024-04-25 15:45:29 -07:00
Johannes Klein
82beb8c3b5 1434 explore filter project UI (#1466)
* Refactor to TS

* Remove wrong type

* Add shrink to project item

* Add to UiLib with long title
2024-04-25 15:24:32 +02:00
Amanda Bullington
21b9cc6a97 Update Eslint to support TypeScript (#1419)
* Add typescript parser and fix Flow errors in JS files

* Uninstall packages from react-native/eslint-config

* Fix all flow errors (or ignore them for unknowns
2024-04-18 21:35:26 -07:00
Amanda Bullington
37f6a5d7bf Remove old stylesheets (#1417)
* Remove old stylesheets and unused dictionaries

* Remove old stylesheets and unused dictionaries; cleanup global shadow styles

* Fix Heading1; update Tailwind config; add jest clear cache

* Update snapshots
2024-04-18 15:39:19 -07:00
Amanda Bullington
0af617cdd1 Reset taxon/place when resetting explore filters (#1400)
* Allow reset button in Explore filters to reset taxon/place

* Update map when resetting place; closes #1236
2024-04-15 20:32:11 -07:00
Ken-ichi
16faeed32d Explore current location zoom level (#1397)
* Add debug info about zoom to Explore map
* Current loc btn on Explore zooms less than on LocationPicker
2024-04-15 16:29:12 -07:00
Amanda Bullington
5747dd3875 Add observations count with navigation to observation view; closes #1191 (#1385) 2024-04-11 13:51:01 -07:00
Ken-ichi
e17c65d5d1 i18n strings audit (#1350)
* Tried to get accessibilityHints to conform to Apple guidelines
* Tried to make some more helpful `accessibilityLabel`s
* Used fork of fluent_conv to support function results as selectors in Fluent
* Custom VOWORCON function for Fluent

Note that there are still many accessibility problems for screen readers. This
just tries to make sure the strings up for translation are somewhat less
confusing in that context.

Part of #1223
2024-04-10 15:27:38 -07:00
Amanda Bullington
33d7ef6c5b Explore location search buttons (#1382)
* Add nearby, worldwide, and reset buttons to ExploreLocation

* Add permission gate for nearby search in ExploreLocation; closes #1365
2024-04-10 14:50:27 -07:00
Amanda Bullington
158a9f60e5 Fix for some app freezes, ObsDetails (#1374)
* Fix freeze on ObsDetails when fetching remote observation

* Remote keepPreviousData function from react-query v5
2024-04-08 17:38:31 -07:00
Amanda Bullington
408f746701 More package updates (#1360)
* Package updates, including migration to v5 for react-query

* Fix string

* Fix test: ensure markViewed only called once

* Comment out tests
2024-04-05 14:49:42 -07:00
Ken-ichi
fbf93e40d1 Add pre-commit checks for unused i18n keys and used keys not in strings.ftl (#1343)
FYI, this also essentially outlaws variables in translation keys because a key
that is only used with interpolated strings will never appear as "used".

Also starts using a convention of adding info to i18n keys that do not relate
to the text after double dashes, e.g. `Unknown--taxon = Unknown` for a string
that is specifically meant to describe a missing taxon but only needs to have
the word "Unknown".

* Changed several accessibilityHints to 3rd person
* Made several accessibilityLabels shorter and more verb-oriented
* Removed many unused i18n keys
* Refactored variables in i18n keys
* Removed some unused code from the old Settings
2024-04-02 12:17:57 -07:00
Ken-ichi Ueda
d6846de8df Remove Explore back btn when hidden; make sure positional accuracy gets fetched before Suggestions 2024-03-28 17:42:16 -07:00
Amanda Bullington
065ca6cd71 Store Explore query state (#1322)
* Use stored state in zustand; update navigation packages

* Split up slices; fix back button label in iOS

* Create hook for navigation params'

* Add param to ignore stored state in Explore

* Use saved state params in Explore when navigating from Explore search screens

* Downgrade datetimepicker

* Fix maximum update exceeded error

* Save test fix for later
2024-03-28 15:57:28 -07:00
Angie
f37f92795b 1221 explore screen icons (#1308)
* Identifiers and Observers icons

* Add icons to explore bottomsheet
2024-03-27 16:21:56 -07:00
Johannes Klein
072cf3d690 Refator overall padding to not apply for IconicTaxonChooser (#1317)
Closes #1298
2024-03-27 20:28:19 +01:00
Johannes Klein
e63ebf9147 1301 suggestions spacing (#1316)
* Make confidence indicator not absolute

Closes #1301

* Use flex for explore header taxon

Closes #1297
2024-03-27 20:27:58 +01:00
Amanda Bullington
b284bb2b9e Explore filters and navigation entry points (#1306)
* Add test for UserProfile species button from MyObs screen

* Finish initial tests for navigating to Explore from MyObs

* Check API calls are made with correct params

* Use RootExplore screen in CustomTabBar and write test for navigating cyclical Explore -> TaxonDetails

* Add navigation check for UserProfile from root explore screen

* Simplify RootExplore screen; show nearby data for species view

* Mock location permissions for Explore navigation tests

* Update snapshot

* Merge from main

* Fix tests for Explore navigation
2024-03-26 16:59:59 -07:00
Ken-ichi Ueda
628e2e03d2 Several minor fixes
* Show Explore view bottom sheet when HeaderCount tapped
* Fix ObsDetails crash when obs has no faves or obs POJO passed in
* End padding for description on ObsEdit
* Bottom padding for bottom sheets on devices w/ inset (e.g. no home button)
* Subheading1 is apparently supposed to be Whitney Book
* Second line of taxon name on TaxonDetail should be Subheading1
2024-03-25 18:18:38 -07:00
Ken-ichi Ueda
e4b1e1bcf0 Fix size of NumberBadge 2024-03-21 14:43:44 -07:00
Johannes Klein
63a636937d Explore header UI changes (#1289)
* Refactor NumberBadge

* Restyle filter modal icon based on number of filters

* Refactor colors

* Do not show border and padding if TaxonResult is not in a list

* Add conditional render of info button in TaxonResult

* Restyle explore header

Removes the taxon search function and list of results from the header. Also removes unused explore state and props.

* Wrap Explore in View to hide shadow on top
2024-03-19 13:23:38 +01:00
Johannes Klein
19d5705988 Only show species checkmark for species or lower (#1287) 2024-03-18 13:43:05 +01:00
Johannes Klein
8f1b3a70df Remove superfluous delete call (#1282) 2024-03-13 08:09:41 +01:00
Johannes Klein
e1ad366883 Explore header count update fixes (#1275)
* Add 0 check to infinite explore query

Otherwise, it never stops showing loading state because 0 is falsey.

* More precise null check for loading indicator
2024-03-12 10:46:32 +01:00
Johannes Klein
84644bdfd6 Set casual filter automatically when captive is chosen (#1272)
* Comment

* Also set casual to true when setting captive

* Disable checkbox built in state

* Update snapshots
2024-03-12 09:31:51 +01:00
Amanda Bullington
8139b643b8 Prevent global count from loading when permissions granted, Explore (#1247)
* Create useInfiniteExploreScroll and use this to fetch count

* Fetch less data from fields in Explore observations

* Show header count when count is loaded

* Added loading wheel for slow fetching of header counts in Explore
2024-03-04 20:33:46 +11:00
Ken-ichi
954ee922cf Added debug mode for showing diagnostic info and debug screens (#1237) 2024-02-28 19:35:24 -08:00
Johannes Klein
87b1e5a917 Show Taxon detail checkmark on Taxon Details (#1220)
* MOve checkmark component to shared

* Refactor placement classes to higher level

* Show checkmark in taxon details header
2024-02-27 14:39:36 +01:00
Johannes Klein
3579070df0 Restyle Explore view modal (#1219)
* Small rename

* Add strings for modal

* Restyle explore view modal

* Add possibility to override button text

* Fix wrong structure

* Sort strings

* Only use button text prop if given

* Remove translated string
2024-02-27 14:34:02 +01:00
Ken-ichi Ueda
c16158238e Removed some of the diagnostic UI (will replace w/ debug mode) 2024-02-26 12:33:09 -08:00
Johannes Klein
3baf9866a8 Show reviewed by section only when logged in (#1176) 2024-02-26 14:31:38 +01:00
Ken-ichi Ueda
61754f1eb1 Several Android fixes
* Added diagnostic button on Explore to show query params
* Bugfix: Explore was not updating the map boundaries after zooming to nearby
  on Android
* Bugfix: Explore map tiles were not updating when UrlTile's URL updated
2024-02-24 22:00:46 -08:00