Commit Graph

242 Commits

Author SHA1 Message Date
Ken-ichi Ueda
172338e05d v0.24.0 2024-02-26 12:34:11 -08:00
Johannes Klein
4877c1a369 Add Support screen (#1171)
* Update strings.ftl

* Add drawer item for Support

* Update strings.ftl

* Change key

* UI for Support screen

* Link out to websites on button presses

* Restyle screen header

* Eslint settings to get rid of an error

* Use react-native-store-review to ask for review

* Not needed use of .tsx in import

* Remove comments
2024-02-25 22:33:04 +01:00
Ken-ichi Ueda
f39cea462c v0.23.0 2024-02-23 21:33:03 -08:00
Ken-ichi Ueda
096af978f0 Test fixes
* updated snapshots
* move timezone setup to globalSetup
* renamed old global setup file to reflect what it actually does, which is
  setup i18next
2024-02-21 10:47:31 -08:00
Amanda Bullington
045ce6f789 Improve Jest performance (#1160)
* Use faker import with specific locale

* Add global beforeAll to initiate i18next
2024-02-16 16:17:00 -08:00
Johannes Klein
3d4a0cbad1 Vision plugin add possibility to set confidence threshold for predictions from file (#1155)
* Use latest vision-camera plugin that exposes confidenceThreshold

* Example of usage in calling predictions from file

* More suitable example

* Update vision plugin to start using versioning
2024-02-16 09:05:00 +01:00
Amanda Bullington
8e6269c8d0 Wrap realm.write in safeRealmWrite transaction (#1123)
* Add a safeRealmWrite transaction for better logging around writes; code cleanup and realm update

* Add safeRealmWrite to tests and make sure action is called synchronously

* Fix final test

* Only write to realm when useObservationsUpdates data changes; code cleanup

* Code cleanup
2024-02-09 16:16:32 -08:00
Ken-ichi Ueda
4b929a8e6f v0.22.0 2024-02-08 18:55:16 -08:00
Johannes Klein
fdca961117 Upgrade RN to 0.71.16 (#1118) 2024-02-07 16:18:50 +01:00
Johannes Klein
011f9d3fdc v0.21.1 2024-01-29 13:48:30 +01:00
Johannes Klein
de7a728b78 Bump version 2024-01-26 13:25:44 +01:00
Johannes Klein
47b3525228 Announcements (#1081)
* Update iNatjs

* Add webshell dependency

* Basic announcement fetching component

* Styling

* Dismiss function

* Error handling TODO

* Add param

* React to link presses

* Missing code

* Add unit test

* Add string

* Refactor search query and dismiss to use react-query

* Activity indicator when refetching

* Add query provider to test

* Mock component in other integration tests

* Move user agent to api

* Throw error instead of logging
2024-01-24 22:22:50 +01:00
Johannes Klein
18ace3e397 Small dependency update 2024-01-16 22:38:47 +01:00
Johannes Klein
62d787dbf8 Upgrade react native patch version 2024-01-12 21:35:15 +01:00
Ken-ichi Ueda
543ac5e1d9 v0.20.0 2024-01-12 11:55:12 -08:00
Ken-ichi
b815f451ea Offline fixes (#1025)
* Changed the default React Query retry handler to be synchronous; being async
  meant it returned a promise, which React Query interpreted as true-ish,
  which meant it retried forever
* React Query retry handler should log info about its query key, which should
  make those problems a bit easier to debug given a log
* Prevent useObservationUpdates from throwing errors when network requests
  fail, which they always do while offline
* Added our own ErrorBoundary that shows a component trace
* Prevent several uses of useAuthenticatedRequest when not online
* Work around bug in vision-camera-plugin-inatvision where it can't get
  dimensions of photos in Android
* Actually throw errors when vision-camera-plugin-inatvision's predictImage
  throws unexpected errors
* Allow online suggestions while signed out using anonymous JWT
2024-01-11 17:18:04 -08:00
Amanda Bullington
cad36a7253 Replace white screen with error boundary component (#983)
* Replace white screen with error boundary component; replace JS exception handler; closes #976

* Code cleanup
2023-12-18 16:34:06 -08:00
Ken-ichi Ueda
af038d203c v0.19.0 2023-12-15 21:28:07 -08:00
Amanda Bullington
b33119f5a4 Update checkboxes & fix tests (#971)
* Update checkboxes & fix tests

* Fix accessibility/tests

* Update pods
2023-12-15 09:36:40 +01:00
Amanda Bullington
5c98d6665c Checkbox shared component (#963)
* Create shared checkbox component

* Add tests to Checkbox component

* Add snapshot and fix space in fill color
2023-12-14 10:01:48 -08:00
Johannes Klein
a59d9f567f Image recognition from local image (#953)
* Use different plugin branch

* Predict taxa for local image url in suggestions screen

WIP: This is working on iOS. On Android there is a crash. The pexample app in the plugin repository works on Android, so I assume the crash is happening because of some things here. Maybe the wrong url is passed in.
Anyway, I am only adding prediction for the local image and haven't wired up the results to state or UI.

* Use latest plugin commit

* Refactor cv model version to be imported from helper

* Refactor image prediction function call into helper module

* Mock for new vision plugin function
2023-12-06 00:38:42 +01:00
Amanda Bullington
808cbee452 Replace ObsEditProvider with zustand for global state management (#948)
* Add zustand to app

* Begin replacing ObsEditProvider with zustand for global state

* Use store and add tests

* Fix bugs

* Add test to check for deleted photos in StandardCamera

* Make sure evidence is only added to current observation; submit comment with ID on ObsDetail

* Fix ObsEditWithoutProvider tests

* Move store to where it's needed

* Fix tests

* Await evidence being added to obsPhotos from camera

* Add a note about slices to useStore
2023-12-05 14:10:00 -08:00
Ken-ichi Ueda
f311e4622b v0.18.1 2023-12-04 19:49:14 -08:00
Ken-ichi
0c7c807b56 Realm & other bugfixes (#950)
* Updated faker; fixed bug w/ DisplayTaxonName trying to modify a Realm object
* Fixed crash going from ObsDetail to ObsEdit
* Fixed bug fetching observation dates (not clear how this didn't instantly crash_
* Bugfix: MyObs observation fetch was failing on taxa w/ float rank_level
2023-12-04 13:47:00 -08:00
Ken-ichi Ueda
452c991c1b v0.18.0 2023-12-01 16:22:45 -08:00
Ken-ichi
105096412b Fix broken offline coord fetch by only reverse geocoding in one place (#932)
Fixes #907. Also adds an ObsEditOffline test for adding a new obs offline...
which doesn't actually catch this bug, but may catch others. This bug may
have been due to a race condition that doesn't happen in the test env for
some reason.
2023-11-29 10:57:53 -08:00
Johannes Klein
72623bf5a6 Update vision-camera patch version
This uses a new fork that uses an updated version of react-native-vision-camera v2.15.6. The biggest change in between these updates is the usage of stable Android CameraX libraries and no longer beta versions.
2023-11-29 17:53:16 +01:00
Ken-ichi
cb6ce8b9ca Altered e2e test to wait for the correct comments count to be visible (#911) 2023-11-28 17:02:21 -08:00
Amanda Bullington
a401854475 Sync deleted observations from server (#924)
* Realm updates for cascading deletions

* Delete local observations from remote list

* Add tests for deleting local obs which were deelted on server

* Fix: don't create embedded objects explicitly
2023-11-27 15:07:23 -08:00
Amanda Bullington
1a27ef68cb Upgrade to Realm 12 (#925)
* Update to realm 12

* Remove unused mocks to fix some tests

* Fix test by unmocking ObsEditProvider

* Fix more tests by removing mocks/changing when tests write to realm

* Remove mocks on ObsEdit component test and fix accessibility labels

* Fix hooks tests with realm

* Set test path for realm; finish fixing tests

* Small tweak

* Upgrade realm/react library

* Migrate schema
2023-11-22 13:01:59 -08:00
Ken-ichi Ueda
f6454e78d0 v0.17.1 2023-11-22 10:14:27 -08:00
Ken-ichi Ueda
3f7035194c v0.17.0 2023-11-20 18:48:19 -08:00
Ken-ichi
6af81365d8 Restore tap-to-focus by reverting to react-native-vision-camera v2 (#923) 2023-11-20 14:49:30 -08:00
Amanda Bullington
7de3790230 Performance: move upload reducer out of ObsEditProvider into MyObservationsContainer (#879)
* Move upload functionality into MyObservations, out of ObsEditProvider

* Move upload into helper function

* Fixes for ObsEdit -> MyObs flow

* Progress on making uploads faster

* Update performance test

* Fix toolbar progress

* Fix tests for observation upload flow

* Fixes from code review; fix e2e test for signed in user by bypassing permission gate

* Hide sign up test when keyboard visible; fixes Android e2e test

* Comment out permissions code in e2e test to see if it's only needed locally

* Comment out permissions gate for signed out user iOS

* Use focused hook to stop ObsEdit from rerendering while user is on other screens

* Restore reassure in branch

* e2e code cleanup
2023-11-15 11:40:11 -08:00
Ken-ichi Ueda
d5876556cb v0.16.0 2023-11-10 23:11:19 -05:00
Amanda Bullington
5d45b21570 Performance testing with Reassure (#867)
* Performance test with reassure, danger/CI integration set up

* Remove log

* Fix script location in github actions test

* Run performance tests before regular tests

* Move script

* Make script findable and executable

* Find scripts directory

* Find scripts directory

* Find scripts directory

* Give permission

* Comment out performance test CI

* Remove danger/CI and update naming

* Remove danger from package.json
2023-11-09 09:50:22 -08:00
budowski
3c6f453bf3 Native image picker (#828)
Uses a fork of
https://github.com/react-native-image-picker/react-native-image-picker that
forces an old-style Android native photo picker to ensure we get all the
photo metadata we need. Closes #431 and closes #569

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-11-06 19:41:09 -05:00
Amanda Bullington
1d9adb0f51 More performance improvements (#845)
* Remove console statements in production build

* Move uploadReducer into separate file

* Create reducer for creating obs; combine reducers

* Fixes with createObsReducer

* Move album, passes test states out of global context

* Bug fixes for ObsEdit flow

* Create photo gallery container

* Set accessibility test todo for PhotoGallery

* Improve FlashList performance MyObs

* Prevent flicker on modal close

* Create less rerenders in MyObservations

* Memoize drawer items for less rerendering

* Memoize custom tab bar

* Remove unused libraries and update snapshot

* Fix and prune dependencies

* Add AddObsModal tests

* Fix e2e test android by making comment confirm button visible

* Use callbacks and memoization to cause less rerenders

* Fix tests

* Remove unused code

* Remove log

* Minimize calls to check whether internet is reachable

* Remove unused code
2023-11-06 12:24:31 -08:00
Ken-ichi Ueda
5dfae51248 v0.15.0 2023-11-03 17:34:11 -04:00
Amanda Bullington
5913fb511e Energy usage / performance improvements (#844)
* Remove console statements in production build

* Move uploadReducer into separate file

* Create reducer for creating obs; combine reducers

* Fixes with createObsReducer

* Move album, passes test states out of global context

* Bug fixes for ObsEdit flow

* Create photo gallery container

* Set accessibility test todo for PhotoGallery

* Improve FlashList performance MyObs

* Prevent flicker on modal close

* Create less rerenders in MyObservations

* Memoize drawer items for less rerendering

* Memoize custom tab bar

* Remove unused libraries and update snapshot

* Fix and prune dependencies

* Add AddObsModal tests

* Fix e2e test android by making comment confirm button visible
2023-11-02 11:03:48 -07:00
Amanda Bullington
726ebc2750 Remove script from package.json 2023-10-30 11:13:36 -07:00
Ken-ichi
dacd8788ec Permission gate layouts (#743)
Primarily adds designed layouts for permission gates (also referred to as permissions priming).

* moved permission gate business logic into a container
* use react-native-permissions exclusively
* Show PermissionGate as a modal
* Basic unit tests for PermissionGate
* Consistent content width on tablet, other minor style changes
* Allow PermissionGate to be used outside of nav hierarchy
* Use user location on Explore after getting permission
* Remove redundant 'always' location perm in ios
* Isolate current location button in the Map component, which uses location fetching functionality from react-native-maps instead of our own
* Updated cocoapods; matched INatIcon.ttf to sha1 hashes
2023-10-18 16:47:12 -07:00
Johannes Klein
a583487d30 v0.14.0 2023-10-16 22:25:57 +02:00
Johannes Klein
7e166bb3df Use fixed camera version 2023-10-16 15:35:18 +02:00
Amanda Bullington
43a9edc0ef Upgrade SVG libraries (#822) 2023-10-13 16:57:46 -07:00
Amanda Bullington
7d20f6aa81 Suggestions (using server data) (#821)
* UI overhaul for Suggestions

* Updates to suggestions

* Update permissions library and Podfile

* Get tests passing

* Add tests for suggestions

* Update snapshot

* Add comment prompt & box to TaxonSearch

* Add empty state

* Nav and loading fixes

* Add more tests to Suggestions flow

* Fix tests

* Fix tests
2023-10-13 14:46:05 -07:00
Johannes Klein
2baac4f9f8 Vision camera v3 (#819)
* Update vision camera

* Breaking change: camera device hook

* Breaking change: replace reanimated function calls

* Update vision plugin

* New take photo options

* Use changed props

* Remove undocumented prop

* Update test mocks for vision camera libraries

* Replace vision camera device orientation strings

* Add explanations to a central file for patches needed with the vision camera

* Some more patches
2023-10-12 11:38:17 +02:00
Amanda Bullington
47c5d8e2fd Drag and drop photos (#813)
* Use drag and drop to let a user change photo positions

* Fix tests

* Add test for EvidenceList

* Fix tests

* Fix state for no evidence / no observation photos

* Add unit tests for empty list and displaying obs photos
2023-10-11 13:55:27 -07:00
Angie
1487e5f421 Accuracy circle and obscuration cell for obsdetail map (#744)
* Obscuration cell and accuracy circle on ObsDetail map
* DetailsMap view
* Copy and share location from DetailsMap
* Patched react-native-maps to address bug with showsUserLocation

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-10-09 12:41:22 -07:00
Ken-ichi Ueda
565d304ed1 v0.13.2 2023-10-05 15:05:25 -07:00