* Build UI for loading state between AI->Match
* Make designs for AI loading screen match Figma
* Selective changes from bf872e2d4f
* Selective changes from 9ed81f99c7
* Selective changes from 4bc7c3474f
* Selective changes from 4916cf70fb
* Replace loading state from store with props
* Add some types
* Make component agnostic of what skipping does
* Remove debug info
* Add more debug data
* Elongate loading state if online errors out and offline is still loading in sequence
* Remove underline
This classname had no effect as far as I can tell.
* Hide skip button when it has no function
* Remove a comment that slipped through partial cherry-picking
* Split apart online and offline fetch status
Weird but even though they start in sequence it happened to me that online error was received after offline was fetched successfully. So, Let's split apart online and offline loading state.
---------
Co-authored-by: Amanda Bullington <albullington@gmail.com>
* Show simple my obs header only for logged-in users
* ActivityCount TS
* CommentsCount TS
* IdentificationsCount TS
* ObsStatus TS initial pass not looking at errors
* QualityGradeStatus TS
* Update RealmObservation interface
* Update RealmObservation interface
* ObsUploadStatus TS, plain copy, no errors yet
* Update types
* Update type
* IconicTaxonIcon TS
* ObsImage TS
* PhotoCount TS
* ObsImagePreview TS
* Image is only opaque when logged in
* DateDisplay TS
* Remove debug flag from UploadObsStatus
* Update type
* Prop to hide ObsUploadStatus
* Test observations need those otherwise they appear as needing edit
* Update imports
* 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
* Minimize the number of rerenders by splitting sheet logic into separate component
* Fix agree sheet
* Fix y offset for scrolling from notifications to activity item
* Change default MyObs layout to grid
* Rename testID
* Update tests expecting to start with list view
* Reverse order of buttons in layout selector
* Fix layout bug of having empty boxes on explore
This adds pivot cards to the app.
The cards are shown only once per app install lifetime, as their state being shown is persisted in the zustand store.
The basic idea is, if the triggerCondition of the modal turns true it is shown, if dismissed it is never shown again.
* Remove default mode from debug mode
* Make sure tests with advanced options are fully out of default mode
* Add two simple tests to make sure correct screens show in default mode
* Show logged out empty observation screen before loading either MyObs screen
* Fix tests
* Fix tests
* Update e2e ios node module caching
* Update caching for node modules
* Modify cache node modules setup for CI
* Revert e2e signIn code
* Update user-facing terminology from gallery to photo library
* Update terminology for devs to make the user-facing change easier to remember
* Update snapshots
* Fix#2572 - New design for MyObservations - default mode, logged out, no observations
* Fixed tests
* Update close onboarding part of e2e tests
* Update sign-in for e2e
* Update loadTranslations.js
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
Ensure useAuthenticatedQuery only executes the query when it knows if the user
is signed in or not, and appends that state to the query key so signed in and
signed out results are distinct.
The problem here was that useIconicTaxa was mysteriously returning stale,
signed out results while offline.
Closes MOB-383
* feat: add text labels to bottom tabs
* fix: treat icon and text as single pressable for screen readers in bottom tabs
* feat: float AddObs button outside of bottom tab bar
Closes MOB-254
---------
Co-authored-by: Kirk van Gorkom <55742+kvangork@users.noreply.github.com>
* 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
* Add functionality for advanced iNaturalist mode
* Fix language settings test by toggling advanced mode on
* Fix e2e tests by adding advanced user toggle
* Fix more tests in Settings with advanced toggle
URL params got removed from the query key as a part of pull-to-refresh, but
that's how changes to filters were triggering a new request. This restores
that behavior, adds a test to ensure changes to filters call the API again,
and fixes the prior test of pull to refresh which was not testing the
equivalent behavior when pulling to refresh (API on first load, so the mock
needed to be cleared).
* split notifications into tabs
* lots of TypeScript conversion
* feat: resize Heading5 and add Heading6 (closes#2480)
* fix: mark remote observations as viewed from ObsDetails
* feat: show indicator in Notifications tabs if unviewed notifications
Closes#2451
* Add pull to refresh handler to Explore Observations
* Ensure pull to refresh clears cache and refetches queries
* Add test for pull to refresh in Explore Observations
Main fix was updating inaturalistjs to get a recent bug fix. Also submits a
JSON body instead of a pseudo-formdata-style body.
Also:
* Only try to process queued items that have not failed in the last minute
* Delete queued items after failing 3 times
* Fix index.js error handler bug that was squelching errors that weren't
getting caught by the ErrorBoundary
* Build out UI for multiple obs upload status and progress bar
* Show expected number of uploads/uploading in ObsEdit and MyObs progress bars
* Add test for upload progress
* Add tests
* Fix test
* Mock useUploadObservations to fix test
* Maybe fix tests in the cloud
* Reset unsynced number only if realm is still open
* Add usePerformance load time to cameras and suggestions
* Declare when to hide delete photo mode without a useEffect
* Use StatusBar hidden component in CameraContainer, instead of useEffects
* Directly handle discards from bottom sheet instead of using useEffect
* Rewrite a whole bunch of camera code to be more declarative and less imperative
* Make sure permissions gate works as expected
* Code cleanup
* Consolidate focus/blur listeners in AICamera
* Fix timing issues in Suggestions tests
* Fix tests
* Ensure photos are still saving to gallery when write permission given & update saving photo state
* fix: show LocationPicker on location tap when permission denied
* fix: zoom LocationPicker out all the way if no pre-existing coordinates
* fix: stop showing sound recorder when microphone permission denied
* fix: ask for permission on clicking the current location button on LocationPicker
Closes#2319
* Make sure API calls have options to fetch correct lexicons; separate capitalization logic for each lexicon
* Fix Explore nav test
* Use auth token to fetch observation after upload; simplify upserting in obs infinite scroll
* Fix useSyncObservations test
* reduce prop surface area for map-related components
* map just receives an observation, not a bunch of its properties
* adjust a lot of logic based on observation.obscured to more specific logic
based on whether the current user can view the coordinates
* hide the map on ObsDetails if there are no coordinates
* show the spec'd explanation for why coordinates are obscured
* remove a prop that just hides a component if true; that should really be up
to the outer context
* fixed a bug on ObsDetail where the remote obs wasn't getting mapped to
Realm-ish attributes
* prevent button mashing from opening multiple TaxonDetails
* clean out the state related obs create / edit after exiting that flow so
that TaxonDetails (or anyone else trying to detect an obs being edited)
doesn't end up finding it when the user has finished creating / editing.
Closes#2271
* Disable row when upload is queued
* Show UploadQueuedRotatingIcon if obs is in queue with no progress
* Refactoring to make list rendering a little faster
* Fix UploadStatus test
* Fix tests
* Remove outdated snapshot
Note that offsetting the onboarding images ended up being a bit hard. We're
mostly doing so with a cropped version of one of the images.
Closes#1906
Also tried to de-flake some tests:
* Use fake timers when possible
* Ensure time travel helper doesn't un-fake our timers
* Wait for time travel helper to finish so changes don't happen outside of
act
* Stop mocking useCurrentUser in integration tests; that's app code and should
not be mocked when integrating all parts of the app; instead use signIn /
signOut helpers
* Remove unnecessary direct uses of act()
* Mocked some inatjs calls to prevent React Query complaints about undefined
query return values
* Close onboarding before all e2e tests
---------
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* Prevents text in explore species and observation grid view from flowing off grid in large font sizes.
Includes several UI fixes for Explore in large font sizes. Closes#2257.
* Updated snapshots and fixed failing test
Debouncing by relying on the nav path continued to allow multiple ObsDetails
instances to get pushed onto the stack b/c the nav path changed before a
subsequent tap was handled. This ensures that only one ObsDetails instance is
allowed per list per obs.
Closes#2204Closes#2216
---------
Co-authored-by: israr002 <israr002khan@gmail.com>
Co-authored-by: israr002 <66955016+israr002@users.noreply.github.com>
* Use system locale on install
* Check for system locale when app comes to foreground (required in Android
b/c app doesn't get restarted when system locale changes)
* Create a constant of SUPPORTED_LOCALES in loadTranslations.js
* Restart app on sign out
* Use existing transaction when writing to Realm if available (might also
consider an approach that waits for the existing transaction to complete)
* Make value returned by useCurrentUser actually reactive
Closes#2243
* Catch and squelch "Network request failed" errors that happen during logging itself (#1639)
* Log around RNSI access to resolve when/where those errors occur (#1639)
* Log around JWT retrieval to resolve when/where JWT missing errors occur (#2155)
* Failing Jest test: Skip id button unmounted as soon as you try to press it
* fix: memoize SuggestionsFooter to prevent dismounts and stabilize tests
* test: wait for elements to be visible in PhotoDeletion test
Also stabilizes several other dependencies, and uses findBy instead of queryBy
to ensure tests can find the skip ID button even it takes a second to
render.
Closes#2094
---------
Co-authored-by: Amanda Bullington <albullington@gmail.com>
* Disable animations on tab bar screens
* Fade in pages accessible from the tab bar
* Add fade in view to stack navigator screens
* Use time travel to step through frames of animation for SoundRecorder
* Use time travel to fix all tests with fade in navigation
* Nav fix
* 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