Commit Graph
31 Commits
Author SHA1 Message Date
Seth Peterson b48dadef73 MOB-1337: 'Explore V2' to 'ExploreV2' 2026-08-11 10:12:55 -05:00
sepeterson 1a6d47bdd4 MOB-1337: tests 2026-08-07 16:12:07 -05:00
sepeterson 30faebbcb4 MOB-1595: exploreV2 map view 2026-07-27 17:42:48 -05:00
Ryan Stelly 9e91642a95 fix stale subscriptions in useObservationLocation & useWatchPosition (#3790)
* useFocusEffect for more correct state

* useFocusEffect for useWatchPosition (bugs & complexity)

* fix tests

* remove stopWatch return

* remove unnecessary useCallback

* restore maybe unnecessary max age check
2026-07-10 14:46:00 -05:00
sepeterson 2e70c9ffcf MOB-1341: move hooks to ExploreV2 directory 2026-07-06 10:24:01 -05:00
sepeterson ae4c0ba433 MOB-1341: add tests 2026-07-02 09:27:19 -05:00
sepeterson 87d2711399 merge main 2026-06-29 17:10:17 -05:00
sepeterson 76c1601cff MOB-1339: normal import in test and support new results type 2026-06-29 17:05:07 -05:00
Abbey Campbell c21dadb4c4 skip gate when offline 2026-06-29 11:28:37 -07:00
Abbey Campbell dd158bf988 add test 2026-06-25 21:17:24 -07:00
Abbey Campbell 018a16612b fix tests 2026-06-25 20:49:05 -07:00
sepeterson 089d8c56c0 Merge branch 'mob-1339-debounced-value-hook' into mob-1339-universal-search-hook 2026-06-25 21:11:47 -05:00
sepetersonandClaude Opus 4.8 292855eac2 MOB-1339: add useUniversalSearch hook
React Query hook wrapping the search API for autocomplete. Uses the raw
`search` wrapper (rather than fetchSearchResults) to preserve each
result's source type, returning a tagged union of taxon/user/project
suggestions in the API's score-sorted order. Query is disabled for empty
input.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 12:33:57 -05:00
sepetersonandClaude Opus 4.8 9347b58f57 MOB-1339: add generic useDebouncedValue hook
Imperative value debouncer: debounce() schedules a delayed update
(replacing any pending one), setImmediately() applies right away and
cancels anything pending. Mirrors the inline debounce in
MentionTextInput.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 12:33:27 -05:00
sepeterson a0cc15ad4a MOB-967: tests 2026-06-18 09:48:04 -05:00
sepeterson 1e8dc771a0 Reapply "MOB-1321 minimal"
This reverts commit 24e1f1afb5.
2026-05-12 13:15:10 -05:00
Seth Peterson 24e1f1afb5 Revert "MOB-1321 minimal" 2026-05-12 12:54:23 -05:00
sepeterson 58e0d7367c MOB-1321: unit tests 2026-05-08 10:38:28 -05:00
Ryan Stelly 10137c4b83 implement experiment for running offline suggestions in parallel to online (#3321)
* extract imperative offline sugg logic and sneak that into online query for experiment

* fire-and-forget promise before await, fix types & function names

* fix useOffline's useEffect misfiring
2026-02-06 10:13:07 -06:00
Ryan Stelly b78be9243d lint rule & autofix for "trailing comma" (#3299)
* (lint) MOB-1063 enforce trailing commas

* autofix trailing commas

* manually fix newly introduced maxlen violations

* add trailing comma convention to i18n build
2025-12-22 20:17:13 -06:00
Johannes Klein 3c04df39a3 Enable New Architecture (#3111)
* Update gradle.properties

* Update Podfile

* Update react-native-mmkv

* Update Podfile.lock

* Delete useObservationsUpdatesWhenFocused.test.js

* Update closeOnboarding.js

* Fix failing button tap in e2e tests

* Create react-native-sensitive-info+6.0.0-alpha.9.patch

* Update bottom-sheets

* Refactor e2e timeout to file-wide const

* Remove check that fails

* Check for entire list item instead of comments count

* Longer delay to wait for observation deletion to make UI disappear
2025-09-27 08:28:13 -06:00
Corey FarwellandJohannes Klein a43446909c Remove the need to specify TypeScript file extensions in imports (#3094)
* Don't require TS extensions in imports

* Resolve all import extension errors

* Remove file extension from import paths used in mocks

* Remove .d of type definition file paths

* Remove .d of type definition file and import as type

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-09-07 23:41:42 +02:00
Johannes Klein a618b6e870 Update react-native-testing-library to latest (#3044)
* 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
2025-08-05 13:44:49 +02:00
Ken-ichi 69959869ca feat: offline taxon search (#2469)
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
2024-11-21 14:44:48 -08:00
Ken-ichi ea0afb87a9 Don't restart location fetch when view blurred (#1936)
* Don't restart location fetch when view blurred
* Removed what looked like an unnecessary callback in DisplayTaxonName
* Refactored tests
2024-08-07 17:33:22 -07:00
Amanda Bullington abd4bcee23 Refactored location fetching for accurate locations (#1788)
* Refactor to use watchPosition

* Update useWatchPosition with permissions/retry

* Replace useUserLocation with useWatchPosition and fix tests; return userLocation from watch position hook

* Only update observation keys when there's an observation

* Improve TypeScript definitions

* Revert TypeScript commit

* Revert "Only update observation keys when there's an observation"

This reverts commit a4cd17a513.

* Code cleanup: make useWatchPosition more modular

* Code cleanup; location permission in ObsEdit instead of subcomponent

* Use correct accuracy in Camera photos

* Camera fixes

* Fixes to watching position in ObsEdit

* Fix useWatchPosition tests

* Fix tests

* Make sure state updates when renavigating to OsEdit; test fixes
2024-07-16 09:23:09 -07:00
Ken-ichi f3bcec2d2e Continuous location fetch in the cameras (#1673)
* Fetch location continuously in cameras until accuracy falls below threshold
* Unit test for useUserLocation
* Added untilAcc option to useUserLocation
* Bugfix: ObsEdit was not always fetching location for new camera photos

Closes #1340
2024-06-12 11:18:12 -07: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
Amanda Bullington 31b8ae161e Show taxon photo in AR camera (#842)
* Show taxon from realm in AR camera; closes #804

* Add tests for AR camera display

* Add AR camera test for photo display
2023-10-30 17:17:28 -07:00
Amanda Bullington 9c6106f5d0 Refactor tests to use minimum viable test factories (#681)
* Make minimum viable RemoteComment

* Minimum vialbe RemoteIdentification

* Minimum viable remote project, place, and messages

* Create minimum viable records for all remote factories

* Remove factories for local device data

* Minimum viable local taxon, comment, id

* Minimum viable for local observation photo (photo has no primary key)

* Minimum viable LocalUser

* Minimum viable record for LocalObservation
2023-06-27 17:06:01 -07:00
Johannes Klein e1a7a4383d 549 filled activity icons (#574)
* Refactor ObsStatus, add filled property

* Remove viewed prop from observation

* Update properties for ObsDetail mark viewed

* Use separate fields for comments and ids for ObsStatus

* Add hook for fetching updates

* Unit tests for the updates hook

* Unit tests for different paths for updating the realm observation when using the hook

* Update MyObservations.test.js

* Add integration test if updates has been called in my observations

* Update Podfile.lock

* Update observation to not viewed if the keys have not been initialized

* Add test case if observation fields are not initialized

* Add test case

* Refetch stale data on coming back from the background

* Subscribe to observation updates also in ObsDetail screen

This also invalidates and refetches the data after a successful mutation of the id or comment being viewed.

* Refetch observation updates data on sync button press

* Throw error in updates query

* Return refetch function from hook

* Add mock to ObsDetails

* Remove unused var

* Update useObservationsUpdates.test.js

* Reset realm viewed state to true ...

for all observations on app mount and coming to the foreground.

* Reorder function calls

* Change hook to use boolean as enabled param

* Create ObsDetails.test.js

* Update date handle tests to make sure Remote data classes have parseable date

* Add test case for comment and identification

* Update ObsDetails.test.js

* Also check for user in ObsDetails

* Refactored into separate hook for App.js

* Unit and integration test for new hook

* Rename const

* Rename field

* Rename field

* Export query key from hook

* Refactor true check

* Additional methods for obs being viewed or not

* Changed test description

* Add per_page to observations updated
2023-05-11 16:33:37 +02:00