* Set default explore view to observations
* Rearrange ObservationsViewBar buttons to always show grid first and map first in Explore
* Set initialRegion of Explore map to same zoom level as location picker, using delta
* Consolidate map code into MapView with ref forwarding to allow animation & initialRegion set
* Stop controlling the map region from zustand, since we're using initialRegion
* Make sure we're not double animating when navigating to a new place
* Use ref to only get map boundaries exactly when they're needed, instead of tracking in state
* Make sure current location button does the same as NEARBY button
* Update Explore integration tests to reflect observations view as first view
* Fix navigation Explore tests to reflect landing on observations view
* Update MapView unit tests
* Check location permissions in MapView on current location button
* Code cleanup
* Fix tests and add test for location permissions
* To Mob 720: add some types and null guards (#2878)
* Update Map with Region type
* Type initialRegion
* Guard against null
* Guard against undefined coordinates
* Center loading indicator but not fill space (#2880)
Move the loading indicator to the center of the parent (and back left and top for half its size).
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* 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
* 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