* Show edit title; add tests; set current obs before nav to ObsEdit screen
* Use edit title when obs is not synced; rewrite ObsEdit tests to show nav works correctly with useStore
* Remove uuid in params to ObsEdit; no longer needed
* Fix e2e by ensuring ObsEdit doesn't rerender with deleted obs
* Refactor BottomSheet to always use dynamic snap points
For all usages in the app of the BottomSheet component, or components derived from it. This removes the possibility to specify snapPoints as a prop.
In other words, all instances of bottom sheet will scale, depending on the content to display.
This necessitated some changes in paddings at the bottom of existing bottom sheets.
* Add check if snapPoints are passed in and throw Error
* Fix max line length
* Use offline model for displaying sugggestions
* Simplify Suggestions/TaxonSearch screens using hooks
* Use updateObsKeys function from useStore
* Simplify code and fix unit tests
* Fix tests for offline predictions
* Fix faker urls
* Fetch remote taxa to display taxon photos in Suggestions
* Fix useTaxon code and test
* Use online vision results as backup for offline results
* Fix tests and add test for online predictions
* Use Flatlist for Suggestions and fix tests
* Move API call out of Attribution and fix test
* Fix tests
* Fix test warnings
* Add vision param to identification create; test vision false on TaxonSearch and true elsewhere
* Test that vision attribute is only used from Suggestions screen
* Add owners_identification_from_vision attribute to observations
* Fixes for vision attribute
* Make sure taxon is applied from Suggestions/TaxonSearch via ObsEdit
* Fix for ids vision
* Fix Suggestions tests
* 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
* 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
This changes the default behavior for API errors such that they get thrown by
default, forcing code closer to the user to handle them. While we were set up
to catch errors in the upload process, we were supressing them so they
weren't bubbling up to that level. No more!
This also adds some additional handling for the occasionally zany shape of our
API error responses.
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.
Prevents adding an ID from suggestions from returning you to ObsEdit like it does in the new obs flow. Closes#851
---------
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
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.
* Rename state
* Zoom into map according to accuracy of geolocation
* Function to calc latitude delta
* Remove no longer needed region from useEffect
* Fix wrong commit
* 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
* 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