Commit Graph

533 Commits

Author SHA1 Message Date
Johannes Klein
b4516b7b25 Update react native to v0.78.x (#3043)
* Update package.json

* Update package.json

* Updates for native files with upgrade-helpers

* Update .flowconfig

* Update package-lock.json

* Update Podfile.lock

* Add react-dom types

* Update package-lock.json

* Wrong install

* Use types-react-codemod

* Update TaxonSearch.tsx

* Remove react-native-accessibility-engine dependency

This is currently not maintained and not compatible with RN 0.78

* Comment out accessibility tests

* Disable broken snapshot test

* Move broken test

* Move broken test

* Move broken test

* Remove duplicate file

* Move broken tests

* Move broken tests

* Move broken tests

* Move broken tests

* Move broken tests

* Move broken test

* Remove duplicate file

* Move broken tests
2025-08-09 13:47:46 +02:00
Johannes Klein
a618b6e870 Update react-native-testing-library to latest (#3044)
* 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
2025-08-05 13:44:49 +02:00
Johannes Klein
f10188250c Some Flow to Typescript migrations, in simple components (#3034)
* Update Attribution.tsx

* Update FollowButton.tsx

* Update LoginSheet.tsx

* Update UnfollowSheet.tsx

* Update UnfollowSheet.tsx

* Update EstablishmentMeans.tsx

* Update TaxonDetailsTitle.tsx

* Update Taxonomy.tsx

* Update TaxonMapPreview.tsx

* Update FullScreenActivityIndicator.tsx

* Update ActivityIndicator.tsx

* Update SpeciesSeenCheckmark.tsx

* Update Mortal.tsx

* Update HideView.tsx

* Update ConfidenceInterval.tsx

* Update ViewWrapper.tsx

* Update ScrollViewWrapper.tsx

* Update SimpleObservationLocation.tsx

* Update Divider.tsx

* Update DateTimePicker.tsx

* Update MediaNavButtons.tsx

* Update MediaNavButtons.tsx

* Update MediaNavButtons.tsx

* Update DisplayTaxon.tsx

* Update InputField.tsx

* Update InputField.tsx

* Update ObservationLocation.tsx

* Update WarningText.tsx

* Update LoadingIndicator.tsx

* Update CrosshairCircle.tsx

* Update CoordinatesCopiedNotification.tsx

* Update PhotoSharing.tsx

* Update TaxonDetailsMediaViewerHeader.tsx

* Update EvidenceButton.tsx

* Update TextSheet.tsx

* Update Wikipedia.tsx

* Update About.tsx

* Update About.tsx

* Update imports

* Code style
2025-08-01 12:25:46 +02:00
Johannes Klein
f17a346f23 Repair ObsWheel tooltip (#3022)
* Refactor Tooltip into AddObsModal

* Update AddObsModal.tsx

* Remove unintentionally hardcoded condition

* Disallow close modal while tooltip is visible

While the tooltip is visible the modal should not be dismissed

* Reinstate logged-in triggers

* Disable tooltip for users that just signed up

Because of a bug in showing the "Account creation" pivot card the trigger here is not always set to true and so the correct behaviour of showing the tooltip is currently not possible.

* Remove buggy check for button press

* Re-position modal

* Make sure we have numbers of observations by the user

We need it to make a decision on wether to show the tooltip. If we don't have it don't show it.

* Show the modal when tooltip should be shown

With a timeout because we have a lot of overlapping modals here.

* Remove react-native-walkthrough-tooltip dependency

* Add triangle under bubble

* Update snapshot tests
2025-07-31 10:15:53 +02:00
Johannes Klein
9c0fcf1d60 Recovery from observations not uploading (#3015)
* Log app version on start

This is helpful for log files sent in from users, to see what version of he code they were actually running while errors happened.

* Add some types

* Import as types

* Remove unused param

* Update types

* Add string

* Update strings.ftl

* Add explanatory text to login screen if logging in again

* Add TODO

* Define new error class

* Throw a RecoverableError if trying to upload without token

* Do not make a new Error if caught. Instead re-throw the one caught.

This preserves the RecoverableError type if thrown.

* Update string

* Add to return info of function that handles errors

* Recover from an error that login again might fix

By sending the user to the login screen. In case of a multi-observation upload we stop the current queue because subsequent observations will also error out (and send one navigation event each).

* Update errorHandling.test.js

* Revert "Add TODO"

This reverts commit 57437f1ece.

* Add unit tests for recovery options
2025-07-18 07:58:42 +02:00
Johannes Klein
979127ba02 Assert that observationPhoto position is a number (#3008)
* Update import

* Import realm models as types

* Remove unused import

* Add function param types

* Add function param types

* Rename param for consistency

* Remove unused function param

* Type param

* Update type

* Add TODO

* Import function param type

* File rename without change

* Update imports

* Add some fct types

* Add fct param types

* Add function param types

* Update ObservationPhoto.ts

* Remove unused param

* Type fct param

* Add type

* Remove unused param

* Update comment

* Add fct param type as accessed by local context

* Add types from what is accessed in function

* Add types

* Remove unused types

* Add basic type, as is used in  local context

* Bring require statement back

* Import other function param types

* Add property types

* Fix wrong extends

* Assert inputs and outputs for mapping a local observation photo to server action

* Update unit tests for errors

* Rename file

* Update imports
2025-07-10 08:15:03 +02:00
Johannes Klein
b0b41b7bb6 Fix freeze on login, by commenting out tooltip for new users (#3010)
* Temporarily disable the tooltip for new users, as it is freezing the app in some cases

* Disable unit tests
2025-07-09 09:55:01 +02:00
budowski
46ea4ea4af MOB-711 - add location for better IDs change (#2965)
* MOB-711 - add location for better IDs change

* Various fixes according to PR feedback

* Make button fill all available space

* Change padding to margin

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-07-08 23:23:41 +02:00
Johannes Klein
62fe5a8f01 Revert "Update imports"
This reverts commit ca99dbfcf2.
2025-07-07 15:01:37 +02:00
Johannes Klein
ca99dbfcf2 Update imports 2025-07-07 14:53:43 +02:00
Johannes Klein
f2145dc86d Update react-native-reanimated (#2987)
* Update package.json

* Update package-lock.json

* Update Podfile.lock

* Reactivate snapshot tests

* Update Podfile.lock
2025-06-27 15:29:21 -07: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
020d46f9b9 Add conditions for which the Obswheel tooltip is shown (#2980)
* 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
2025-06-27 13:19:28 +02:00
budowski
836438cd1e MOB-752 - use FasterImageView for caching obs/taxon/project images (#2887) 2025-06-26 11:10:01 -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
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
Johannes Klein
b9b58bdfc4 Update react-native-reanimated to version 3.16.6 (#2957)
* Use updated version

Version 3.16.0 introduces support for RN 0.76. 3.16.7 introduces support vor RN 0.77 so I decided for 3.16.6 for now.

* Update package-lock.json

* Update Podfile.lock

* Update UploadStatus.test.js.snap

* Comment out snapshot tests

* Comment out snapshot tests
2025-06-16 10:56:52 -07:00
Amanda Bullington
5eb77e91fd Add unit and integration tests around sharing photos (#2948) 2025-06-12 16:00:50 -07: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
Johannes Klein
26f0863ec9 Fix: integration tests store setup when changing layout slice (#2932)
* Update MyObservations.test.js

* Remove comment

* Remove unnecessary setState

* Update MyObservationsLocalization.test.js

* Previous change can be more specific

* Update MyObservationsSimple.test.js

* Update AICamera.test.js

* Update Explore.test.js

* Update MyObservations.test.js

* Update ObsEdit.test.js

* Update SoundRecorder.test.js

* Update PhotoImport.test.js

* Update CustomTabBar.test.js

* Update SuggestionsWithUnsyncedObs.test.js

* Update SuggestionsWithSyncedObs.test.js

* Update PhotoDeletion.test.js

* Update Suggestions.test.js

* Update AddObsButton.test.js

* Update MediaViewer.test.js

* Update PhotoLibrary.test.js

* Update StandardCamera.test.js

* Update SimpleUploadBannerContainer.test.js

* This test needs to be in advanced mode

* Remove setState of shownOnce back to default

* Refactor store override calls into a helper function

* Update MyObservationsLocalization.test.js

* Update MyObservationsSimple.test.js

* Update PhotoDeletion.test.js

* Update PhotoImport.test.js

* Update SuggestionsWithSyncedObs.test.js

* Refactor to use helper

* Update SimpleUploadBannerContainer.test.js
2025-06-10 16:10:19 +02: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
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
83eed85a74 Update react-native-safe-area-context-to >4.10.1 (#2911)
* Update react-native-safe-area-context-to >4.10.1

Version 4.10.1 adds support for react native 0.74.

* Re-establish mock after it was reset

I think the better way forward would be to restructure these tests, so that we don't need to resetAllMocks in between the two describe blocks, but I don't want to increase the scope of this PR.
2025-05-20 09:50:32 +02: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
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
Angie
cd6d6543f1 Add login button where logout button is on menu (#2891)
* Add login button in menu where the logout button is

* Update snapshots

* Changes to fit design
2025-05-14 10:00:04 -07:00
Johannes Klein
85a7385b62 Migrate MatchHeader and imported components/functions to TypeScript (#2890)
* Rename file

* Migrate flow to TS

* Update type

* Update type

* Rename file

* Update useTranslation.ts

* Check if instanceof Error

* Update imports

* Update type

* Rename file

* Migrate translatedRank to TS

* Migrate DisplayTaxonName to TS

* Also accept number for taxonId

* Those types are currently not optional

* Revert "Migrate translatedRank to TS"

This reverts commit c69cc18061.

* Rename taxon.js

* Add interfaces and types

* Remove adding a key to the function param

* Move fetchTaxonAndSave back to original file

* Move interface

* Update import

* Update types

* Rename some variables for clarity

* This is how it currently props down from only HOC

* Update imports

* Rename file

* Add param interface

* Update imports

* Revert "Move fetchTaxonAndSave back to original file"

This reverts commit 981ce228e8.

* Move fetchTaxonAndSave to own file

* Type inference is easiest way for React components

* Rename file

* Remove unused props

* Add types

* Update type

* Infer return type

* Update import

* Add interface

* Rename const and interface

* Update import (Merge conflict)
2025-05-13 11:34:59 +02:00
Amanda Bullington
f592993889 Maintenance: break upload code into smaller modules -- data transformation (#2884)
* Create module for realm syncing and write unit tests before refactoring

* Refactor realmSync functions for readability & make sure realm errors aren't silently swallowed

* unit tests

* Update tests to use factory functions for media

* Update tests to use factory

* Remove sanitize function since it's redundant with mapping; move mapping & add unit tests

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-05-12 12:16:52 -07:00
Amanda Bullington
6413ddb57f Maintenance: break upload code into smaller modules -- error handling (#2876)
* Create module for realm syncing and write unit tests before refactoring

* Refactor realmSync functions for readability & make sure realm errors aren't silently swallowed

* Move error handling to its own module and add unit tests

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-04-30 13:42:17 +02:00
Amanda Bullington
a4f65a57de Maintenance: break upload code into smaller modules -- progress tracking (#2875)
* Create module for realm syncing and write unit tests before refactoring

* Refactor realmSync functions for readability & make sure realm errors aren't silently swallowed

* Break progress tracking out into module with unit tests
2025-04-30 12:29:30 +02:00
Johannes Klein
3cff7326ae Change calculation of successful upload status stats (#2869)
* Show upload status also if we have no status but an error

E.g. if all uploads fail.

* Change number of successful upploads

Now to use number of attempts made minus number of failed uploads.

* Add unit tests

* Refactor state of successful uploads into store
2025-04-29 12:05:44 -07:00
Johannes Klein
844629bbf4 Revert "Maintenance: break upload code into smaller modules -- realm syncing functions (#2872)"
This reverts commit 43f9520b86.
2025-04-29 16:53:25 +02:00
Amanda Bullington
43f9520b86 Maintenance: break upload code into smaller modules -- realm syncing functions (#2872) 2025-04-29 16:50:02 +02:00
Johannes Klein
d71ab7a358 Copy of: Maintenance: break upload code into smaller modules -- realm syncing functions (#2883)
* Create module for realm syncing and write unit tests before refactoring

* Refactor realmSync functions for readability & make sure realm errors aren't silently swallowed

---------

Co-authored-by: Amanda Bullington <albullington@gmail.com>
2025-04-29 16:48:50 +02:00
Amanda Bullington
b362071b1b Change default explore view to observations map view (#2871)
* 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>
2025-04-28 11:53:47 -07:00
budowski
af6ac3694a MOB703 - changes to obs edit screen identification section (#2865)
* MOB703 - changes to obs edit screen identification section

* Adjust size of magnifying glass icon

---------

Co-authored-by: Amanda Bullington <albullington@gmail.com>
2025-04-22 10:03:51 -07:00
Ken-ichi
f8d86eea1c New Crowdin Translations (#2819)
* New Crowdin translations by GitHub Action

* test: handle multiple matches for localized text in Settings test

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-04-01 13:00:34 -07:00
Angie
548288c283 Change explore icon to magnifying glass (#2807)
* Replace change explore icon to magnifying glass

* Update snapshot
2025-03-27 18:15:34 -07:00
Amanda Bullington
d782538109 Advanced settings UI updates (#2797)
* 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>
2025-03-27 17:36:36 +01:00
Amanda Bullington
7733ededfb Carousel, Permission, Match, Login, AI Camera copy edits (#2802)
* Text updates and AICamera icon update for onboarding carousel

* Update background image camera permission

* Update text for permission gates

* Update text match screen, login signup, and camera

* Fix AICamera test
2025-03-25 16:18:39 -07:00
Amanda Bullington
70ffa9112a Make MyObservationsSimple the standard UI across default/advanced mode (#2788)
* 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
2025-03-20 17:04:31 -07:00
Amanda Bullington
bcec8fc73c Store local taxon name preferences & update when online (#2762)
* Use work queue to store local taxon name preferences & update when user goes online

* Do less updating on Settings screen

* Add logging to make sure taxon names are set correctly

* Test for TaxonNamesSettings
2025-03-14 18:09:52 -07:00
Amanda Bullington
2be121d1a8 Fade out MyObs checkmark without fading into ObsStatus (#2763)
* Don't fade into ObsStatus in MyObservations

* Update snapshot
2025-03-13 18:33:17 -07:00
Johannes Klein
e5bbd6b873 Do not upload observations that have missing location or date when in default mode (#2750)
* Prop number in from direct and single HOC

* Prop num in from even higher

* Calculate number of unuploaded obs with missing basics

* Only show upload indicators when number of obs without missing basics is positive

* Send obs uuids with missing basics to button press handler

* Instead of reacting in useEffect call syncManually explicitly

* Accept array of uuids to skip and pass on to startUploadObservations

* If param given do not include some uuids when building upload queue

* Remove test

* Change param interface to options object

* Destructure only if param given
2025-03-12 16:18:37 -07:00
Amanda Bullington
d4d29b3aa8 Fix icons for dropdown carets in ObsEdit (#2748)
* Add icon

* Add icon

* Add icon

* Fix triangle dropdowns on ObsEdit other data section

* Update snapshots
2025-03-12 14:53:45 -07:00
Amanda Bullington
9b1275a6eb Use fixed header in ObsDetails advanced mode (#2741)
* Use fixed header on ObsDetails advanced mode

* Remove test for removed component - using react navigation header instead

* Remove tests related to ObsDetails header icon; using react navigation

* Add testID to react navigation level back button and fix e2e

* Terminate app after every e2e test and maybe help flakiness

* Rework termination of app

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-03-12 10:38:35 +01:00
Johannes Klein
d1398a4d29 Add UI for match screen not identifying (#2728)
* Alternative return for match screen in absence of suggestion

* Add lower part text elements

* Add margin at bottom

* Copy code to make a new suggestions scrll for iconic taxa

* Removing not needed properties of the copied code

* Remove log

* Remove width constraints

* Add a state to track selected iconic taxon

* Comment and code style

* Pass prop down to taxa scroll

* Use new props in iconic taxa scroll

* Color border according to selected state

* Use iconic taxon as top ID if none given

* Remove testing code

* Update Match.test.js
2025-03-07 19:42:38 +01:00
Johannes Klein
626fbfd94f Full screen loading state on match screen (#2717)
* 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>
2025-03-07 11:50:49 +01:00
Amanda Bullington
fd6cd0148d Filter out hidden content from ObsDetails advanced/default activity feeds (#2721)
* Hide comments and ids that are supposed to be hidden on remote/local observations

* Add and fix tests related to hiding content
2025-03-06 15:33:02 -08:00