Commit Graph

227 Commits

Author SHA1 Message Date
Ken-ichi
f4c7ee3f86 fix: don't ask for PHOTO LIBRARY permission if user can't change their mind (#2020)
* stop asking for PHOTO LIBRARY permission before import, b/c it's not
  necessary for importing
* use a forked version of react-native-cameraroll that allows us to write
  location metadata to newly-created photos, which was the really important
  thing we were using the PHOTO LIBRARY permission for

Closes #1612
2024-08-30 09:55:45 -07:00
Amanda Bullington
348e520f20 Use presentationStyle over full screen for photo library; closes #2006 (#2017) 2024-08-29 10:47:00 -07:00
Angie
190c3f3453 Make obs count text not tappable (#2009) 2024-08-28 19:04:35 -07:00
Ken-ichi
0b5c01c284 Fix broken Explore pagination (#1998)
Explore was not loading subsequent pages
2024-08-23 14:24:14 -07:00
budowski
313d8501e3 Updated react-native-exif-reader package version (nil check on iOS) (#1997)
Fixes a bug in which ObsEdit would crash when saving an obs w/ a photo but w/o location and w/o location permission.
2024-08-23 10:20:07 -07:00
Amanda Bullington
3b9739e254 Set threshold for top offline suggestion & sort by ascending rank (#1972)
* Update pods

* Show high scoring taxon as offline top ID; closes #1963

* Leave comment about offline threshold

* Add human offline test
2024-08-14 14:39:02 -07:00
budowski
f0d0445d36 Update react-native-exif-reader version (#1967)
Close #1866
2024-08-13 12:21:05 -07:00
Amanda Bullington
9b0029cb87 Stop location fetch when navigating to location picker (#1903)
* Stop location fetch when nav to location picker; let useWatchPosition handle acc

* Update pods

* Close delete obs sheet after single deletion

* Fix for e2e test: restore isFocused check

* Revert code
2024-07-31 18:45:43 -07:00
Amanda Bullington
9a0581670f Consolidate key-value stores (#1879)
* Switch to zustand mmkv storage instead of async storage

* Update hooks using async storage

* Remove asyncstorage

* Remove LocalPreferences

* Prevent collision upserting from infinite scroll & sync remote obs
2024-07-30 09:12:26 -07:00
Ken-ichi
899076e67a Only ask for permission to add photos from cameras (#1869)
* Patch camera roll to not ask for readwrite after addonly granted
* Only request add permission from cameras
2024-07-29 11:51:14 -07:00
Johannes Klein
5684130532 1811 ai button home align (#1827)
* Update flash-list

* Remove superfluous classname

* Update workaround to center empty list component

* GradientButton TS
2024-07-17 13:34:37 +02:00
Johannes Klein
a52996f535 Changes to the way permissions are asked for (#1793)
* 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
2024-07-12 11:00:24 +02:00
Angie
b55db96db8 1723 agree button should not appear while signed out (#1792)
* Agree with id button does not show when logged out, test added

* updated pod

* Fix failing test
2024-07-11 12:38:10 -07:00
Amanda Bullington
ce39b03495 Changes to showing select taxon button & vision attribute; closes #1773 (#1790) 2024-07-10 13:18:27 -07:00
Angie
29c0f6beb7 1593 potential disagreement bottom sheet and disagreeing ids (#1749)
* 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
2024-07-08 22:39:15 -07:00
Johannes Klein
09f4abdf9b Revert "Vision camera update with orientation support (#1713)"
This reverts commit de36644fe8.
2024-06-29 16:01:46 +02:00
Ken-ichi
ae2f9eeddc Fix missing map tiles when taxon chosen on Explore (#1722)
* IconicTaxonChooser no longer takes a taxon or manages its own state
* Setting iconic taxon filter to Unknown is now its own action
* Unsetting a taxon can be done with the CHOOSE_TAXON action by setting taxon
  to null or undefined
* Omitted some extraneous params from tile requests
2024-06-28 10:13:51 -07:00
Ken-ichi Ueda
b2ccf011c6 Prevent extra navigation after discarding changes from StandardCamera 2024-06-27 16:04:48 -07:00
Angie
4df29cdf33 1687 tapping uploading observations should not increase the upload of observations count (#1716)
* tapping uploaded obs doesnt increase upload count

* remove comment
2024-06-26 16:54:21 -07:00
Johannes Klein
06589dd89e Revert "Upgrade to RN0.74.0 (#1471)"
This reverts commit 1b705b4495.
2024-06-26 16:29:40 +02:00
Johannes Klein
1b705b4495 Upgrade to RN0.74.0 (#1471)
* Upgrade to RN0.74 with upgrade helper

* Bump minor version

* Update lock files

* Update PrivacyInfo.xcprivacy

* Upgrade react-native-safe-area-context

* Update project.pbxproj

* Create react-native-vision-camera+4.0.3.patch

* Update react-native-vector-icons

* Update Podfile.lock

* Fix crash on LoginForm

* Minor version bump

* Delete react-native-vision-camera+4.0.3.patch

* Update metro.config.js

* Update Podfile.lock
2024-06-26 16:17:39 +02:00
Johannes Klein
de36644fe8 Vision camera update with orientation support (#1713)
* Update vision camera

* Remove no longer needed VeryBadIpadRotator

* Remove orientation prop

* Update vision plugin

* Remove frame processor patch

* Remove unused import

* Update rotation patch

* Remove unused param
2024-06-26 12:01:10 +02:00
Johannes Klein
ef6163df11 Upgrade CV model to 2.13 (#1694)
* Update vision plugin

* Upgrade tensorflow

* Update Podfile.lock
2024-06-19 10:23:23 +02:00
Ken-ichi
091abfb952 Save photos to gallery in sequence to avoid duplicate albums (#1676)
Closes #1658
2024-06-13 16:56:08 -07:00
Johannes Klein
f893a8383f Upgrade Vision Camera plugin (#1672)
* Upgrade Vision Camera plugin

* Update vision camera dependencies
2024-06-11 16:15:39 +02:00
Angie
c08de004be Taxon detail map UI fixes (#1660) 2024-06-10 16:40:30 -07:00
Ken-ichi
bbc6a4a6ca Don't put error in Alert; globalize error message (#1656) 2024-06-06 12:22:38 -07:00
Amanda Bullington
29ef611e03 Refresh unuploaded observation count (#1653)
* Refresh pending upload count when realm tracks changes; closes #1631

* Reset number unuploaded after Toolbar timeout
2024-06-05 15:53:03 -07:00
Ken-ichi
8dbbca04d9 Fail upload when network request failed (#1651)
* Fixed cancel upload button
* Uploads will timeout after 15s
* Moved MyObs tests unrelated to unsynced into the synced block
2024-06-04 18:23:59 -07:00
Amanda Bullington
9c6093e987 Remove tab bar when sharing photos into app; closes #1645 (#1646) 2024-06-04 12:29:11 -07:00
Angie
8b892ba8f9 Add back taxondetail photo gradient (#1644) 2024-06-03 19:43:32 -07:00
Amanda Bullington
36240dafa2 Fix reposition evidence through drag and drop (#1632) 2024-06-03 14:10:47 -07:00
Angie Ta
c5f96e7a54 v0.32.6 2024-05-31 11:43:47 -07:00
Angie
9f6e258ba7 1566 error when adding id after sharing photo into the app (#1625)
* sharing photos and tapping add an id no longer crashes

* change var name
2024-05-31 10:39:32 -07:00
Amanda Bullington
7e228e8223 Fully delete observation photos from media viewer (#1624)
* Refactor upload code into hook and zustand slice

* Create a single source of truth for toolbar and individual progress

* Fix unit tests

* Fix more tests

* Continue trying to simplify upload progress and status code

* Continued overhaul of upload code

* Fix exclamation point in Toolbar

* Fix total toolbar progress

* Fix tests

* Update snapshots

* Code cleanup

* Update MyObs test

* Fix most tests by not deleting realm

* Keep attempting to make toolbar text clear in subsequent tests

* Delete photos from observation; allow upload once photos deleted; closes #1575

* Only pass photo uri into evidence list; fix test

* Fix merge
2024-05-30 22:05:07 -07:00
Ken-ichi Ueda
c795e25488 Restricted KeyboardDismissibleView to LocationPicker to preserve scrolling on other screens 2024-05-24 20:48:16 -07:00
Angie Ta
d2ce36423c v 0.32.4 2024-05-24 11:32:40 -07:00
Ken-ichi
e31858ebbe Ensure Group Photos sticky toolbar appears above floating action bar (#1600) 2024-05-22 13:31:31 -07:00
Amanda Bullington
799d83f286 Hide keyboard in location picker on tap (#1597)
* Add keyboard dismissable component to ViewWrapper; closes #1567

* Show region in Location Picker when current location tapped

* Fix tests with accessibility label

* Update strings
2024-05-21 17:02:49 -07:00
Angie
7388f5a076 Obsdetails to taxondetails to explore to obs details and back goes back to explore. (#1596) 2024-05-21 15:56:16 -07:00
budowski
fac15eb1e6 Use latest react-native-exif-reader package version; use writeLocation instead of writeExif (#1268)
* Use latest react-native-exif-reader package version; use writeLocation instead of writeExif
* Use react-native-exif-reader v0.4.0
2024-05-21 13:58:42 -07:00
budowski
f72b4422e2 Change iNat Beta to iNat Next (#1590)
* Close #1460 - change iNat Beta to iNat Next

* One more name change

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-05-20 20:49:01 -07:00
Amanda Bullington
f5ebc2f4f5 Skip remote taxon fetches when user is offline; closes #1539 (#1583) 2024-05-20 15:31:00 -07:00
Angie
8c40d23570 1065 explore filters full screen experience should be a modal (#1562)
* Make Modal for ExploreFilters

* Show bottomsheets in modal

* TaxonSearch now a modal in explore fliters

* taxon search modal now clickable from explore page header

* more explore search modals. WIP nearby and worldwide buttons

* Adding explore user, location and project search modal files

* Nearby and worldwide buttons explore location modal

* Fix undefined place in useMapLocation

* Fix undefined place
2024-05-20 10:24:43 -07:00
Ken-ichi Ueda
9e4e652070 Bugfix: useClearSyncedPhotosForUpload should keep all unsynced obs photos
I.e. not just the first for an observation.
2024-05-15 17:13:32 -07:00
Amanda Bullington
3cc5359c8c Limit nav access on TaxonDetails from AICamera, Suggestions, TaxonSearch; closes #1549 (#1551) 2024-05-14 21:24:25 -07:00
Ken-ichi
08c04ad1ab Improved error reporting for logstash (#1529)
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
2024-05-13 18:28:56 -07:00
Amanda Bullington
36806b1bec Clear uploaded sounds to reduce app document size (#1530)
* Clear uploaded sounds to reduce app document size

* Code cleanup
2024-05-13 11:23:54 -07:00
Ken-ichi Ueda
c15b024ba4 v0.32.2 2024-05-10 13:53:22 -07:00
Amanda Bullington
e7c4fdbe5e Store original rotated photos temporarily during Camera -> ObsEdit flow (#1522)
* Check for CV directory

* Save original, rotated photos for processing; clear directory when user lands on MyObs

* Reset evidenceToAdd when user lands on StandardCamera

* Disable photo taking while loading so one photo doesn't overwrite another
2024-05-09 22:24:45 -07:00