* 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>
* 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
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>
* 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
* Add heading typography components
* Add typography components for body, list, and subheading
* Add font sizes/line heights to tailwind css
* Replace Text components in UI library with new typography; closes#383
* Update pixel size of fonts and use Heading2 throughout UI library
* Remove repeated logic from code
* Fix sizes for typography components
* Add custom iNat icon font to iOS and Android
* Add custom icon to iNat UI library
* Create custom iNat icons using IconButton for add obs modal & footer
* Add icon placeholders to observation edit screen
* Test fixes for accessibility
* Move paper provider into new component; fix names in UI library
* Update README with clarified directions about changing the name of the .ttf file
* Create base inline user component
* make icon closer to spec
* use premade func
* Add unit tests
* Add unsaved changes
* Add unsaved changes
* Change a11y role to get branch to run without errors
* Fix comments
* Lint
* Add nav to user profile
* Move InlineUser in UiLib and use currentUser if true
* Add a11y label and testID
* Add currentUser to UiLib
* Reorder tests
* Rename mock
* Await photos in tests
* Fix order
* Refactor Inline to use UserIcon and add no internet icon
* Update UiLibrary.js
* Test also that unwanted images are not present
* Use InlineUser component in ObsDetail and ActivityItem
* Update UserIcon.js
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* Update Button component with new styling; closes#384
* Change button to Pressable instead of RNPaper to get border to show on Android
* Add disabled buttons to UI library
* Add multiple buttons in row
* Add multiple button examples