* 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.
* 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>
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>
* UploadStatus component
* Added UploadStatus to SharedComponents/index.js
* Change upload complete icon and color
* QualityGradeStatus accessibility labels
* Saved Observation Animation for UploadStatus
* Changed widths of component
* Unit test for UploadStatus
* Unit test and snapshot for UploadStatus
* Update snapshot tests
* Changes requested, accessibility labels for UploadStatus progress, accessibility tests
* Update snapshot tests
* Testing updated snapshot test
* Fix style
* And again
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* 483 create PhotoCount component
* 483 PhotoCount refinement
* 483 add PhotoCount component unit test
* 483 add shadow to PhotoCount component
* Use Body3 component instead of SVG text
* 483 fix unit tests
* Find component by text rather than by ID
* Remove unused test id
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
Somehow many of the icon names in Fontastic were changed. This changes them
back to match what we use on the web and what we use in the main branch of
this repo, with a few exceptions to attempt to make names more consistent.
Also updated the README in the hopes of avoiding situations like this in the
future.
---------
Co-authored-by: Johannes Klein <johannes.t.klein@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
* Add gradient and shadow to add obs button
* lint
* Fix tests
* Rebase main
* Switch drop shadow color
* Move drop shadow style into styles folder
* Remove intermediate View
* Delete getShadowStyle.js
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* Create hold to delete photo interaction
* Delete w/o modal
* Clean code
* move delete back to review
* lint
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* Integrate reusable components into obs details
* Add map to shared component index
* Add map to shared components index
* Fix merge
* Add missing color
* Fix tests and comments
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* Add font weight to Typography elements
* Add Heading5
* Typography snapshot tests
* Add letterSpacing to Heading 4 and 5
* Update Button padding
* Update Button styling
* Add rounded-lg
* Code style and comments
* Add button tests
* Added loading state color to buttons
* Add default color to text
* Use text class name instead
* Change text
* Add non default color text
* Snapshot for icon
* Default text color into button snap
* Update INatIcon.js
* Add Divider component
* Updates to Tabs UI
* Update color
* Add Divider test
* Show underline only when active
* Tabs snapshot
* Update Button UI
* Revert "Update Button UI"
This reverts commit 5361f57dac.
* Update ActivityCount.js
* Get color from theme in buttons
* Use translated string for hints in Tabs snapshots
* Refactor fct args
* Update Tabs
* Remove async
* Use .each in Button test
* Remove comment
* Structuring
* Remove duplicate application of style defaults
* Remove async from Typography
* Add DateDisplay to ObsCard and make first pass at translation strings
* Add failing tests (due to lack of localization) for timeless dates
* WIP: trying to ensure i18next gets initialized before tests run
The remaining test failures might be legit. This probably breaks the actual
app, though.
* Got the rest of the tests working
* Updated tests to assume UTC
* Updated README to advise against using `npx jest` so test runs always have
the env vars we specify in our `npm test` script
* Moved i18next initialization to an explicitly-named file
* Use i18next init function in app
* Fixed up remaining tests
* Added test for non-English localization of date format
* Cleanup
* Made DateDisplay explicitly handle strings not Dates
* Restore skipped localization tests for MyObservations
* Remove duplicative tests from DateDisplay unit test
* Added note to the README about initializing i18next
* Updated change to DateDisplay in main
---------
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* Update .eslintrc.js
* Create index.js
* Change Button usage in GridItem
* Replace imports
* Add strings
* Add hint prop to button
* Add a11y hint prop to EvidenceButton
* Add EvidenceButton to index
* Add a11y props to EvidenceButton
* Update UiLibrary.js
* Add a11y props to CloseButton
* Add CloseButton to index and UiLib
* Rename function
* Update string
* Add a11y props to AddObsButton
* Add Tabs to index
* Linebreak
* Add Typography to index
* Remove unused text
* Refactor UserIcon test coverage in it's own test
* Add UserIcon to index
* Add UserIcon to UiLib
* Add InlineUser to index
* Add Quality badge to index
* Update UiLibrary.js
* Remove unused component
* Change AddObsButton a11y label
* Change hint
* Use consistent uri in snapshots
* Add snapshot to InlineUser
* Fix wrong user key
* Update Tabs.test.js
* Snapshot TODO
* Update NavButton.js
* Update snapshot
* Add snapshot for active user icon
* Remove snapshot result
* Add ActivityCount to index
* Update UiLibrary.js
* Create ActivityCount component and add to UI Library
* Add accessibility label
* Make ActivityCount component compatible with identifications
* Localize numbers; add large number to UI library
* Fix ObsCard tests with waitFor ActivityCount
* Make testID dynamic and optional in ActivityCount
* Incremental changes to navbar component
* Fix tests
* Fix ally tests
* Space parens
* Add box shadow for android
* Add accessibility role
* Add a11y
* lint
* Add basic tests
* Fix tests
* Fix tests
* Update colors
* Merge remote changes
* Lint
* Add more comprehensive test
* Incremental changes to navbar component
* Fix tests
* Fix ally tests
* Space parens
* Add box shadow for android
* Add accessibility role
* Add a11y
* lint
* Add basic tests
* Fix tests
* Fix tests
* Update colors
* Merge remote changes
* Lint
* Add more comprehensive test
* switch to react native paper
* Make explore button nav to explore
* Remove inline styles
* Fix border on android
* Use user icon component in nav bar
* Rename props
* Remove t from nav button
* Change accessibility props
* Use a11y role for tabs
* Update NavBar.js
* Mock route for messages
* Mock route in tests
* Remove not needed function
* Remove NavBar unit test
* Create integration test file
* Add container mock to user profile test
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>