* Crosshairs, location accuracy warnings, text input for location picker
* Add LocationPicker tests
* UI improvements and code refactor into smaller components; get GMaps working
* Add shadows to icons/text boxes
* Use debouncing to avoid map jitter when typing in location
* Show place results & let user pick new location from web api
* Add tests for location picker with remote results
* Add gmaps api key to github actions
* Try adding manifest placeholders for env variable to work in github actions
* Add key to printf in github actions
* Try accessing GMAPS_API_KEY a different way
* Update android e2e env file step
This updates the "Create .env file" step to use printf to print the Google Maps key into a newly created .env file in the GitHub Action runner. Using the same key as in env.example.
* Fix newline
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* 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>
* Add KebabMenu to shared components index
* Separate EvidenceList from PhotoCarousel component
* Remove unneeded props from PhotoCarousel
* Create notes bottom sheet
* Fix tests for delete obs sheet
* Add wild status sheet
* Show date from observations uploaded via website
* Move media viewer modal into evidence section
* Fix mock
* Move location fetching into its own hook
* Refactor ObsEdit header; move code into Header component
* Add discard changes sheet
* Styling updates and save changes button
* Add classes to buttons based on evidence/id missing
* Add imprecise location sheet
* Add jest.fn from provider to ObsEdit tests
* Remove fakeTimers from ObsEditWithoutProvider.test.js; minor cleanup
* Show discard obs sheet anytime a user tries to navigate back
* Fixes to bottom sheet backdrop, evidence, add discard changes sheet
* Switch to paper radio buttons instead of checkmarks
* Fix bottom sheet backdrop in android by wrapping with GestureHandlerRootView
* Update bottom sheet for add comment & notes
* Fix test
* Remove fake timer from ObsEdit test to get tests passing
* Force update github actions cache
---------
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* use `shrink` tailwind class instead of hard-coded max widths to control
overflow in a few situations
* fixed some spacing issues with the Toolbar during upload
* center text in buttons by default
* export KebabMenu from SharedComponents (how was it working without this?)
* added some extra colors for debugging purposes
* 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>
* Styling updates to ObsEdit screen
* Fix padding/margins and font style in TextInput
* Styling updates for identification section
* UI changes; add checkmarks for evidence
* Only show arrows for multiple observations
This error seems to happen on the first few attempts to use i18next.translate
on Android when there are numerical interpolations, e.g. plurals. This
extends a bandaid fix by @Chrischuck in
https://github.com/inaturalist/iNaturalistReactNative/pull/515 to handle all
uses of translation.
Ensure requests to fetch observations that are in flight at the time an
observation is deleted to not re-create or overwrite the deleted observation.
Closes#545
* Refactor to boolean prop for white or gray
* Rename prop
* Add component for comments count
* Reorder strings
* Use CommentsCount
* Add identifications count component
* Add snapshot test for ActivityCount
* Add tests TODO for component
* Updated with new icons
* Add snapshot tests
* Update ActivityCount.test.js.snap
* Unit test for count text
* Remove testing comments count in ObsList test
* Update with changes from main
* Update IdentificationsCount.test.js.snap
* Remove components from ObsStatus
* WIP: very rough start at pulling state up into a container for MyObservations
I made a parallel MyObservations component and container so ObservationViews
can still be used as a working reference, but the ultimate goal here is to
focus MyObservations on presentation, and pull state and other business logic
up into a container component. This should make MyObservations a bit more
testable and clean up a very large and confusing file.
I'm also trying to move away from a generalized representation of observations
on all screens, which is why I want to name it MyObservations and not
ObservationViews. MyObservations has a lot of unique functionality that we
won't need elsewhere, and we can modularize stuff when we need to use it in
multiple places.
* UI updates for header, toolbar, empty component
* Add pressable component and login sheet
* UI improvements; get infinite scroll working
* UI improvements & additions for empty screen & bottom sheet
* Show login sheet when a user presses sync but is not logged in
* Fix backdrop close for AddObsModal
* Move UI elements to MyObservations
* Fix unit tests for MyObservations
* Fix for login sheet
* Set header height to a different height on Android to account for safe area
* Fix failing tests & rerender of user icon in navbar
* Remove scientific name from DisplayTaxonName to match Figma UI
* Set height above toolbar dynamically for sticky toolbar
* Add prop to display or hide second name in DisplayTaxonName
* Use RN styling to style grid view for MyObs flatlist
* Fix failing project obs test
* Create separate ToolbarContainer to separate presentation from logic; fix upload count
* Merge main and show onboarding based on user's total obs count
* Fix display taxon name styling and remove header fade on iOS
* Add header text for 0 observations, logged out state
* Update infinite scroll to 50 obs at a time; make loading wheel show faster
* Add uploaded status to toolbar
* Apply bandaid fix to stop Android from crashing on start
* Start adding new icons to MyObs
* Add circular progress; show upload icons at correct times during upload
* Add disabled props for accessibility state
* Fix tests; update snapshots
* Code cleanup
* Code cleanup & add inaturalist icon
* Fix merge conflict and add icon
* Add inaturalist icon
* Fix navigation to obs list and toolbar status when upload completes
* Move showLoginSheet code to MyObsContainer
* Fix toolbar status text
* Sync toolbar with upload status progress
* Clear toolbar after nav
* Tests passing
* Update e2e test
* Target login button in e2e tests
* Fix failing e2e tests with new testID for login button
* Update button snapshot to include new testID
---------
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* Fix double android back button
* Fix double android back button
* Remove back button from certain tab screens
* Remove back button from certain tab screens
* re-add back btn to obs detail
This uses an npm package to convert SVGs into an icon font, allowing us to
not step on each others' toes when adding new icons in branches and
simplifying the icon addition process. It also allows us to track changes to
the icons, and embed them directly as SVGs if we need to.
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* Create tab navigator
* Add add obs button
* lint
* Wire up routes
* Fix login
* Add keys
* Fix delayed state bug
* Lint
* space parens
* Add details to tab nav
* Lint
* re-add back btn
* Rebase off main
* Fix format
* Fix back button
* Remove unused change
* Replace lowercase folder
* I don't know why that is needed
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>