Commit Graph

14 Commits

Author SHA1 Message Date
Ryan Stelly
b78be9243d lint rule & autofix for "trailing comma" (#3299)
* (lint) MOB-1063 enforce trailing commas

* autofix trailing commas

* manually fix newly introduced maxlen violations

* add trailing comma convention to i18n build
2025-12-22 20:17:13 -06:00
Johannes Klein
9c90c2e45f Update react-native to 0.79 (#3051)
* 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.
2025-10-01 22:44:14 -05:00
Amanda Bullington
970c686933 Camera refactor to potentially address lagginess (#2457)
* Add usePerformance load time to cameras and suggestions

* Declare when to hide delete photo mode without a useEffect

* Use StatusBar hidden component in CameraContainer, instead of useEffects

* Directly handle discards from bottom sheet instead of using useEffect

* Rewrite a whole bunch of camera code to be more declarative and less imperative

* Make sure permissions gate works as expected

* Code cleanup

* Consolidate focus/blur listeners in AICamera

* Fix timing issues in Suggestions tests

* Fix tests

* Ensure photos are still saving to gallery when write permission given & update saving photo state
2024-11-19 18:14:44 -08:00
Amanda Bullington
cf896a3a17 Toolbar upload status refreshes when user returns to MyObs (#1942)
* Write some failing navigation tests for MyObs navigation

* Add one more failing test to check for empty screen after all obs are deleted

* Update what happens on blur

* Changes to focus effect

* Revert "Changes to focus effect"

This reverts commit c779504cdf.

* Test: toolbar status reset when user leaves screen

* Unmock useFocusEffect in Jest; fix tests

* Minor nav mocking updates

* Fix import
2024-08-09 11:21:25 -07:00
Ken-ichi
61cbbc9ac1 Show all obs photos in StandardCamera preview (#1765)
* Show all obs photos in StandardCamera preview
* Clear camera Zustand state after saving photos as ObservationPhotos
* Load Photo URIs into Zustand state when entering the camera
* Rename rotatedOriginalCameraPhotos to cameraUris to match galleryUri and to
  save us all a few keystrokes
2024-07-03 17:25:24 -07: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
Amanda Bullington
333ae489cd AR Camera UI (#705)
* Refactor camera buttons into their own components

* Standardize camera buttons & make TaxonResult a reusable component

* Fix button styling in tablet landscape; create confidence interval

* Create camera container with shared functionality for both cameras; fix tests

* Connect results & loading status from native predictions; standardize results on iOS/Android

* Fix Camera test by mocking CameraView and FrameProcessor components
2023-07-19 10:14:30 -07:00
Johannes Klein
5f81c49f85 ARCamera MVP: Basic screen with full screen camera and prediction labels (#684) 2023-07-15 07:53:18 +02:00
Ken-ichi
00ae38ddda Standard camera photo delete (#615)
* Ensure layout of the PhotoCarousel photos doesn't change in delete mode
* Stop conflating screen-size layout differences with tablet layout differences
* Bugfix: deleting one photo in the StandardCamera removed all photos
* Animated rotation of rotatable elements on StandardCamera
* Ensure loading status shows while first photo is being taken
* Tried to remove some open handles and shore up some unhappy tests
2023-05-19 13:16:32 -07:00
Amanda Bullington
c623c02272 Refactor DiscardChangesSheet and show only when leaving screen (#562)
* Only render bottom sheet when needed; refactor; fixes #556

* Fix test: add useFocusEffect to mocked nav
2023-03-31 10:26:23 -07:00
Chris
206934f7ad 471 create camera cancel bottom sheet (#516)
* Add confirmation modal for discard photos in standard camera

* Add confirmation modal for discard photos in standard camera

* Fix tests

* Make requested changes

* Add close via overlay
2023-03-07 11:06:57 -08:00
Amanda Bullington
ba181e75fd Remove warnings about custom icons / Material icons in jest (#429)
* Mock INatPaperProvider to remove warnings about wrong icon names in jest; closes #421

* Remove unnecessary paper provider mock

* Add mocked views back to tests
2023-02-03 08:38:51 -08:00
Johannes Klein
14d0239468 308 accessibility tests (#393)
* Regroup accessibility label strings at end of strings file
* Add accessibility test to AddID
* Add a11y labels to AddID
* Add a11y test to StandardCamera
* Add a11y props to StandardCamera
* Remove unit test with only todos
* Add a11y test to Messages
* Refactor PhotoScroll test into own file
* Add a11y test to ObsDetails
* Add a11y test to ObsList
* Add a11y matcher to PhotoGallery test
* Add a11y matcher to ProjectDetails test
* Add a11y matcher to ProjectObservations test
* Add a11y matcher to Projects test
* Add a11y props to ProjectList
* Add a11y props to ProjectTabs
* Add a11y matcher to Search
* Add a11y matcher to UserProfile test
* Add a11y test matcher to UserText test
* Update react-native-accessibility-engine
* Add a11y matcher to Tabs test
* Add a11y label to a selectable photo
* Refactor DataTab tests into separate file
* Refactor ActivityTab test out into own file
* Added a test how to check if a component uses a mocked container
* Add wrong a11y props to TextInput left icon
* Enable a11y test with actual BottomSheet because mock does not pass a11y props down
* Add a11y default props to Button
2023-01-27 12:30:57 -08:00
Johannes Klein
7324117869 266 flash icon change (#271)
* Add script to clean start
* Add function to camera mock
* Basic StandardCamera test setup
* Display flash off icon in camera
* Add accessibility labels to strings
* Change to use testID for tests
* Rename package script
* Update vision-camera mock
2022-12-13 15:41:46 -08:00