* Add permission gate for adding photos
* Add permission gate for adding photos to library
* Show permission gate first time camera loads; allow navigation on future loads
* Show PermissionGate only when checkmark tapped
* Show permission gate when checkmark tapped
* Nav to obs edit when permission granted
* Fix ARCamera tests
* Update file names; remove unused files
* Rename method from usePrepareState hook
* Bugfix: TaxonDetails was crashing if it received a null taxon
* Send lat and lng instead of latitude and longitude to the score_image
endpoint
* Show offline suggestions when you are offline
* Show notice when viewing offline suggestions
* Moved code unique to useOnlineSuggestions into that file
* Ensure we use a medium size image to get suggestions when dealing with
remote URLs
* More logging around React Query retries
* Use default retry logic for useAuthenticatedQuery
* Made a module-resolver shortcut for tests
* Move offline notice above top suggestion; hide when offlines exist but onlines do too
* Add zustand to app
* Begin replacing ObsEditProvider with zustand for global state
* Use store and add tests
* Fix bugs
* Add test to check for deleted photos in StandardCamera
* Make sure evidence is only added to current observation; submit comment with ID on ObsDetail
* Fix ObsEditWithoutProvider tests
* Move store to where it's needed
* Fix tests
* Await evidence being added to obsPhotos from camera
* Add a note about slices to useStore
* Simplify ObsEditProvider by moving functions into local state & calling reducer less frequently
* Fix delete all observations
* Fixes
* Move index selection to MediaViewer via params
* Access ObsEditContext on top level of ObsEdit and pass props
* Move context to top level screen components
* Fix tests
* Use waitFor to fix ObsDetails integration test
* Alphabetize props; remove realm check; refactor new Id method
---------
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
Separated PhotoCarousel view and delete into separate buttons
Fixes#837 by separating the two separate press interactions into two separate
buttons, which is probably also better for accessibility (screen reader can
read two separate labels for two separate actions). Also addresses a layout
bug in landscape on iPad.
Also *might* introduce a bug with orientation lock reverting when rotating
device while in delete mode. Only happens in Android, may not be new
* Remove console statements in production build
* Move uploadReducer into separate file
* Create reducer for creating obs; combine reducers
* Fixes with createObsReducer
* Move album, passes test states out of global context
* Bug fixes for ObsEdit flow
* Create photo gallery container
* Set accessibility test todo for PhotoGallery
* Improve FlashList performance MyObs
* Prevent flicker on modal close
* Create less rerenders in MyObservations
* Memoize drawer items for less rerendering
* Memoize custom tab bar
* Remove unused libraries and update snapshot
* Fix and prune dependencies
* Add AddObsModal tests
* Fix e2e test android by making comment confirm button visible
* 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
* Make minimum viable RemoteComment
* Minimum vialbe RemoteIdentification
* Minimum viable remote project, place, and messages
* Create minimum viable records for all remote factories
* Remove factories for local device data
* Minimum viable local taxon, comment, id
* Minimum viable for local observation photo (photo has no primary key)
* Minimum viable LocalUser
* Minimum viable record for LocalObservation
* 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
* Make MediaViewer a navigation screen; support changing landscape/portrait orientations
* Move device orientation into hook
* Minor fixes to styling
* Styling updates based on breakpoints
* StandardCamera for large layouts
* StandardCamera and main merge cleanup
* Refactoring flashButton render
* Adjust margins and button spacing for large layouts
* Change conditionals to include screen size breakpoints
* Remove redundant conditionals
* Added PhotoPreview large screens landscape, styling cleanup, ios portrait mode lock on phones
* Update unit test, update snapshots
* Rotate icons in landscape and fix photolist direction in phones
* Rotate icon function adjusted
* Several fixes for orientation chages; keep camera buttons in place
Orientation was not being set correctly, but given the different definitions
and different values for orientation used by differe libraries, that's pretty
understandable. Here's I've tried to standardize around some constants and
make sure it gets set correct and variables like `isLandscapeMode` actuall
have the value the claim to hold.
Also redid the "no photos" state for the camera to be closer to spec, though
the text rotation is quite a pain.
Camera buttons should now stay in place even when the flash button appears or
disappears depending on the camera in use.
* Use isLargeScreen consistently
* Don't track orientation change when it doesn't do anything
i.e. on a phone. This was causing a crash in Android when rotating into
portrait orientation.
* Orientation change updates for StandardCamera
* go back to supporting rotation on small devices for the icons
* fixed android crash when rotating from landscape to portrait on a small
device
* handled FACE-UP and FACE-DOWN orientations by just not changing layout in
those scenarios
* Fix discard changes sheet in camera
---------
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
Co-authored-by: Amanda Bullington <albullington@gmail.com>
* Adjust PhotoPreview sizes for StandardCamera for different breakpoints
* PhotoCarousel tests
* Merge main into branch
* PhotoPreview styling after merge
* Update PhotoCarousel snapshots
* Moved getBreakpoint into Sharedhelper, changes requested.
* PhotoPreview for large layouts
* Remove testing color
* Update snapshots
---------
Co-authored-by: Amanda Bullington <albullington@gmail.com>
* 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
* Mock INatPaperProvider to remove warnings about wrong icon names in jest; closes#421
* Remove unnecessary paper provider mock
* Add mocked views back to tests
* 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
* 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