Commit Graph

62 Commits

Author SHA1 Message Date
Amanda Bullington
5ee4a433df Add location picker to ObsEdit (#593)
* 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>
2023-04-26 10:51:05 -07:00
Johannes Klein
1439c40c6a Upgrading the app to react-native 0.71.7 (#592)
* Changes in the unproblematic files

* Remove manually linked react-native-config

* Updates to files because of upgrade

* RN 71 and dependencies packages

* Update snapshot tests

* RN 71.1

* Fix missing jest mock

* RN 71.7

* Missing mock

* Fix errors with apisauce and axios

* Remove react-native-codegen direct dependency

* Code style
2023-04-25 17:18:24 +02:00
Johannes Klein
3a0ff42a0e Dependency upgrades, breaking changes 2023-04-20 17:24:46 +02:00
Angie
8ef2fbb89c 440 activityitem component (#564)
* ActivityItem component main styling, ActivityHeader added Body4

* ActivityItem component, onAgree icon

* Remove console logs

* onAgree prop

* Changes requested, text wrap, styling to match figma

* Add ActivityItem to UILibrary

* onAgree button shows conditionally

* onAgree button shows conditionally

---------

Co-authored-by: Amanda Bullington <albullington@gmail.com>
2023-04-06 13:09:32 -07:00
Ken-ichi Ueda
6386f8d397 v0.1.1+40 2023-03-31 18:55:01 -07:00
Ken-ichi Ueda
bed61aa6b4 v0.1.1+39 2023-03-14 18:19:21 -07:00
Amanda Bullington
bbc5b9d67d MyObservations refactor (#510)
* 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>
2023-03-14 10:54:33 -07:00
Ken-ichi
3320aec7f6 Add icons to repo & use script to generate font (#518)
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>
2023-03-10 12:21:09 -08:00
Ken-ichi
6047a44241 Reverted icon names in Fontastic to match main (mostly) (#511)
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>
2023-03-07 15:01:29 -08:00
Amanda Bullington
829cc77958 Add photo gallery icon (#463)
* Add photo gallery icon; closes #461

* New SVG for gallery
2023-02-10 18:03:12 -08:00
Ken-ichi Ueda
0e043ad3c8 Revert to using react-native-asset to link assets 2023-02-09 20:41:58 -08:00
Amanda Bullington
1caaa595df Add italic Whitney font (#451)
* Add italic Whitney font to tailwind & DisplayTaxonName
* Switch to using className italic instead of fontFamily
2023-02-09 14:55:36 -08:00
Ken-ichi Ueda
44f6410097 Use gradle to integrate custom icon font
Per
https://github.com/oblador/react-native-vector-icons#option-with-gradle-recommended.
This should theoretically keep the font up to date in Android when we update
the font file.
2023-02-07 21:12:41 -05:00
Amanda Bullington
7d39c0f919 UI redesign: Typography components (#402)
* 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
2023-02-01 12:40:25 -08:00
Amanda Bullington
3f125beab6 Framework for adding custom icons to iNatRN (#414)
* 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
2023-01-31 16:45:11 -08:00
Ken-ichi Ueda
5c70783a7e v0.1.1+38 2023-01-23 22:45:41 -08:00
Ken-ichi Ueda
7cd6e4ded2 v0.1.1+37 2023-01-23 21:31:23 -08:00
Amanda Bullington
1857115669 v0.1.1+36; Automate fastlane rollout to internal testers on iOS and Android (#335)
* Add different env files to gitignore; update react-native-config

* Set different staging and production .env files in Android

* Add different envfiles to podfile

* Use podfile to check for .env.production and .env.staging files

* Update README

* Update fastfile to automate distribution/rollout for iOS and Android

* v0.1.1+34

* Tweaks to try to get Android to use production API via Fastlane

* v0.1.1+35

* Point production to .env instead of .env.production

* v0.1.1+36
2023-01-05 10:27:33 -08:00
Amanda Bullington
236904e0a1 Use different .env files for staging and production (#332)
* Add different env files to gitignore; update react-native-config

* Set different staging and production .env files in Android

* Add different envfiles to podfile

* Use podfile to check for .env.production and .env.staging files

* Update README

* Point production to .env instead of .env.production
2023-01-05 10:26:17 -08:00
Amanda Bullington
360a5b2d17 v0.1.1+33 (#330) 2023-01-04 12:04:59 -08:00
Johannes Klein
eb81453e60 Merge branch 'main' into 250-e2e-init 2022-12-13 22:31:58 +01:00
Johannes Klein
8630b78b3b Add basic detox setup for Android tests 2022-12-12 15:22:47 +01:00
Ken-ichi Ueda
53b4bd1dca Updated app icon 2022-12-07 12:11:12 -08:00
Ken-ichi Ueda
9efe9c3901 v0.1.1+32 2022-11-28 21:05:23 -08:00
budowski
4e5481a607 144 import photo exif (#168)
* #144 - when creating new observation, import first photo EXIF data for location + date
* #144 - usePhotoExif - read partial file data; added testing for usePhotoExif hook
* #144 - import photo exif - use our own react-native-exif-reader library + other fixes (not to automatically fetch location, save original uri)
* Do not save original photo URI in DB, only pass it along to obs edit screen for EXIF parsing
* Upgraded testing library version to support renderHook

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2022-11-28 20:58:34 -08:00
Ken-ichi Ueda
7a0e091b9c v0.1.1+31 2022-11-14 14:43:40 -08:00
Ken-ichi Ueda
31c3f6e27a v0.1.1+30 2022-11-14 14:20:51 -08:00
Ken-ichi Ueda
aaedd884b2 v0.1.1+29 2022-11-14 12:12:33 -08:00
Johannes Klein
99d306cd24 Realm 11 (#208)
This also upgrades us to React Native 0.70.4 and adds a number of files that get us ready for the New Architecture.

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2022-11-07 14:13:13 -08:00
Amanda Bullington
f897baf459 Fix for android build in build.gradle (#229) 2022-11-04 18:25:11 -07:00
Ken-ichi Ueda
36a0597284 v0.1.1+28 2022-11-01 09:32:05 -07:00
Ken-ichi Ueda
575ab9391e v0.1.1+27 2022-10-21 12:36:03 -07:00
Amanda Bullington
a07ee979e6 Custom fonts (#192)
* Add Whitney fonts to project
* Use styled components to pass whitney as default font for all app text
* Add header component using Papyrus as default font
* Update realm and add custom font examples for Android

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2022-10-20 15:23:10 -07:00
Merhawit Gubsa
d3eeed7b05 123 permission fetch location (#184)
* add location permission access to android manifest
* request permission to access location for android
* removes location fetching from the observation model and adds it to ObsEdit
* do not fetch location if it is existing observation

Co-authored-by: Merhawit Gubsa <merhawitgubsa@Merhawits-MacBook-Pro.local>
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2022-10-04 13:26:07 -07:00
Ken-ichi Ueda
964924c6b7 v0.1.1+26 2022-09-06 17:05:55 -07:00
Ken-ichi Ueda
d82c339eac v0.1.1+25 2022-08-22 17:16:21 -07:00
Ken-ichi Ueda
40585a4b01 v0.1.1+24 2022-08-16 11:28:08 -07:00
Merhawit Gubsa
29403df5ae Updated windowSoftInputMode for android (#147)
Changed the android:windowSoftInputMode to adjustPan. Closes #109

Co-authored-by: Merhawit Gubsa <merhawitgubsa@Merhawits-MacBook-Pro.local>
2022-08-09 17:16:56 -07:00
Ken-ichi Ueda
c537167b6c v0.1.1+23 2022-08-08 21:38:34 -07:00
Amanda Bullington
3d65b1e294 UI updates to bulk uploader (#128)
* UI updates to photo gallery

* Add filter icons to group photos

* Styling for carets, multiple ObsEdit

* Standardize kebab menu in shared component

* Fix bug in removePhotos; change selection to kebab menu

* Create delete obs dialog which deletes obs from bulk uploader obs edit

* UI tweaks; closes #100

* Add precommit hook to translate strings

* Fix styling for obs edit header; add fonts to xcode

* Fix lint errors

* Add safe area provider to test & app

* Fix tests
2022-07-18 14:44:20 -07:00
Ken-ichi Ueda
dbd39ff605 v0.1.1+22 2022-07-11 15:39:54 -07:00
Ken-ichi
90ff7a59c0 Fastlane setup for tagging, releasing, and internal testing (#118)
Configures fastlane to automate our current release process of making a git tag, making a git release, building, and pushing to the Play Store internal track and Testflight. See README.md for details on setup and usage.

Co-authored-by: Amanda Bullington <albullington@gmail.com>
2022-07-05 18:19:41 -07:00
budowski
0144200e9c Settings Screen (#77)
Gets most of the way toward #27. Blocks, mutes, and some other functionality require API v2 updates. UI needs refinement.
2022-06-09 15:49:22 -07:00
Amanda Bullington
f46d4086ad Save observations, photos, sounds in Realm for upload (#78)
* Break uploader into helper function; add bottom model for uploading from obs list

* Create mapping function for uploading observations to iNat

* Mark observations as uploaded when id is returned from server

* Format dates on obs list

* Save all obs locally before trying to upload

* Resize grouped photo gallery photos for upload

* Resize photos btw group photos screen and obs edit

* Get sound, photo, obs uploads saving to realm and uploading later

* ObsEdit progresses to next or prev screen after one obs is saved locally

* Format date in camera; use time observed to show new local obs in ObsList

* Remove time zone attribute, since this is handled by server

* Submit sound and photo uuids as the file name for sound/photo uploads

* Make obsSounds an array in case there are multiple sounds for upload

* Removing time synced from Photo model bc not sure it's necessary

* Save _synced_at and _created_at time for all remote obs

* Fix back button, obs edit

* Don't show obs edit for unuploaded obs

* Get rid of ObservationProvider, move useObservations hook

* Fix place name; add date/time and location to no evidence uploads

* Add species_guess to observation when taxon_id changes

* Format date from picker; use string for sending to server

* Styling cleanup with react-native-paper; make ObsEdit into section components

* Add vector icons to ios (for searchbar)

* Add empty text to CV suggestions

* Cleanup code for marking records synced & uploading to server

* Use placeholder icons on bottom tab bar

* Add icons to ObsList; fix grid view when photo === null

* Fix jest tests

* Simplify setting an identification in ObsEdit

* Move inline styles to separate files

* Display all relevant saved obs data on ObsDetails; function to check for camel or snake case attributes

* Move logic for creating new sound observation to model, not sound recorder

* Add android vector icons

* Move create obs and create with no evidence into Observation model

* Add mock for react-native-fs

* Show option to edit user obs in ObsDetail; fix captive/geoprivacy/date fields for uploaded obs

* Move obsPhoto creation and obs with obsPhoto creation into models

* Create obs with sound from Obs model

* Create multiple obs from gallery photos; move logic into model

* Pass observation to ObsDetails via navigation to avoid opening and closing realm twice

* Lint error fixes

* Fix jest tests

* Use icons on normal camera

* Use timestamps from gallery and camera for new observations

* Keep simplifying code

* Update version/build number; add key to info.plist for faster ios build

* Remove TranslatedHeadline component

* Move saveLocalObservation logic to model

* Move all FIELDS for api calls into models (except messages, which doesn't have a model yet)

* Only show upload UI if user is logged in

* Fix obs edit link so it works for both logged in and logged out users

* Bug fixes: get fields from models; addListener function in test

* Model code cleanup

* More code cleanup

* Remove unused imports
2022-05-10 14:41:31 -07:00
Amanda Bullington
5b47975443 Update version number 2022-04-11 11:10:43 -07:00
Amanda Bullington
d51760dca5 Bump version number and tweak fastlane setup 2022-04-05 15:51:30 -07:00
Amanda Bullington
b690139fd1 Add fastlane init files in android/ios subdirectories; set up internal and beta testing (#76) 2022-04-05 15:32:16 -07:00
Amanda Bullington
1ebf4b951d Bug fixes from beta 0.0.1 (#75)
* Add exception handler library; fix computer vision results

* Create loggedIn hook to check whether user is logged in before cv suggestions or upload

* Create user profile card on MyObs

* Update packages

* Add text for camera permissions denied

* Remove log

* Upgrade react native on iOS

* Add vendor file for ruby gems to gitignore

* Remove vendor file from github

* Update react native for android

* Add plural example to fluent; create TranslatedText component to render translations

* Add translations and update camera roll screens

* Small changes to uploader flow; add date/time picker

* Separate explore into landing screen and view screen

* Show total number of observations, explore

* Clean up styling and add details for grid view; banner for total observations in explore

* Add checkboxes for status, quality grade, media filters

* Add a lot of explore filters

* Show months in Explore filters

* Create About screen; sync package.json version using react native version

* Get explore filters in mostly working condition

* Observations download after login; clear login screen after nav; closes #62 and #60

* Allow separating photos if at least 1 combined photo obs is selected; closes #68

* Fix auth tests; add user id

* Pop text input above keyboard to address #66

* Lint cleanup

* Create bottom modal for user tapping back button on ObsEdit

* Check permissions on android only, camera

* Keep trying to get android camera working

* Change version number to 0.1.0
2022-04-01 15:46:51 -07:00
Amanda Bullington
78cca57b0d Android permissions (#58)
* Get camera and sound recording working in Android

* Use obs uuid for create observation

* Fix no evidence upload screen; create new obs to upload

* Fix tests and flow errors

* Get photo gallery working on android; fetch more photos on user scroll

* Add alert for upload in progress

* Update build number

* Set up upload key for release build

* Make test todo
2022-03-22 13:07:16 -07:00
Amanda Bullington
4a4bccd28a Make app run on Android (#57)
* Fixes to make the app run on Android

* Update to android gradle.properties

Co-authored-by: Yaron Budowski <budowski@gmail.com>
2022-03-15 18:24:11 -07:00