* A key like this does not exist because we don't save rep Photo to realm
* Show rep photo on suggestions
* Add comment
* Update types.d.ts
* Move code around
* Send rep photo ID to taxon result
* Send rep photo to taxon result
* Add white background to box on taxon details
Closes MOB-491
* Comments
* Only send ID around and move photo to top
* Send first photo id also from match screen
* If rep photo is of same taxon, only send ID, else send entire photo to taxon details
* Refactor taxon image
* Updated realm types
* If rep photo is of other taxon send entire object
* Create copy of realm taxon
Avoids an error "object has been invalidated and deleted" which I didn't have tome to track down.
* Include search for representative photos
* Request representative photo as a taxon field
* Show representative photo if given for alternative suggestions
* Add comment
* Use representative photo of top suggestion in photos section
* remove assumed and undocumented meaning of page being zero from our use of
useInfiniteScroll in Explore; uses explicit type checks instead
* document byzantine pagination logic in useInfiniteExploreScroll
* fix broken infinite scroll when sorting by faves (was only showing first
page)
The underlying problem from 96c316a was setting initialPageParam to 1 in
useAuthenticatedInfiniteQuery, which seems rational, except
useInfiniteExploreScroll was using a false-ish value of page to detect when
it was requesting its first page. This does the same by being more explicit
about page's type without injecting undocumented meaning into the params we
hand to useInfiniteScroll.
* refactor: move Explore page param munging into unit tested helper
Closes MOB-400
* refactor: convert UserIcon to TypeScript
* feat: show simple MyObs to signed in user; add user icon & login to header
* feat: show warning and edit button for unuploaded obs w/o basics
* refactor: consolidate ObsEdit navigation logic
* feat: show edit button with circle dots
* refactor: upload UploadQueuedRotatingIcon to the more reusable CircleDots
component
* refactor: upload icons to use more composition and fewer specialized, one-off
components
* fix: bugs in determining if an obs has date and coords
* refactor: extract MyObservationsSimple business logic into container
* refactor: get total obs count from relevant hooks
* feat: show remote species for signed in users
* fix: hide photo count icon when missing basics icon is present
* feat: show banner alerting user when missing location or date
Closes MOB-318
* refactor: convert ExploreProjectSearch to TS and assoc'd TS changes
* feat: use infinite scroll in Explore Filters project search
* feat: show universal search results in Explore project search
This should show the same ranked search results a user would see at
https://www.inaturalist.org/search?source[]=projects
Closes MOB-313
Simplified version of MyObs for signed out users with more than 1 obs. Currently only in debug mode.
Also:
* refactor: extract TaxonGridItem into a reusable component
* chore: TypeScript cleanup
Closes MOB-317
* Support Sign in with Apple on iOS, w/o design
* Typescript conversions
* Add authenticateUserByAssertion that should be usable w/ Google OAuth-based auth
Closes#583
* #2253 - when viewing explore map from project details - zoom on project's place
* #1433 - show loading indicator as map is loading
---------
Co-authored-by: Amanda Bullington <albullington@gmail.com>
* 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
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
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>
* 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)
* Create a project requirements modal screen
* Add text and set defaults for project requirements
* Fill in project inclusions for requirements
* Add more project rules
* Show taxon exceptions
* Rules for establishment means
* Rules for media types
* Show multiple locations in project reqs
* Use project_observation_rules to show projects
* Cleanup
* Implement infinite scroll in Projects
* Styling fixes for empty state in projects; add infinite loading wheel
* Resolve require cycle from ObsFlashList and FlashList shared components
* Order by distance and remove radius for nearby projects fetch
* Code cleanup
* Fix test
* Code cleanup
* Minor tweaks to search API request and results
* On user profile screen, if routed here with login as param search for user id
* UserText to TS
* Add linkify mention plugin dependency
* Rely on plugin for mention parsing
* Adjust rel
* Add a title attribute to mentions only
* Navigate to profile screen for mentions
* Use props
* Fix some types
* We dont really need this plugin if we check for href includes people link
* Replace user search api call with fetch by login
* Push new profiles on top of the navigation stack every time
* Add error strings
* If there is no user found for this id show error
This can happen I assume when a user changes the login but comments are not updated.
* Use this plugin
* Remove log
* Only react to anchors that have mention as a title
* Update types
* Another inferred type
* Add new error type for 429; remove unnecessary logs
* Batch API calls for SpeciesSeenCheckmark
* Remove SpeciesSeenCheckmark test
* Revert logging errors
* Use Set for observedTaxonIds
* Add comments around logger.info statements
* Merge linting update
* More fixes from code review
* Switch to non-authenticated useQuery for fetching taxon ids seen by X user id
* Fix tests
* Refactor into useReducer
* Use reducer for Suggestions
* Offline working
* Progress on getting location permissions button to work as expected
* Code improvements
* Fix photo deletion test
* Fix AICamera nav test
* Ensure suggestions location permission uses location immediately
* Loading wheel fixes
* Fix photo deletion test
* Use online result to advance to obsedit in PhotoDeletion
* Fix test by using online mock
* 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
* Log the actual message we intended for JSON parsing errors
* Always use the configured tile URL instead of hard-coding it
* Use tiles.inaturalist.org whenever possible
When an Error object is passed to logger.error() as the last arg, this change
* extracts error_type and backtrace
* reports a shorter message that should be searchable
Also:
* Avoid double logging errors; ErrorBoundary should log errors in a way we can parse
* Added restart button to default ErrorBoundary; globalized text
* Add typescript parser and fix Flow errors in JS files
* Uninstall packages from react-native/eslint-config
* Fix all flow errors (or ignore them for unknowns
* 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>
* Made react-native-logs post to API log endpoint
* Try to build a slightly more informative user agent
* Made react-native-logs post to API log endpoint
* Try to build a slightly more informative user agent
* Remove unused const
* Replace other usages of exported user agent
* Revert "Remove unused const"
This reverts commit 02389c8390.
* Revert removal of axios instance
* Strange order
* Remove device name from user agent
* Copy logstash transporter to new file and change to post
* Update import
* Remove comma
* Get the user jwt token as authorization for the log request
* Use anonymous token as app token
* Mock away logs config file because it now has a dependency on authentication
* Code style
* Typo
* Add timestamp field to form data, to show client_timestamp on the logs
* Add TODO
* Add a developer button to force a js-side error
* Add comments
---------
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
Replaces account settings with a small set of settings and a web view to show settings on the website.
Also
* Minor taxon detail fixes
* Display taxon name on observations according to the current user's
preferences, not the observers
Closes#927
---------
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* Add string
* Add a state that signifies syncing in progress
* Rename state as it no longer only pertains to uploading
* Set flag on button press
* Fix bug with wrong number of obs to upload shown
* Update MyObservations.test.js
* Add 1 to param for human readability
* Update MyObservations.perf-test.js
* Update ToolbarContainer.test.js
* Reintroduce number of finished uploads
* Update comment
* Use animation for gallery loading screen
* Added basic navigation test for StandardCamera & SoundRecorder
* Abstracted camera nav buttons and used in SoundRecorder
* Show sounds in the MediaViewer
* Added sounds to ObsEdit, w/ MediaViewer support
* Ensure sounds get both uploaded and added to observations
* Local sound deletion
* Remote sound deletion
* Rudimentary and deeply unperformative sound visualization
Closes#869
* Shows indicator in tab bar when you have new updates
* Should update every minute
* Make unread updates indicator go away when you view the updates
Closes#900
---------
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* Delete local & remote observations on MyObs; show progress
* Update tests & add test for delete hook
* Fix test failures
* Add tests for deletion strings in Toolbar; add test for multiple deletion
* Clear deletion text on toolbar when user navigates away from MyObs
* Add a check in e2e test to make sure observation was deleted
* 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