* 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
* Hide skip ID button on Suggestions sometimes
We only want to show the text "Add an ID later" when one needs to move forward
without adding an ID, so this hides it
* When reached from ObsDetails (you can go back)
* When reaced from ObsEdit and there is an existing identification
(you've already added an ID so if you're editing it you need to choose a
taxon or back out)
* Update test
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* Replace name in permission requests
* TakePhoto TS
* PermissionGate TS
* Type
* PermissionGateContainer TS
* Interface
* Types
* LocationGate TS
* Remove LocationPermissionGate from Camera
* Remove write only permission
* Type
* ObsPhotoSelectionList TS
* Code style
* Show the improve with location button
* Create useLocationPermission.tsx
* Use new hook on suggestions
* Doc comment
* Use new hook in camera view
* Add strings
* Refactor Explore main content
* Use permission hook on RootExplore
* Add no location permission component
* Rename function
* Prop request permissions and use with button
* Default to Nearby label
* Remove Node type
* Projects TS
* Use useLocationPermission hook in projects screen
* Add string
* Prop permission down
* Refactor list render
* Refactor tab id into enum
* Tab type
* On nearby tab if without permission show button to prompt
* Leftovers
* Remove location permission gate from ObsEdit
* Use location permission hook on evidence section
* SearchBar TS
* Do not autoFocus on search bar in location picker.
Closes#1743
* Update type
* LocationSearch TS
* Show location permission gate on location picker's mount
* Add location permission to CurrentLocationButton
* Remove unused props of Map
* Remove unused exports from useMapLocation
* Migration
* Revert "Show location permission gate on location picker's mount"
This reverts commit 30ff75698c53d54d0b14cd2bd629f7155b743bf8.
* Add callbacks to useLocationPermission hook
* Show location permission ask on Obs Edit
* Remove unused string
* Reset explore filters should set location always to worldwide
* Add helper function to show place text in Explore
* Remove unused state of filter modal
* Show place text in filters modal with helper
* Show location permission button only for Nearby explore state
* Add a placeMode state
* Do not send placeMode to API
* Also treat limited permission as yes
* useLocationPermission in ExploreLocationSearch
* Refactor to setting place mode
Instead of logic based on the translated text of the place_guess string that is stored in ExploreContext, we are switching to an enum state that signifies which mode to show on explore:
1.) Nearby: Filters explore results based on the user's location. This also has a state without location permission that does not query the API.
2.) Place: Filtering by a specific place (as retrieved by /places API).
3.) Worldwide: Retrieve worldwide results, i.e. not having a place filter set.
4.) Map area: Filtering explore results precisely to the map rectangle shown on the explore map.
* Remove import from test
* Remove export
* Use blocked title only for blocked permission asks
* Move gallery permission container to Tab navigator as are the others
* Add gallery save title
* Split location permission explanation into two
* Update strings.ftl
* Only nav to location picker if permission was not granted
* Check permission on app being foregrounded
* The location permission part is handled by useLocationPermission
* Do not store permission result in hook
* Use hasPermission from permissions hook
* Update fetchUserLocation.e2e-mock
* Move hook one higher
* Show user location if permission is given
* PermissionGate callbacks should use useCallback
* Add permission hook to map usage
* Fix test
* Update layout to be asserted
* Add location permission hook to Explore
* Remove console.log
* Few TS fixes
* Indentation
* Remove superficial check
* Update Podfile.lock
* Restore photo deletion
* Rename methods for accessing media files
* Added integration test for photo deletion
* Cleaned up some accessibility labels
Closes#1429
* Disagreeing IDs and Potential disagreement bottomsheet
* Change back to js
* Styling for withdrawn disagree text, string adjustments
* Agree taxon and disagree taxon share same state var, Reuse existing RadioButtonSheet for potential disagree, UI changes, styling for scientific name
* Remove duplicate
* Fix suggest id sheet not showing from teaxon details
* (Re-)Fix bug where shared photo got deleted before it could be used
* Only run cleanup when MyObs has focus
* Only run cleanup once a minute
* Only delete files that are a day old or more
* Update radio bottom sheet element margins and paddings
* Update radio button row element margins and paddings
* Revert "Update radio button row element margins and paddings"
This reverts commit 269882b93c.
* Label margin
* Explainer
* Add four pixel between radio button and text
* Actually, let's patch the radio button to not have intrinsic margin, that makes everything easy peasy
* Create react-native-paper+5.12.3.patch
* Add margin between label and description
* RadioButtonRow TS
* Icon is optional
* Update RadioButtonSheet.js
* RadioButtonSheet TS
* Radio labels in ExploreFilters should be smaller
* BottomSheetStandardBackdrop TS
* Move key
* Update Settings radio button containers
* Update containers of radio filters
* Modal TS
* Update types
* Update types
* Update interface
* Update types
* Update types
* Show all obs photos in StandardCamera preview
* Clear camera Zustand state after saving photos as ObservationPhotos
* Load Photo URIs into Zustand state when entering the camera
* Rename rotatedOriginalCameraPhotos to cameraUris to match galleryUri and to
save us all a few keystrokes
* Disable confirm button on StandardCamera until photos processed
* PhotoPreview prop names should make sense internally, or at least don't need to match external context
Closes#1690
* Readability / cleanup updates for DQA
* Moved from unnecessary use of useMutation to useQuery for fetching metrics
* Log API errors
* Avoid warnings in tests about updates outside of act
* Update header in DQA after vote changes quality grade
Closes#1504
* Close ExploreTaxonSearchModal before navigating to TaxonDetails
* Replace showInfoButton w/ hideInfoButton in TaxonResult
* Hide TaxonResult info btn in TaxonSearch from Explore filters
Closes#1705