Commit Graph

1832 Commits

Author SHA1 Message Date
budowski
836438cd1e MOB-752 - use FasterImageView for caching obs/taxon/project images (#2887) 2025-06-26 11:10:01 -07:00
Ken-ichi
1a032de3ef New Crowdin translations by GitHub Action (#2979)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-06-26 10:27:56 -07:00
Ken-ichi
cb25ff7aa6 New Crowdin translations by GitHub Action (#2978)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-06-25 10:01:25 +02:00
Amanda Bullington
f8bce67501 Creative day: drawer and tab navigator dark mode (#2945)
* Add dark mode to tab and drawer navigation

* Remove log

* Add color for darkModeGray and make dark mode debug only
2025-06-25 10:00:01 +02:00
Johannes Klein
08c0427731 Add period to copy (#2975) 2025-06-25 07:59:09 +02:00
Angie
6e1fff46c2 Dismissable banner that opens login/signup (#2951)
* Dismissable banner that opens login/signup

* Presist state, dynamic width

* Add LoginBanner in place of Dismissable banner, use typescript and rename shownOnce in createLayoutSlice

* LoginBanner typescript file

* Rename shownOnce to more descriptive onboardingShownOnce

* Revert shownOnce name change
2025-06-24 13:06:47 -07:00
Amanda Bullington
5f8a6c4382 Fix: sharing into app with multiple photos (#2958)
* Fix: reset PhotoSharing when new items are shared; reset GroupPhotos nav

* Fix tests

* Add env file back
2025-06-24 13:02:45 -07:00
Ken-ichi
d3ab8912df New Crowdin translations by GitHub Action (#2964)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-06-24 12:12:57 -07:00
Amanda Bullington
9c5cd83eae Fix: correct navigation from TaxonSearch while suggesting an ID (#2961)
* Navigate user back to ObsDetails from SuggestID -> Suggestions -> TaxonSearch

* Guard agains accessing taxon while observation is undefined

* Do not return early, instead check on each access of observation

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-06-24 12:11:53 -07:00
Amanda Bullington
1569d0b16e Format additional types of dates to not crash projects (#2962) 2025-06-24 12:11:07 -07:00
Angie
a63d019857 Check for current user before refetch notifications (#2977) 2025-06-24 00:07:13 -07:00
Johannes Klein
e3d9edc433 Show a tooltip to find the obs wheel with all observation options (#2927)
* Add react-native-walkthrough-tooltip dependency

* WIP: Basic tooltip (always shown)

* Adjust arrow size

* Adjust background color

* Adjust tooltip shadow

* Adjust hight and vertical spacing

* Adjust border radius

* Adjust padding horizontal

* Only allow long press if tooltip is visible

* Move Tooltip into AddObsButton

* Show tooltip only once

Dismiss on long press of AddObsButton only

* Only show the tooltip if the user has only AI camera as an option

* Only show the tooltip on MyObservations screen

* Only show the tooltip on MyObservations screen for real

* Show tooltip after user making their second observation

* Code style

* Fix typo in comment

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Prevent navigation when modal is opened

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove return

* Update CustomTabBar.test.js.snap

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-20 12:28:31 +02:00
budowski
7ce12fb66c Mob 706 hide toggle location when no photo location (#2963)
* MOB-706 - don't show use/ignore location button if obs/evidence is missing location

* Fixed tests
2025-06-18 14:01:59 +02:00
budowski
872204a5fb MOB-823 - explore filters - iconic taxa selection bug (#2966) 2025-06-18 14:01:38 +02:00
Johannes Klein
15d634340b Migrate ExploreLocationSearch to TS (#2959) 2025-06-14 17:30:46 +02:00
Johannes Klein
3faf5e3e29 Update to react-native 0.75 (#2950)
* Update to RN 0.75.5 with upgrade helper diff

* Update .flowconfig

* Update package-lock.json

* Update Gemfile.lock

* Update Podfile.lock

* Update project.pbxproj

* Use double quotes

* Update to RN 0.75.5 with upgrade helper diff

* Update .flowconfig

* Update package-lock.json

* Update Gemfile.lock

* Update Podfile.lock

* Update project.pbxproj

* Use double quotes

* Update Podfile.lock

* Update CustomTabBar.js

* Revert "Update CustomTabBar.js"

This reverts commit 2eb085e3bb.

* Update NavBar. Remove percentage based width as it broke the UI

Now we rely solely on flexbox spacing of justify-around.

* Update FloatingActionButton percentage values

* Update CustomTabBar.test.js.snap
2025-06-12 21:18:28 +02:00
Ken-ichi
9a80a6351e New Crowdin translations by GitHub Action (#2946)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-06-12 10:44:52 -07:00
Amanda Bullington
3c4ec368f5 Fix: isLoggedIn memory leak (#2952)
* Fix memory leak from isLoggedIn

* Fix tests with mocking for clearAuthCache

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-06-11 10:04:54 -07:00
Amanda Bullington
a049d5022d Remove default props for RN upgrades (#2953) 2025-06-11 09:53:11 -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
Amanda Bullington
80eec44068 Fix for sharing into the app -- specify navigator (#2947) 2025-06-10 09:49:00 -07:00
Johannes Klein
2e3db6cd54 Migrate FloatingActionBar to TS (#2944)
* Rename file without changes

* Migrate to TS
2025-06-07 20:47:40 +02:00
Johannes Klein
985cf2aeaf Migrate navigationOptions to TS (#2943)
* Rename file

* Type config objects as const

* Change to interface

* Update imports
2025-06-07 20:41:34 +02:00
Amanda Bullington
e81f0ea9a4 Fix: navigate bottom tabs to the correct root screen (#2938)
* Be specific about the first screen in each root tab navigator

* Correct version of cocoapods

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-06-06 10:19:45 -07:00
Ken-ichi
a89f8e7225 New Crowdin translations by GitHub Action (#2942)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-06-06 10:09:47 -07:00
Ken-ichi
0980106106 New Crowdin translations by GitHub Action (#2934)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-06-05 10:29:50 -07:00
Amanda Bullington
f651d912a0 Performance: data transformation in MyObservations (#2922)
* Show average scroll time

* Track fetching and scrolling performance, MyObs

* Limit default mode fields

* Update fields

* Make sure pagination and loading wheel work

* Limit the API requests we're making to what advanced users need

* Tweaks to add fetching metrics

* Remove one more field and console log

* Minimize unnecessary changes

* Keep debug mode scheme

* Use mapping and more succinct filtering and sorting on obs list/grid

* Mapping for comments and ids

* Fixes for ids, comments, and belongs to user

* Make sure data is updated at end of list

* Make sure to update refs

* Make sure list updates when switching into advanced mode

* Remove log

* Fix test and crash

* Improve performance of mapping to improve fetching (load data onscreen) times

* Fix merge conflicts
2025-06-05 10:29:23 -07: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
Amanda Bullington
3dab6305ae Performance: speed up API calls in MyObs by limiting fields (#2919)
* Show average scroll time

* Track fetching and scrolling performance, MyObs

* Limit default mode fields

* Update fields

* Make sure pagination and loading wheel work

* Limit the API requests we're making to what advanced users need

* Tweaks to add fetching metrics

* Remove one more field and console log

* Minimize unnecessary changes

* Keep debug mode scheme

* Fixes for ids, comments, and belongs to user

* Fix: Fetch data on infinite scroll using last observation id (#2930)

* Fetch using last observation ID when user reaches bottom of list

* Don't change momentum scroll which fetches updates to existing data
2025-06-04 10:11:28 -07:00
budowski
0f79ce184f Fix MOB-802 and MOB-750 - Camera - remember new photo URIs even when moving in and out to another screen (#2935) 2025-06-04 10:10:09 -07:00
Ken-ichi
0504cc1bf7 New Crowdin translations by GitHub Action (#2931)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-06-02 11:04:24 -07:00
Amanda Bullington
502393a5d1 Dev experience: linting for TypeScript (#2933)
* Change TS warning about unused variables to error & support _unused in catch blocks

* Use TS recommended object instead of Object

* Set Function issues to warnings in TS files for later fixing
2025-06-02 09:47:29 -07:00
Amanda Bullington
bb31c1907b Update react navigation libraries for performance (#2903)
* Update navigators and create util for tabstack navigation

* Changes for react navigation 7

* Refactor to use navigateToTabStack throughout app

* Add comment about unmountOnBlur

* Get all unit tests passing; remove navutils & mock HeaderBackButton

* Fix animation issues in tests

* Temporarily remove parts of tests with back functionality

* Fix tests

* Delete ios/iNaturalistReactNative.xcodeproj/project.pbxproj

* Fix pbxproj

* Code cleanup; minimize unnecessary changes

* Fix tests

* Downgrade react-native-screens to v4.4.0 (#2918)

react-native-screens version 4.5.0 increases the react native version that it supports to 0.74.0+ (https://github.com/software-mansion/react-native-screens/pull/2613/files). So, by using 4.4.0 we are still able to build the app on Android as we are still on 0.73 for now (have tested and it works).
Have not seen any effect on the changes related to the latest react-navigation versions.

* Make requested changes

* Speed up Explore nearby tile loading (#2912)

* Create a performance tracker to show urltile load time in debug mode

* Set default radius to 1km, not 50km

* Code cleanup & TypeScript definitions

* Fix TypeError

* Address eslint error

* Make github actions happy

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>

* New Crowdin translations by GitHub Action (#2920)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* MOB-690 - Add error context to 401 errors (#2921)

* MOB-690 - Add error context to 401 errors

* Add Object.defineProperty like in the other error classes

* Add logger line

* Also throw 401 error if the error object has no response property

---------

Co-authored-by: Yaron Budowski <budowski@gmail.com>

* v1.0.4+164

* Rebase with latest version of RN screens. Remove unused code and packages, add eslint package for TS, suppress TS errors (#2924)

* New Crowdin translations by GitHub Action (#2926)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* New Crowdin translations by GitHub Action (#2929)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* Use 3 separate initial routes for tabs; hide animations on drawer screens

* Fix test

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
Co-authored-by: Ken-ichi <kenichi.ueda@gmail.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Yaron Budowski <budowski@gmail.com>
2025-05-30 09:26:47 -07:00
Amanda Bullington
7f42509797 Add logging to uploads & validate jwts at each upload step (#2923)
* Revalidate jwt token before uploading observation and before attaching media

* Add logging to uploads and jwts

* Make logs more useful, add context and appstate

* Fix inat uploading mocks in tests

* Fix uploader test to reflect errors being thrown
2025-05-29 16:42:34 -07:00
Ken-ichi
f1c656554e New Crowdin translations by GitHub Action (#2929)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-05-29 11:44:32 -07:00
Ken-ichi
ec9e71a627 New Crowdin translations by GitHub Action (#2926)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-05-28 17:01:40 -07:00
Amanda Bullington
95151e065b Remove unused code and packages, add eslint package for TS, suppress TS errors (#2924) 2025-05-28 17:01:10 -07:00
Johannes Klein
d36dd52914 MOB-690 - Add error context to 401 errors (#2921)
* MOB-690 - Add error context to 401 errors

* Add Object.defineProperty like in the other error classes

* Add logger line

* Also throw 401 error if the error object has no response property

---------

Co-authored-by: Yaron Budowski <budowski@gmail.com>
2025-05-23 19:10:14 +02:00
Ken-ichi
7c585ea60f New Crowdin translations by GitHub Action (#2920)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-05-22 17:33:09 -07:00
Amanda Bullington
f5239881dd Speed up Explore nearby tile loading (#2912)
* Create a performance tracker to show urltile load time in debug mode

* Set default radius to 1km, not 50km

* Code cleanup & TypeScript definitions

* Fix TypeError

* Address eslint error

* Make github actions happy

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-05-21 14:40:54 -07:00
Angie
c84fb17591 check for last screen while navigation back from suggestions (#2906) 2025-05-19 11:25:41 -07:00
budowski
f12c03bce3 MOB-692 - suggestions result crash fix (#2908) 2025-05-19 11:20:43 -07:00
budowski
d824fe55ff MOB-677 - clean up locale name when loading i18next module (#2909) 2025-05-19 11:08:42 -07:00
budowski
5b026288fa MOB-772 - reset password field - change label (#2910) 2025-05-19 10:40:46 -07:00
Amanda Bullington
47bbcbd18f Maintenance: break upload code into smaller modules -- API calls (#2900)
* Split apart observation & media uploaders & add unit tests

* Use typescript

* Return only media items needed

* Fix tests related to uploading vs. uploaded status

* Remove undefined from union for observationUUID

Above and below in the callstack of those functions the type is only string, so that change seems to be fine for me to make directly on your PR.

* Extract an Operation interface (#2904)

* Type updates

* Update mapped param types

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-05-16 15:19:34 -07:00
Johannes Klein
f82eb56496 Use TS in two .tsx files that used flow types (#2905) 2025-05-16 22:42:47 +02:00
Ken-ichi
256cb8fad8 New Crowdin translations by GitHub Action (#2898)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-05-16 11:45:57 -07:00
Angie
40da621f9b AI camera shutter button not tappable after first press (#2848)
* prevent multiple taps on ai camera button

* remove console log

* Add PressableWithDebounce component

* Add accessibilityState

* Change podfile lock to use same cocoapods as gemfile

* remove useeffect

* Change file extension

* Indentation

* Update type

* Extend PropsWithChildren

* Import type

* Add function param type

* use useFocusEffect instead of PressableWithDebounce in TakePhoto

* adding blur listener instead of using PressableWithDebounce

* Remove unused props

* Adapt to existing code style

* Move blur effect to CameraContainer (#2899)

* Move blur effect to CameraContainer

We can reuse the already existing `takingPhoto` state to disable the camera UI until the user navigates away.

* Also disable photo library on tablets

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-05-16 10:04:04 -07:00
Johannes Klein
a20a22bad8 Hide "id with ai button" for no media or sound only (#2896)
* Add Boolean to control button being shown

Same Button component, only with changed indentation

* Apply margin between buttons to hide button instead

* Move left margin to container

Because ID button is now optional but container is not.

* Increase margin between buttons

Not part of the ticket, but it was not according to designs.

* Use existing state for the button

* Update integration test

* Update duplicate testID

* Add unit test for showing button behaviour based on photos
2025-05-16 15:30:06 +02:00
Johannes Klein
ed3f0e982c Migrate SuggestionsResult to TypeScript (#2901)
* Rename file

* Use PressableProps interface for PressableWithTracking

* Remove TODO

* Update handleLayout types

* Update allowed prop type

If SuggestionsResult can have ApiTaxon | RealmTaxon, we have to enable it in DisplayTaxonName as well, and rank_level can be undefined according to this union.

* Allow null

accessibleTaxonName uses currentUser directly from useCurrentUser which can be null.

* Use as to declare which type is used

* Source might be null
2025-05-16 14:57:25 +02:00