* Update package.json
* Update package-lock.json
* Update
* Update to v13
* Update package-lock.json
* Breaking change: remove extend-expect
* Latest version
* Update package-lock.json
* Breaking change: Removed Accessibility matcher
* Update Suggestions.test.js
* Update DisplayTaxonName.test.js
* Testing the same but differently phrased
* Not really needed to test this
And since not.toHaveTextContent stopped working I just remove it.
* Update useTaxonSearch.test.js
* Move broken tests into folders that are not run
* Only move single tests that are failing
* This does work after all
* Remove only single tests that are broken
* Only move failed tests
* Only move failed tests
* Only move failed tests
* Does not pass on CI only
* Update vc plugin
* Update tests with breaking change: combined_score now 0-100
* Frame processor predictions are in range of 0-100 with new key
* Remove offline convert score to confidence
* Update calculateConfidence.js
* Common ancestor should use combine_score
* Offline suggestions have combined_scores now instead of scores
* Change filtering to range 0-100
* Only use combined_score for Match screen
* Update debug data
* Fic typo in tests
* Remove key from type
* Create useSuggestions hook with all online/offline logic for reuse in Match screen
* Show real online/offline suggestions on Match screen
* Code improvements
* Display top suggestion from useSuggestions, not AICamera
* Save TaxonPhoto to realm; display taxon on match screen
* Code tweaks
* Add match screen to navigation after AI camera in debug/default mode
* Fix test and refactor
* Fix issue with infinite renders in useLayoutPrefs
Searches the local database for taxa if there are no online results.
Also
* typescript conversions
* refactor and consolidate view logic around taxon search
Closes#2348
* TaxonResult TS
* Suggestion TS
* Do not show checkmark for logged out online suggestions
* Update strings.ftl
* From suggestions show bottom sheet on taxon detail
* Refactor updateTaxon
* Add text
* Another text
* Two more texts
* Fix import
* Function stubs
* Use a bulleted text list
* Restyle entire bottom sheet
* Code reorder
* Refactor saveObservation function
* Navigate to login screen for Upload now button
* Add key
* Save obs on press and nav to list
* Code style
* Get updated currentObservation immediately to pass to saveObservation
* Test AICamera with current user
* Show the bottom sheet only for logged out users
* Mock useCurrentUser hook
* Mock useCurrentUser hook
* Mock user
* Mock user
* Don't overwrite description in Suggestions/TaxonSearch; closes#1913
* Fix TS
* Remove unused code related to adding/editing comments in Suggestions/TSearch
* Remove test about showing comments on Suggestions
* realm TS
* provider/contexts TS
* todo
* useIconicTaxa TS
* Refactor taxa list into component
* Use TaxaList for taxon search screen
* Refactor render decision
* Use flex 1 container instead of footer
* Show offline notice for query without results
Refetch taxa when going back online
* Update required because of useIsConnected
* Await typing in test
* Mock useIconicTaxa
* Add tests to taxon search
* emitUploadProgress TS
* createUTFPosition TS
* convertScores TS
* Add field type
* Fix imports
* Fix Suggestions test & create test for online suggestions with location
* Fetch location according to toggle
* Update tests
* Show loading & remove prev queries when toggling location
* Fix loading test
* UI changes to suggestions screen
* Update offline suggestions UI and allow refetch
* Allow user to search online suggestions with and without evidence location
* Add improve location button and refactor header
* Use loading screen correctly between location/ignore location
* Hide location permission button and code cleanup
* Fix test for suggestions changes
* Navigate user to Suggestions after Camera; add location check to usePrepareStateForObsEdit function
* Test that Camera advances to Suggestions when checkmark tapped
* Use vision result as top suggestion on Suggestions screen
* Write AR nav test; filter vision result from all suggestions list
* Show LocationPermission on camera screen; navigate back from ObsEdit
* Updates to flow so user can back out of ObsEdit to cameras
* Fixes
* Add evidence to existing observation when backing out of ObsEdit flow
* Fix tests
* Add mocks for worklet functions
---------
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* Only requests remote taxon if local is missing or hasn't been synced in a
week
* Returns a localized version of the remote taxon immediately without waiting
to get a newly-created record from realm
* Expands tests to use a unique realm, integrate more of our code, and check
to ensure the API gets called
* Show indicator while loading taxon on ARCamera
* Show iconic taxon found in model results if we can't load a remote taxon
* Show iconic taxon as backdrop for ObsImage whenever possible
* Remove Explore Filters screen
* State for Explore filters modal
* Accept modal state in Header to open modal
* Basic explore filters modal
* Save taxon object to explore state on update
* Update types expected
* Pass state and update function into filters modal
* Receive new props
* Destructure taxon from props
* Restyle header View
* Add main Heading
* Add taxon section
* Restyle modal header
* Add numbers badge component
* TaxonResult add prop for general on press
* Make TaxonResult checkmark optional
* DisplayTaxon can receive children as right-side component
* Refactor ExploreFilters component tree
* Move header out of scroll view
* Update ExploreFilters.js
* Update ExploreFilters.js
* Add icon to display taxon
* Update ExploreFilters.js
* Add basic taxon search screen
* Use taxon result without checkmark, send taxon to Explore screen
* Add string
* Accept taxon on explore screen
* Add a dummy screen for explore location search
* Add type
* Store place in state when received as route param
* Basic explore filters location section
* Add strings
* Move filter modal to separate component, add sort by props
* Add screen for testing purposes
Because atm we can not have two modals open at the same time, I move filters to a separate screen for testing the other modals.
* Add initial filter params and do not pass down undefined ones
* Pass function to update sort by down
* Create SortBySheet.js
* Navigate to test screen instead
* Sort by button text
* Add default filters definition
* Call reset function if filters are not default
* Add prop and function to reset
* Add user search screen
* Move search screens
* Move references
* Replace list with flash list
* Add item separator
* Remove footer
* Return user to Explore
* On press handle for user list item
* Fix wrong imports
* If a user is in prop show user icon and edit button instead
* Refactor display taxon to be inside a Pressable
* Missing import
* Receive user in explore rout params
* Quality grade section header
* Placeholder
* Add TODO
* Calculate number of filters set
* Only send user id to explore screen
* Do send back user object, filter out user_id
* Add project section
* Refactor project list item into standalone component
* Change initial value to undefined
* Add project search screen
* Remove loading state
* Show project in filter modal
* If project is in param set it to state
* Add Checkboxes to filter modal
* Remove comment
* Taxonomic Ranks section UI
* Use props for checkboxes
* Update ExploreContainer.js
* Calculate actual query param
* Is Most Faved possible?
* Actually set sort by query params
* Save hrank and lrank to explore state, prop down
* Update ExploreContainer.js
* Show ranks in button text
* Radio modal to test taxonomic ranks
* Add sticky toolbar
* Update strings.ftl
* Date observed section bottom sheet
* Date observed prop
* Change padding
* Date observed all UI
* Taxonomic ranks section
* Add todo
* Refactor open sheets state
* Update button
* Add exact date picker sections
* Store dates in state
* Update strings.ftl
* Refactor function name
* Refactor constants
* Reset date states on mode change
* Set new months to state on change
* Configuration for showing months checkboxes
* Receive and update months with checkboxes
* Refactor RadioButton sheet to export radio button row
* Add Media section UI
* Add media state to Explore
* Start with Establishment Means section
* Add checkbox texts
* Add states
* Functions to update state
* Add sort by param for most faved
* Spacing for checkboxes
* Wild Status section UI
* Wild status state
* Reviewed UI section
* Reviewed state
* Set current user id as viewer_id for review true to work
* Remove testing code
* Photo licensing UI section
* Photo license state
* Prop down photo license update, use param in search
Forgotten in previous commit
* Unused prop
* Add noStatus state
* Change Establishment Means status to TODO
* Add TODO text
* Console log for testing params
* After rebase from main this was necessary
* Simple switch between two UIs
* Simple explore context
* Lift Provider one up
* Copy over photo license to new provider
* Copy over review filter
* Refactor to use enum
* Copy over wild status, and enum refactors
* Refactor some more state
* Remove unused navigation
* Refactor one state
* Refactor some more state
* Refactor some more state
* Remove testing screen
* Refactor some more state and derived state
* Do send over project as param from Project Details
* Update FilterModal.js
* Rename components
* Remove unused param handling
* Add keys
* Remove substring for key
* lrank and hrank combined counts as one only
* Use the correct constants
* Add key
* Fix issue with button text
* Add View Wrapper for filters section
* UI cosmetics
* Compare current filters state to a snapshot
* Change button level to focus
* Add context action to revert to snapshot
* Confirmation dialog strings
* Add confirmation sheet
* Send current user along to Explore from Home Header
Closes#887
* Date bottom sheets texts
* Show texts in modal
* Set search to worldwide on param received
* Send taxon as param to Explore from Taxon details screen
Closes#889
* Show all observations worldwide of project
* On species view pressed should navigate to explore species view
Closes#893
* Go to explore from users profile
* Navigate to species view from user profile
Closes#894
* Enable unclear filters
* Add taxon to context
* Use context for explore params further down the tree
* Refactor one state
* Remove unused action
* Remove unused state
* Refactor function
* Refactor state
* Refactor place_id, which concludes reducer refactor
* Refactor names
* Do not use key inside context's state
* Add a11y label
* Remove duplicate test ID
* Remove superfluous component
* Create ProjectListItem.test.js
* Add failing filter modal test
* Remove log
* Rename function
* Months strings
* Remove todo
* A11y labels
* Remove TODOs
* A11y label
* A11y label
* Refactor taxon search hook
* Update FilterModal.js
* A11y labels
* A11y not possible in react-native-paper lead to test fails
* Update TaxonSearch.test.js
* Add dropshadow
* Another dropshadow
* Add TODO text to UI elements that are not finished
* Reverse order
* Refactor constants
* Revert "Refactor constants"
This reverts commit 2f52e936d6.
* Refactor to use constants
* Refactor constants use
* Refactor constant use
* Refactor constants use
* Refactor constants use
* Refactor constants use
* Refactor code
* Add validation of date format
* Correct type for snapshot action
* Add taxonomic rank enum
* Taxon can be undefined
* More precise type
* Fix wrong string usage
* Refactor radio button row component
* Refactor ProjectListItem import
* Example usage of new ui elements
* Pull sort by sheet back inside filter modal
* Rename params
* Add useEffect dependency
* Rename param
* Fix broken function
* Bugfix: TaxonDetails was crashing if it received a null taxon
* Send lat and lng instead of latitude and longitude to the score_image
endpoint
* Show offline suggestions when you are offline
* Show notice when viewing offline suggestions
* Moved code unique to useOnlineSuggestions into that file
* Ensure we use a medium size image to get suggestions when dealing with
remote URLs
* More logging around React Query retries
* Use default retry logic for useAuthenticatedQuery
* Made a module-resolver shortcut for tests
* Move offline notice above top suggestion; hide when offlines exist but onlines do too
* 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 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
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>
* 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
* Simplify ObsEditProvider by moving functions into local state & calling reducer less frequently
* Fix delete all observations
* Fixes
* Move index selection to MediaViewer via params
* Access ObsEditContext on top level of ObsEdit and pass props
* Move context to top level screen components
* Fix tests
* Use waitFor to fix ObsDetails integration test
* Alphabetize props; remove realm check; refactor new Id method
---------
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>