* Update import
* Import realm models as types
* Remove unused import
* Add function param types
* Add function param types
* Rename param for consistency
* Remove unused function param
* Type param
* Update type
* Add TODO
* Import function param type
* File rename without change
* Update imports
* Add some fct types
* Add fct param types
* Add function param types
* Update ObservationPhoto.ts
* Remove unused param
* Type fct param
* Add type
* Remove unused param
* Update comment
* Add fct param type as accessed by local context
* Add types from what is accessed in function
* Add types
* Remove unused types
* Add basic type, as is used in local context
* Bring require statement back
* Import other function param types
* Add property types
* Fix wrong extends
* Assert inputs and outputs for mapping a local observation photo to server action
* Update unit tests for errors
* Rename file
* Update imports
* 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
* 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
* Convert web view components to typescript
* Basic tests for URL handling in FullPageWebView
* Allowlist of domains in FullPageWebView
* Open links in browser in most situations
* Allow FullPageWebView to handle mailto links
* Throw errors if FullPageWebView is about to leak a JWT
* Restore FullPageWebView functionality to signup screens
Closes#1803Closes#1934
* Style taxonomy ancestors and current taxon
* Link to TaxonDetails pages
* Add children to TaxonDetails taxonomy
* Add children taxa toggle
* Display children after button tap
* Wrap text'
* Fix italic font size in DisplayTaxonName
* Add tests to Taxonomy component
* Change Taxonomy test
* 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
* 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
* Mock INatPaperProvider to remove warnings about wrong icon names in jest; closes#421
* Remove unnecessary paper provider mock
* Add mocked views back to tests
* Change bottom sheet modal to bottom sheet
* Give flatlist container a minHeight to make bottom sheet snap correctly when flatlist has few items
* Make entire header sticky above FlatList
* Hide header on scroll while keeping toolbar sticky on scroll
* Allow flatlist to scroll while bottom sheet modal up
* Use animated event on scroll with interpolation and stickyheaderindices to keep toolbar sticky while animating header
* Add accessibility label to logged out card
Closes#175
* Start using React Query to make remote data requests
* Renaming, standardized error handling from API calls, moving code
* Fixed messages test; changed useQuery mocking approach
* React Query should only retry for network issues
* Tried using useAuthenticatedRequest on TaxonDetail
* Clear the React Query cache on sign out
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
These rules are largely based on the AirBnB ones, which are not quite standard
for the React Native world, where Prettier seems to be more common, but I
think they add a lot of useful checks, and unlike Prettier we can customize
them. This also just makes it easier for people on the iNat team to work on
the mobile app.
Some specific changes:
* Added eslint-plugin-react-hooks to eslint rules
* Added eslint-plugin-simple-import-sort to eslint rules
* Bugfix: could not import photo from gallery
* Added support for react-native/no-inline-styles eslint rule
* useUser should not bother fetching a user for a blank userId
* Create Explore screen
* Add input field component
* Add input fields
* UI for list view in Explore; dropdown taxa picker
* UI for list view in Explore; dropdown taxa picker
* ObservationViews component is shared between Explore and My Observations
* Get tests passing with Explore + ObservationViews
* Add map view, iOS location permission whenInUse, and geolocation fetch
* Add RN permissions and geolocation to jest mocks
* Explore filters, testing, explore provider/navigation stack
* Crash fix for grid items with no observation photos
* Code cleanup; remove duplicate files
* Remove more duplication
* Consolidate pickers into a single component
* Move copyRealmSchema into Observation model
* Move copyRealmSchema into Observation model
* Move observation photo logic to Obs model
* Obs details fetches an observation from API instead of from realm/exploreList
* Rename hooks files with 'use' instead of 'fetch'
* Add user to observation schema
* Change realm keys from camelcase to snakecase with mapping
* Simplify model code
* Fix tests for ObsDetails
* Attempt to clean up ObsList code; move useObservations hook into provider
* Several minor changes to get tests passing
* Stopped mocking useObservation hook in MyObservations integration test; this
should not be mocked in an integration test since the point is to test the
integration of all the different moving pieces within the app, and it was
causing a failure because it was mocked but none of the methods were
actually provided with mock responses, so it wasn't doing anything
* Used the LocalObservation factory for ObsDetails.test.js, where the
useObservation hook should return an observation in the Realm schema
(or something like it), not in the remote schema
* Updated the LocalObservation factory to meet expectations
* Attempting to work around weird problem with fkirc/skip-duplicate-actions
* Removed fkirc/skip-duplicate-actions from CI for now
* CI fix
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* Fetch taxon details from API v2
* Add basic styling, html renderer, Wikipedia link
* Add testing for TaxonDetails API results
* Code cleanup
* Upgrade accessibility engine
* Add testing for ObsDetails
* Check that data tab renders when user taps it
* Make user profiles dynamic and tappable from ObsDetail
* Add test coverage for user profile
* Test navigation and linking to wikipedia
* Add accessibility roles and test todos
* Add grid view to observation list
* Add accessibility roles to pressables in obslist