* Upgrade helper: package.json
* Upgrade helper: gems
* Upgrade helper: Android
* Update AppDelegate
* Fix error in compiling
* Update package-lock.json
* Update Podfile.lock
* Update package-lock.json
* Update Podfile.lock
* Remove no longer needed mock
* Comment out entire test and not only the expect call
* Most other unit tests use this render helper function that
wraps the component in the entire app.
* Mock react-native exports as esModule
* Update .flowconfig
* Update Gemfile
* Revert "Comment out entire test and not only the expect call"
This reverts commit 8785f81529.
* Don't require TS extensions in imports
* Resolve all import extension errors
* Remove file extension from import paths used in mocks
* Remove .d of type definition file paths
* Remove .d of type definition file and import as type
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* Update package.json
* Update package-lock.json
* Enable plugin
* Update package.json
* Update package-lock.json
* Update .eslintrc.js
* Create a new object instead of mutating the existing one
* Update SoundRecorder.js
* Do not mutate prop directly
* Do not mutate store value directly
* Disable compiler for zoom hook
Because it uses reanimated logic, and previous work laid out we should specifically disregard a rule of react here, unsure what to do here for now.
* Move array for tracking results into component
* Disable compiler for StandardCamera
* Do not mutate store value directly
* Disable compiler for FullPageWebView
* Do not mutate route param
* Remove unnecessary check if state is true before setting it to false
* Fix: user might be undefined
* Update reanimated usage with new compiler compliant API
* Fix: taxon might be undefined
* Fix: taxon might be undefined
* Fix: common pitfall of trying to render text outside of Text component
* Update interface
* Add package override
* Update package-lock.json
* Refactor updating of user preferences into User model
* Remove no memo directive from zoom
* Update file imports
* Migrate safeRealmWrite to TS
* Update interface and import path
* Update interface
* Refactor useLocaalObservation hook to not mutate return value of a function that should not be mutated
* Update tests to new return structure
* Remove useSafeRoute hook
We get the same information from error contexts and surrounding documents, and this hook was violating the rules of react by conditionally calling another hook.
* Use optional chaining
* Update TaxonNamesSetting.test.js
* Fix: use optional chaining
* Extend on RNTLs renderHook instead of re-implementing
* Remove unnecessary mock
* Remove unnecessary mock
* Remove unecessary mock
* Remove trailing spaces
* Repair integration test
* Repair Explore.test.js
* Move no longer broken test
* Mock the fadeInView that does screen transitions in tests
* Mock another fade in view
* Update package.json
* Update package-lock.json
* Update
* Update to v13
* Update package-lock.json
* Breaking change: remove extend-expect
* Latest version
* Update package-lock.json
* Breaking change: Removed Accessibility matcher
* Update Suggestions.test.js
* Update DisplayTaxonName.test.js
* Testing the same but differently phrased
* Not really needed to test this
And since not.toHaveTextContent stopped working I just remove it.
* Update useTaxonSearch.test.js
* Move broken tests into folders that are not run
* Only move single tests that are failing
* This does work after all
* Remove only single tests that are broken
* Only move failed tests
* Only move failed tests
* Only move failed tests
* Does not pass on CI only
* 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.
* Update tooltip trigger logic in AddObsButton for logged in
Refines the tooltip display conditions for AddObsButton. Now shows the tooltip for logged-out users after their second observation, and for logged-in users with 50 or fewer observations upon landing on the My Observations screen. Adds comments for future handling of users with more than 50 observations.
* Refactor the state justFinishedSignup into the layout store slice
* Refactor trigger logic and add conditions for when the tooltip would overlap with pivot cards
* Move files
* Basic AddObsButton unit test
* Add mock for addListener
* Basic test for tooltip
* Add tests for two conditions that require a card dismissal
* Wrap setState in act in helper function
* 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>
* 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
* 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>
* 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
* 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>
* Open more options on long press
* Add tests for long press
* Rearranging Settings screen with new layout
* Add toggle for advanced settings in layout slice; fix default mode toggle
* Update settings with navigation flows
* Fix tests
* Change power mode switch for e2e test
* Fix settings test for green button toggle
* Fix advanced user toggle in e2e test (which hides pivot cards)
* Changes based on design convo; test fixes
* Fix e2e tests
* Follow user flow chart and update nav accordingly
* Rename function
* Fix test
* Can be null so check for false only
* Little less spacing between radio button rows
* Minor UI updates
* Remove check for previous setting in UI
* This is no longer used anywhere
* Update AICamera.test.js
* Update AICamera.test.js
* Update AICamera.test.js
* Update Suggestions.test.js
* Update Settings.test.js
* Update LanguageSettings.test.js
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* Update TypeScript
* Fix some tests with new default MyObservationsSimple
* Show upload toolbar on MyObs advanced
* Update tests for simple mode
* Fix deletions popping back up on MyObs
* Fix e2e test, which also means fixing our deletion process
* Fix useSyncObservations test
* Requested changes to better fit latest designs
* Add tests to check for hidden upload banner
* Build UI for loading state between AI->Match
* Make designs for AI loading screen match Figma
* Selective changes from bf872e2d4f
* Selective changes from 9ed81f99c7
* Selective changes from 4bc7c3474f
* Selective changes from 4916cf70fb
* Replace loading state from store with props
* Add some types
* Make component agnostic of what skipping does
* Remove debug info
* Add more debug data
* Elongate loading state if online errors out and offline is still loading in sequence
* Remove underline
This classname had no effect as far as I can tell.
* Hide skip button when it has no function
* Remove a comment that slipped through partial cherry-picking
* Split apart online and offline fetch status
Weird but even though they start in sequence it happened to me that online error was received after offline was fetched successfully. So, Let's split apart online and offline loading state.
---------
Co-authored-by: Amanda Bullington <albullington@gmail.com>
* Show simple my obs header only for logged-in users
* ActivityCount TS
* CommentsCount TS
* IdentificationsCount TS
* ObsStatus TS initial pass not looking at errors
* QualityGradeStatus TS
* Update RealmObservation interface
* Update RealmObservation interface
* ObsUploadStatus TS, plain copy, no errors yet
* Update types
* Update type
* IconicTaxonIcon TS
* ObsImage TS
* PhotoCount TS
* ObsImagePreview TS
* Image is only opaque when logged in
* DateDisplay TS
* Remove debug flag from UploadObsStatus
* Update type
* Prop to hide ObsUploadStatus
* Test observations need those otherwise they appear as needing edit
* Update imports
* Update vc plugin
* Update tests with breaking change: combined_score now 0-100
* Frame processor predictions are in range of 0-100 with new key
* Remove offline convert score to confidence
* Update calculateConfidence.js
* Common ancestor should use combine_score
* Offline suggestions have combined_scores now instead of scores
* Change filtering to range 0-100
* Only use combined_score for Match screen
* Update debug data
* Fic typo in tests
* Remove key from type
* Minimize the number of rerenders by splitting sheet logic into separate component
* Fix agree sheet
* Fix y offset for scrolling from notifications to activity item
* Change default MyObs layout to grid
* Rename testID
* Update tests expecting to start with list view
* Reverse order of buttons in layout selector
* Fix layout bug of having empty boxes on explore