* WIP: fetchPlaceName mock to workaround issue on Android phones without Play Services
* Update vision-camera.js
* Fixes an error while rendering this mock
* Do not filter out hidden comments and IDs when getting an obs from server
* Do not add a filtered set of comments and IDs to local obs
Searching for visibleComments and visibleIdentifications anyways gives 0 results outside this file.
* Move file
* Remove flow
* Type fcts
* Add a type to item
* More types
* Add field to RealmTaxon
* Type navigation as used in ObsDetails
* Update ActivityItem.tsx
* Migrate FloatingButtons to TS
* Change prop type
* Rename ActivityHeader
* Migrate ActivityHeaderKebabMenu to TS
* Type functions
* Add undefined as possibility from TextInputSheet callback
* Revert "Add undefined as possibility from TextInputSheet callback"
This reverts commit 95b5fef2b9.
* Revert "Type functions"
This reverts commit 6997f195ce.
* Revert "Rename ActivityHeader"
This reverts commit e384c1f5a5.
* Revert "Update ActivityItem.tsx"
This reverts commit c1dc151b9a.
* Revert "Add field to RealmTaxon"
This reverts commit 965af041c0.
* Revert "More types"
This reverts commit 73af10bfcd.
* Revert "Add a type to item"
This reverts commit 5e5bf0ebae.
* Revert "Type fcts"
This reverts commit 84cac53e33.
* Revert "Type navigation as used in ObsDetails"
This reverts commit 9febf9ea30.
* Revert "Remove flow"
This reverts commit dca054c212.
* Revert "Move file"
This reverts commit bf62c0db95.
* Add UI for a hidden comment/ID
* Rename export like file name
* Update ID category text in tests
* Ask for hidden status from API and persist in realm
* Show fallback UI for hidden photos in PhotoContainer
* Update strings.ftl
* Show fallback UI for hidden sounds in SoundContainer
* Change mock to remoteObservation
Previously, this test file was relying on a faulty remoteObservation. The passed in remoteObservation was {} and because of the now removed filter code in useRemoteObservation what was passes into the test was {comments:[], identifications:[]} which made this test pass without ever using the useLocalObervation mock.
* Add eye icon to photo
* Add eye icon to sound
* Add eye icon to comments/IDs
* Remove android specific launch and early return
* Remove no longer needed other launchApp command
* Update installData e2e mock
* Tap container to dismiss keyboard
* Add testID to login container
* Push a test image into the app's external files directory
* Mock camer takePhoto on Android
* Use a jpg that results in suggestions
* Update e2e camera mock to not use frameProcessor when not active
* Change vision camera mock to create a destination path with additional /
* To remove possibility for flakiness prescribe an emulator
* Add a geocoder wrapper file
* Revert "Add a geocoder wrapper file"
This reverts commit 6c7b6c61a5.
* Rename for consistency with obs photos
* Refactor to be similar to obs photos
* Include Sound as type
* Revert "Include Sound as type"
This reverts commit 3db88ae031.
* Revert "Refactor to be similar to obs photos"
This reverts commit 8ed7454be0.
* Revert "Rename for consistency with obs photos"
This reverts commit 674b921bab.
* Git mv without changes
* Add types
* Type api sound param
* Type fields s const
* Type fields as const
* Type api param
* Type new param
* The only call site of this function passes in only defined strings
* Adapted from Photo check for local path before deleting
* Type fct params
* Refactor constructor to only have a uri as param
* Refactor Sound constructor to have string as param
* Update Sound.ts
* Remove unused param
* Type fct params
* Type realm
* Also collect unsyncedSounds
* Create operations for sound uploads based on Sound only
* Add Evidence type
* Change a sound upload operation to work with a RealmSound
* Update realmSync to also just pass through Sounds
* Use server ID for attaching obs_sound to obs
* Also split photo pipeline for clarity
This is not a functional change. Also previously, only RealmPhoto s are uploaded, only RealmObservationPhoto s are attached or modified. Same as for sounds now.
* Update realmSync.ts
* Remove log
* Update realmSync.test.js
* Update mocks
* Update Sound map test
* Update prepareMediaForUpload.test.js
* Update prepareMediaForUpload.test.js
* Update mediaUploader.test.js
* use bottom sheet api instead of returning null when hidden
* dedupe inside modal dismiss logic
* rename handleSnapPress -> openSheet
* ts fixes and split render into two branches
* fix integration test so we check for BottomSheet behavior rather than child absence
* snapshot updates + comments
* prevent hidden-state BottomSheet dismiss from triggering onPressClose
* port changes from BottomSheet to BottomSheetV2
* retrigger notification query on effect rather than new query
* move unviewedObs refetch to effect
* fix test
* Remove trailing whitespaces
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* Type navigation
* Refactor return type of authenticate user to be an object
* Update AuthenticationService.test.js
* Also return number of uploaded observations from user authentication
* Type navigation
* Update types.ts
* Update types.ts
* We do check if this is defined above
* If a user has more than 100 uploaded obs switch them to advanced mode
* Update LoginForm.tsx
* Add test coverage for remote user with observations
* Update package.json
Without the babel plugin the app does not start because of an error with the new package.
* Update babel.config.js
* Update package-lock.json
* Switch to new package for Wikipedia text
* Update Podfile.lock
* Use new package in UserText
* Link underline was blue, now green again
* Make headings in user text the same as in the app
* Fix typo?
Not hundred percent sure about this, but MDN docs show no t tag and the original list in inaturalist has tfoot in this place here.
* Remove tag that is not supported on web
* Refactor making of html into helper function
* Update index.ts
* Create a snapshot test for build html function
* MOB-1276: first pass
* Move realm clearing below other resets
Before we were seeing a crash where a user signsOut and while deleting realm still has a reference to a realm object somewhere the app crashes (something along the lines of "accessing object which has been invalidated or deleted", I think). Which meant that subsequent lines here after reaml.deleteAll were never hit. So, we got rid of realm but still had the signals that the user is logged in like jwt and mmkv stuff. This is problematic because UI and server request have different definitions of a user is logged in: 1) sensitive item named "username" exists, and 2) realm entry for current user exists.
I don't see how this change here get's rid of the actual crash, but at least we maybe have more likelihood of deleting all things we want to delete here.
According to @FLGMwt s investigations into this this closes MOB-820 https://linear.app/inaturalist/issue/MOB-820/user-account-seem-to-be-mixed-up#comment-80cd5378
* Do not clear auth cache and sensitive info on automatic login again initiation
I think we should fully rely on the login again action to refresh jwtToken, jwtGeneratedAt, and accessToken.
We don't know which one of them is corrupt at this point, and a re-login will give us correct new ones.
* Remove comments
A) I don't think it means that *for any reason* we delete the local database. Only when we had a 401 we were deleting everything.
B) is alleviated
* Quick fix idea
If we are on the login screen for the login again flow do not show a close button. This means the user has to close the app and open again. If the 401 persists the only action the user can take is to do the login again.
* Alternative fix: sign out on login again flow close
Adding back the X button to the login flow. Pressing it explains that this is a sign out action and signs the user out making sure we also clear realm during an entire sign out deletion flow.
* Remove test
* Update src/components/LoginSignUp/LoginForm.tsx
Co-authored-by: Ryan Stelly <ryan@inaturalist.org>
* Clean up previous code suggestion
* Revert "Clean up previous code suggestion"
This reverts commit 345bb31510.
* Revert "Update src/components/LoginSignUp/LoginForm.tsx"
This reverts commit 968fcd8601.
---------
Co-authored-by: sepeterson <10458078+sepeterson@users.noreply.github.com>
Co-authored-by: Ryan Stelly <ryan@inaturalist.org>
* extract non-react log helpers out of custom hook
* git mv useLogs to more appropriate name / location
* update logmgmt imports, clean up getLogs
* git mv Log.js Log.tsx
* remove sharing functionality from log preview screen
* reorganize debug screen w/ headers
* refactor all Debug sections for consistency
* add rolling log config, switch existing logmgmt to 'legacy' var
* factor path out of share/email for legacy wrappers
* add 'legacy' log category in prep for showing new logs
* add legacy flag to log preview screen params
* add useLogPreview for Log screen supporting legacy and aggregated recent rolling logs
* actually support sharing the new logs w/ a tmp file of concatenated recent logs
* delete low value developer screen test
* fix double reverse and handle bad filename