34 Commits

Author SHA1 Message Date
Johannes Klein
f0e6cfad30 Update react-native-vision-camera to 4.7.3 (#3293) 2025-12-17 16:25:10 +01:00
Johannes Klein
a6d86666cc Update realm to 20.2.0 (#3164)
* Update package.json

* Update Podfile.lock

* Update package-lock.json

* Remove realm patch for 16kb page support

This has now landed in realm itself
2025-10-31 15:12:06 +01:00
Johannes Klein
e83caee75c Build Pods as static frameworks (#3115)
* Update Podfile

* Delete react-native-share-menu+6.0.0.patch

* Update project.pbxproj

* Update Podfile.lock

* Update project.pbxproj

* Update Podfile

* Update Podfile.lock
2025-09-29 15:00:48 -06:00
Johannes Klein
3c04df39a3 Enable New Architecture (#3111)
* Update gradle.properties

* Update Podfile

* Update react-native-mmkv

* Update Podfile.lock

* Delete useObservationsUpdatesWhenFocused.test.js

* Update closeOnboarding.js

* Fix failing button tap in e2e tests

* Create react-native-sensitive-info+6.0.0-alpha.9.patch

* Update bottom-sheets

* Refactor e2e timeout to file-wide const

* Remove check that fails

* Check for entire list item instead of comments count

* Longer delay to wait for observation deletion to make UI disappear
2025-09-27 08:28:13 -06:00
Johannes Klein
a3aaa66ed5 Update react-native-share-menu to build with use_frameworks static (#3109)
* Update react-native-share-menu

* Update Podfile.lock

* Create react-native-share-menu+6.0.0.patch

This is required as long as we are not setting use_frameworks to static

* Breaking change: Android react-native-share-menu now also has same Share structure as iOS

* Remove Android specific test structure

Because Android and iOS now have the same return type from our fork of react-native-share-menu
2025-09-21 18:23:20 -06:00
Johannes Klein
afd8a8b883 Update react-native-vision-camera (#3096)
* Update package.json

* Update package-lock.json

* Update Podfile.lock

* Reapply vision-camera patch
2025-09-07 16:48:26 +02:00
Johannes Klein
267e4ebc1f Create react-native-mmkv+2.12.2.patch (#3056) 2025-08-11 17:33:23 +02:00
Johannes Klein
a899e0eea9 Create realm+20.1.0.patch (#3055) 2025-08-11 14:18:27 +02:00
Johannes Klein
6e696cb524 Update to react-native 0.77 (#3026)
* Upgrade helper changes JS side

* Upgrade helper Android

* Upgrade helper iOS side

* Update project.pbxproj

* Create react-native-modal+14.0.0-rc.1.patch

* BackHandler.removeEventListener is deprecated

* Update react-native-modal

* Update .flowconfig

* Update package-lock.json

* Update Podfile.lock

* Update Podfile.lock from main

* Replace toBeVisible with toBeOnTheScreen

This is not recommended by react-navigation, because even though toBeOnTheScreen makes sure the components are in the tree it does not mean they are visible to the user. For example, in terms of navigation a previous screen is still i the tree but not visible to the user in the app.
I spent around a day trying to figure out why the isVisible check stopped working, and still have no clear answer.
Testing in the actual app shows that all of those flows are still working as expected, so it is a test-environment-only problem.
My suggestion would be to re-visit this problem after we have updated RN to latest, and testing related libraries to latest versions.
2025-08-01 12:11:13 +02:00
Johannes Klein
1f0300db57 Update react native to 0.76.9 (#2974)
* Changes according to the RN upgrade helper

* Update .flowconfig

* Update Gemfile.lock

* Fix typo in minimunSDK version specified

* Disable New Architecture

* Prefer double-quotes

* Update .flowconfig

* Update vision camera patch version number

* Update package-lock.json

* Update Podfile.lock

* Remove no longer needed mock
2025-06-27 14:13:23 -07:00
Johannes Klein
d034e15eea Update vision camera and plugin (#2949)
* Update package.json

* Update package-lock.json

* Update Podfile.lock

* Update vision camera patch (that removes branded metadate)

* Remove camera orientation prop and patch

* Remove frame processor orientation patch

No longer needed, and accepted by the vision-plugin

* Remove rotationLocalPhotoPatch as it is not used

* Do not rotate freshly taken photos anymore to save in a temporary folder

I have not yet removed the actual making of a copy of the photo into the temp folder. It is only no longer rotated.

* Remove unused deviceOrientation param

* Rename file

* Change function name as it no longer rotates

* Move image resize logic to the existing helper function

Instead of calling it a "patch"

* Move helper function to the only file it is imported into

* Latest camera library versions

* Revert "Latest camera library versions"

This reverts commit da6b2f7c28.

* Remove iPad camera orientation patch

* Update import

* Update Podfile.lock
2025-06-11 08:15:01 +02:00
Johannes Klein
38029bee8a Update to react-native 0.74 (3rd attempt) (#2937)
* Upgrade to RN0.74 with upgrade helper

* Bump minor version

* Remove yarn files

* RN 0.74.7

* Update .flowconfig

* Update Gemfile.lock

* Update project.pbxproj

* Update PrivacyInfo.xcprivacy

* Refactor uri into constant

* Only use filename for name

Because using the full uri does no longer work like this.

* Check for uri being null

* Update metro.config.js

* Rubocop autocorrect

* Update package-lock.json

* Update react-native-vision-camera+4.0.5.patch

* Update Podfile.lock
2025-06-04 23:02:20 +02:00
Ken-ichi
7e960d9010 feat: display time zones and times in time zones (#2636)
* fix: show observation datetime in the obs time zone

I.e. it doesn't offset the observation datetime into the viewer's time zone.

* test: adjust to literal times by default

* chore: update to date-fns 3.0

* wip: show time zone names with all times

* show time zone name whenever a time zone is passed to a formatting function
* store observation IANA time zone in Realm

Note that this required patching around a bug in Hermes in which it should be
returning a GMT offset for the short time zone but is instead just returning
GMT.

* fix: omit time zone for unuploaded obs

* feat: show relative time differences on ActivityItem headers

* fix: hide zone/offset on ObsEdit before upload when signed in

* fix: hide clock icon in activity item header in new default mode

Also

* stop using checkCamelAndSnakeCase when not necessary in DetailsTab.js
* make POJO types only refer to other POJO types
2025-01-31 23:22:55 +01:00
Johannes Klein
10ee29d4c0 Patch vision-camera to not include branding in exif (#2337) 2024-11-03 09:34:57 +01:00
Ken-ichi
f35c48ad23 fix: restore photo sharing into the app in iOS 18 (#2247)
* Switch to using a fork of react-native-share-menu since we have multiple
  divergences from the main repo and it seems to be abandoned
* Fork supports sharing in iOS 18
2024-10-16 15:06:47 -07:00
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
Johannes Klein
aa597c3bfc Update react-native-paper+5.12.3.patch (#2012) 2024-08-28 13:50:43 +02: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
3fd5b717c1 1746 radio bottom sheet (#1769)
* 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
2024-07-04 12:24:03 +02:00
Johannes Klein
7c91bdf950 Obsedit add photo with StandardCamera, two fixes (#1677)
* Reorder hooks dependencies

* Return uri from take photo hook

* Keep state of photos added in this instance of the camera

* List2 TS

* INatIconButton TS

* Refactor useBackPress to show discard modal only if photos taken during this instance of the camera

* Remove newPhotoCount var

* TS refactors

* fetchUserLocation TS

* Increase timeout

* Fix error

* Hoist deletePhotoByUri

* Delete photos on discard

* Reorder code

* Set saving photo on checkmark press

Closes #1556

* Update snapshots

* Remove delete test

* Create StandardCamera.test.js

* Check if image is there before deletion

* Update react-native-share-menu+6.0.0.patch

* Update e2e_ios.yml

* Update some types
2024-06-14 14:04:24 +02:00
Johannes Klein
05b6309307 Vision camera 4.0.1 (#1437)
* Update camera and plugin packages

* Remove one patch

* Replace deprecated function

* Update runAsync patch

Removing this patch leads to non-functioning frame processors in release builds. Contrary to what the original issue's solution states.
2024-04-23 14:27:27 +02:00
Johannes Klein
16d0b073c4 Update react-native-vision-camera+4.0.0-beta.13.patch 2024-04-16 12:44:10 +02:00
Johannes Klein
a124fafcb1 Rename patch file 2024-04-10 12:40:04 +02:00
Johannes Klein
e4700eeb5d Upgrade react-native-worklets-core
Removes the previous patch because our PR has landed in the package there as well.
2024-04-09 16:28:11 +02:00
Amanda Bullington
bc4d0bc661 Package upgrades (#1361)
* Upgrade more packages and include new localize mock

* Update patch for vision camera
2024-04-05 15:59:35 -07:00
Amanda Bullington
0e71fb5062 Patch draggable-flatlist with fix for reanimated 3 (#1346)
* Temporarily comment out Android in Fastfile build lane

* Fix: make draggable flatlist work with reanimated 3

* Add lib and commonjs library patch
2024-04-02 15:54:16 -07:00
Johannes Klein
486ba4f30f Upgrade React Native to 0.72 (#1337) 2024-03-29 17:52:37 +01:00
Johannes Klein
0e0a6560ac Vision camera v3 (#1121)
* Bump vision-camera

* Refactor patch

* Move patched orientation into patch functions file

* Update react-native-vision-camera+3.4.1.patch

* Switch to MacOS 13 runner

Vision camera requires XCode 15 to compile.

* Add step to specify XCode 15

* Higher level of logging

* Increase test timeout

* Add comment

* Remove navigation to obs without evidence for signed out user

* Patch for location permission not working on iOS

* Increase setup timeout

* Increase some more timeouts

* Revert back to less logging in CI

* Does it have to do with timeouts?

* Trace log level

* Update README.md

* Disable Homebrew’s auto update and install cleanup

* Setup ruby step

* Install pods only if not cached

* Revert "Install pods only if not cached"

This reverts commit 42a2ea02f9.

* Run simulator in headless mode, record all logs

* Increase timeouts again

* Revert "Remove navigation to obs without evidence for signed out user"

This reverts commit 2b4718f5ce.

* Add boolean to run use effect only once

* Did merge wrong code

* There is one more permission gate when entering obs edit now

* Add permission gate dismissal to signed out user test

* Add comment, rename state

* Lower action timeout

* Update react-native-vision-camera to 3.6, update Reanimated to v3 (#838)

* Bump camera and plugin

* Upgrade Reanimated and libs using it

* Update vision-camera mock

* Remove superfluous patch

* Fix type

* Add mocks for e2e tests because bottom sheet does not work on AOSP

* Update package-lock.json

* Update vision camera

* Bump vision camera

* Update vision camera patch version

* Remove superfluous patch

* Update vision camera

* Update vision-camera and plugin

* Use latest vision plugin = rebased v3

* Run npm clean-start

* No longer needed

* Duplicate prop

* Switch back to v3 code

* Upgrading Detox fixes issue with iOS tests failing

Because of previous lack of permissions.

* Update to latest detox version

* Npm i force

* Vision 3 e2e testing, (#1126)

* Remove jest detox config

* Revert e2e timeout increase

* Revert jest config timeout

* Use macos 14 runner which has XCode 15 per default

* Use latest bottom sheet

* Revert "Use latest bottom sheet"

This reverts commit c66cd09838.

* Adding comma back in

* Remove spaces

* Use latest vision-camera and plugin

* Use release version of vision-camera

* Remove force flag

* Update react-native-worklets-core

* Upgrade reanimated

* Update babel.config to allow nested worklets

* Run frame processor async

* Remove enableGpuBuffers flag

* Remove no longer needed comment

* Update comments about version

* Update vision-camera and plugin

* Code format

* Rename param

* Use latest-plugin

* Remove fps param from camera view

* Change confidenceThreshold to number

* API change for results structure

* Refactor fps to be checked inside hook

As of vision-camera 3.9.1 our camera feed is stuttering when calling the runAtTargetFps function inside the useFrameProcessor hook.
So, what I did here is to track the time and skip the frames that are received before the target fps is reached.

* Remove updates of non-camera related

* Update comment

* Code format

* Snapshot updates

* Revert changes to ios e2e

* Add a log for the average time it takes a frame to be processed

* Use release version of plugin

* Add a patch for runAsync to work in release builds

* Update react-native-worklets-core to 0.4.0

* Use latest plugin version

* Add a shift method to worklet arrays

* Use latest vision-plugin

This makes use of .shift() in worklet array and depends on the previous patch.

* Set result timestamp and show age of result in debug mode

* Fix an error with timestamp being undefined

* Remove log

* Use latest vision plugin

* Change result timestamp to pink

* Comment

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-03-27 00:47:43 +01:00
Ken-ichi
6af81365d8 Restore tap-to-focus by reverting to react-native-vision-camera v2 (#923) 2023-11-20 14:49:30 -08:00
Ken-ichi
dacd8788ec Permission gate layouts (#743)
Primarily adds designed layouts for permission gates (also referred to as permissions priming).

* moved permission gate business logic into a container
* use react-native-permissions exclusively
* Show PermissionGate as a modal
* Basic unit tests for PermissionGate
* Consistent content width on tablet, other minor style changes
* Allow PermissionGate to be used outside of nav hierarchy
* Use user location on Explore after getting permission
* Remove redundant 'always' location perm in ios
* Isolate current location button in the Map component, which uses location fetching functionality from react-native-maps instead of our own
* Updated cocoapods; matched INatIcon.ttf to sha1 hashes
2023-10-18 16:47:12 -07:00
Johannes Klein
f5aa254eb0 Patch to ignore native crash in camera library 2023-10-16 15:36:32 +02:00
Angie
1487e5f421 Accuracy circle and obscuration cell for obsdetail map (#744)
* Obscuration cell and accuracy circle on ObsDetail map
* DetailsMap view
* Copy and share location from DetailsMap
* Patched react-native-maps to address bug with showsUserLocation

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-10-09 12:41:22 -07:00
Ken-ichi Ueda
8d2a61d234 Removed extraneous stuff from react-native-share-menu patch 2023-05-17 16:59:08 -07:00
budowski
58de692298 364 sharing photos to inat (#568)
Allows user to share photos from gallery apps to our app as new observations via react-native-share-menu. Also added patch-package and patched react-native-share-menu for Android prod builds. Patch addresses https://github.com/meedan/react-native-share-menu/issues/216

Closes #364

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-05-17 13:24:38 -07:00