Commit Graph

52 Commits

Author SHA1 Message Date
Johannes Klein
c15b9f5eb5 Explore location screen restyle (#1095)
* Restyle search location explore filter screen

* Update README.md
2024-01-30 12:12:34 +01:00
Ken-ichi Ueda
e1ed1a1284 Updated interal release protocol 2023-12-04 12:35:35 -08:00
Ken-ichi Ueda
13d2df9a0d Updated README to help troubleshoot running e2e when you don't have the right simulator 2023-11-06 11:22:36 -05:00
Johannes Klein
240d74cdfb Update README.md 2023-09-13 14:42:39 +02:00
Ken-ichi Ueda
8b0c7a4f55 Minor pre-release updates
* Updated the README to be more explicit about how to make an internal test
  release
* Added ML model and taxonomy file names to the About screen
* Changed the dirModel and dirTaxonomy exports from cvModel to be modelPath
  and taxonomyPath since they point to files, not directories
2023-08-09 17:54:06 -07:00
Ken-ichi Ueda
393bf767cf Link iOS CV model files in a build phase
iOS bundle files *must* be referenced in the xcode projects, which means that
updating the filenames in .env is not enough, you also have to add them to
the xcode project. This attempts to simplify this by assuming the named files
in the xcode project remain the same, but they are actually hard links to the
files specified in .env.
2023-08-03 21:24:16 -07:00
Ken-ichi
7ae95519ea Iconic taxa icons (#723)
* Added iconic taxa icons; cleaned up some other icon files
* Updated snapshots
* Renamed ban icon to match fontawesome convention we use on the web
2023-07-28 10:22:34 -07:00
Johannes Klein
e140497dde Updated readme 2023-07-19 14:26:17 +02:00
Johannes Klein
b429a1cb4b Update README.md 2023-07-18 20:01:39 +02:00
Johannes Klein
5f81c49f85 ARCamera MVP: Basic screen with full screen camera and prediction labels (#684) 2023-07-15 07:53:18 +02:00
Amanda Bullington
9c6106f5d0 Refactor tests to use minimum viable test factories (#681)
* 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
2023-06-27 17:06:01 -07:00
Ken-ichi Ueda
06b92266ad Null checks for useEffect cleanup functions (closes #678 and #673) 2023-06-23 17:56:44 -07:00
Ken-ichi
9cd48185b6 Update README.md
Added test badges
2023-05-26 12:50:52 -07:00
Ken-ichi
5747d4d1d9 Several minor UI fixes (#572)
* 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
2023-04-17 15:50:39 -07:00
Johannes Klein
ceec694933 489 contributing md (#498)
Add CONTRIBUTING.md
2023-03-21 10:22:56 -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
Johannes Klein
4ecac24e3c Default color for INatIcon component (#493)
* Move INatIcon file
* Create base component for icon
* Add icon to SharedComponents index
* Refactor imports
2023-02-21 16:34:06 -08:00
Amanda Bullington
7a98b6faf1 Timeless dates (#457)
* 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>
2023-02-14 22:14:38 +01:00
Ken-ichi Ueda
0e043ad3c8 Revert to using react-native-asset to link assets 2023-02-09 20:41:58 -08:00
Ken-ichi
09ab2de8d6 Remove eslint rule requiring acc. hint with label and other minor changes (#447)
* Added identification-solid icon
* Used ActivityCount on obs detail to test out label without hint
* Minor fixes to the README
2023-02-07 18:58:28 -05:00
Johannes Klein
7bceb1214b 416 eslint a11y (#420)
* Add eslint-plugin-react-native-a11y dependency

* Do not fix warnings on eslint run

* Change all a11y error rules to warnings for now

* Add a11y hint to Tabs

* Add a11y prop to UserIcon

* Update strings.ftl

* Update strings

* Update README.md

* Update a11y props for InlineUser

* Update a11y label

* Add explanation for strings
2023-02-01 14:12:15 +01: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
5cab2cad23 Fix Android e2e test by updating react-native-mail 2023-01-20 13:12:40 -08:00
Ken-ichi Ueda
87bc63eaeb Updated README to include info about contributing 2023-01-10 19:19:45 -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
Johannes Klein
3834effcc3 Update README.md 2022-12-16 18:10:24 +01:00
Johannes Klein
55dc4183c5 Update readme 2022-12-16 18:06:14 +01:00
Johannes Klein
8b2bc33430 Update README.md 2022-12-12 17:41:05 +01:00
Johannes Klein
89e86f1da9 Update README.md 2022-12-12 16:30:47 +01:00
Johannes Klein
eb1badd233 Update README.md 2022-12-05 17:17:04 +01:00
Johannes Klein
8e75f9327a Update README.md 2022-12-05 16:14:37 +01:00
Johannes Klein
528138bb0a Update README.md 2022-12-05 15:05:21 +01:00
Johannes Klein
60e9653767 Update Readme 2022-12-03 13:14:46 +01:00
Angie Ta
ef4be3b0b4 Updated the README with updated setup instructions. 2022-10-26 14:39:15 -07:00
Angie Ta
3177715142 Updated the README to include updated setup instructions. 2022-10-26 14:31:45 -07:00
Amanda Bullington
c740a06224 Start using Tailwind CSS (#185)
Starts changing styles over to tailwind via nativewind.

* Update node to 16.17.0
* Use styled() to ignore flow errors about className or tw props when styling components with nativewind
* Upgrade realm to make test suite run; set failing test in Explore as todo
* Add workaround for getting pods to run with XCode 14
* Fix for loading remote obs with infinite scroll
* Add styling section to README
* Use IconButton from rn-paper to make buttons more responsive to press
* Add caret next to camera roll album picker
* Fixed broken addition of gallery photos to existing observation
* Removed flatlist from scrollview on ProjectDetails (apparently not allowed?)
* Moved border style from Image to container in PhotoCarousel (border color
  not allowed for images?)

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2022-10-19 17:15:55 -07:00
Amanda Bullington
d892d755a7 Use React Query to simplify API requests (#166)
* Start using React Query to make remote data requests
* Renaming, standardized error handling from API calls, moving code
* Fixed messages test; changed useQuery mocking approach
* React Query should only retry for network issues
* Tried using useAuthenticatedRequest on TaxonDetail
* Clear the React Query cache on sign out

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2022-09-01 18:43:52 -07:00
Ken-ichi Ueda
c453e1a52c Added some setup requirements to the README 2022-08-01 16:53:56 -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
Ken-ichi
09ed361d02 Camera and gallery now display after granting permission (#79)
* Camera and gallery now display after granting permission

Previously these were not quite working because the usePhotos hook was asking
for a permission, so if that was used anywhere in conjunction with another
permission request, one or both success promises never got executed. This
commit tries to solve that with a PermissionGate component that takes a
permission as a prop, asks for it if not granted, then renders its children
when granted. If not granted, it renders a message saying that the permission
is required to use the feature.

Other stuff

* Added `env.example` so people know how to populate `.env`
* Added the `intl-pluralrules` polyfill to support pluralization with i18next
* Skip some token granting logic if the user is not logged in
* Trim whitespace from username/email before auth
* Some minor UI changes to auth form so I know where to tap
* Test fixes

* Use a full screen view for children of PermissionGate

* Globalized text on PermissionGate
2022-04-27 12:36:03 -07:00
Amanda Bullington
5caaf58c0b Merge login changes for staging server (#49)
* Override base URL for AuthenticationService + some integration fixes for Android

* Update lock file

* Trying to get staging JWT working; allow navigation from Login screen

* Code cleanup

* More code cleanup

* Fix tests; set username

Co-authored-by: Yaron Budowski <budowski@gmail.com>
2022-02-15 12:51:13 -08:00
Amanda Bullington
03392f7da3 Merge login into main 2022-02-07 11:43:51 -08:00
Yaron Budowski
2947bb6514 Merged; fixed issue with installCoreFunctions; tests to AuthenticationService 2022-01-30 23:47:42 +01:00
Ken-ichi
9ea8bf7070 i18n with Fluent and i18next (#40)
* Support localization with i18next and Fluent

* src/i18n/strings.ftl holds all application strings. If you're going to add a
  string, add it there
* src/i18n/l10n/ has all the translations (or localizations), both .ftl files
  in Fluent format and .ftl.json files in which the file structure is JSON
  but the values are Fluent strings
* src/i18n/i18ncli.js is a CLI tool to generate files and code given
  localizations in .ftl files

So the process for adding strings looks like

1. Update src/i18n/strings.ftl
2. Add strings to code using the useTranslation hook
3. Run `node src/i18n/i18ncli.js ftl2json`
4. Build

* Set up for use with Crowdin CLI or github integration

* Added some example strings that might not change

* Expanded README to explain how to add new text
2022-01-24 12:02:44 -08:00
Yaron Budowski
4f855834cd Sign up / login flow - initial implementation 2021-12-13 15:34:13 +01:00
Amanda Bullington
e206970c8c Pre-commit hooks; Realm updates
* Move realm object creation functions into realm classes

* Make all fields except for uuids optional in realm & update schemaVersion

* Add pre-commit hooks for linting

* Add eslint automatic fix line

* Testing pre-commit hook

* Still testing

* Tweak husky settings and remove lint-staged

* Add a Taxon realm shared by Observation and Identification; add listener for obs list changes

* Create new User realm model for Comments/Identifications

* Remove code comments from models

* Add loading wheel while ObsList is fetching initial data

* Move observations into stack within drawer navigator

* Remove unneeded code

* Look up existing obs using .objectForPrimaryKey method

* More code cleanup (naming, adding primary keys, etc.)

* Merge testing code from main; remove unused imports

* Add more factories and fix ObsCard tests

* Update tests to match updated realm models

* Move ObservationProvider to wrap MyObservationsStackNavigator instead of all navigation

* Remove code comments

* Add primary keys to User and Taxon schemas

* Update realm models to include ObservationPhotos

* Get integration test to pass with new realm schemas
2021-11-24 15:48:14 -08:00
Ken-ichi
523da746f2 Several updates to testing (#17)
* Several updates to testing

* Restructured tests so they are in their own dir at the root
* Added an integration test that mocks the response from inaturalistjs
* Instead of mocking Realm, I mocked the Realm config so it writes to an
  in-memory database for tests
* Added test data factories with factoria and faker

TODO
* Try mocking hooks to make a unit tests for the ObsList component; it should
  be possible to write unit tests for components with hooks
* Data in the in-memory Realm db is probably sticking around between tests; we
  need a way to trash the db after each test

* Tried to address logbox failure in Github Actions test run

* Tried bumping the timeout for tests for github actions

* Added skip duplicates and Slack notification to test action

* Added unit test for ObsList

* Seriously, how much time do you need to run a test...

* Added missing factory import

* Test fixes for context & providers

* DRY out ObsList.test.js a bit

* Made ObsList.test.js synchronous

In theory I suspect all component tests should be synchronous because if
you've mocked out all the hooks, there should be no reason to wait for
effects to complete.

Also removed subscriptionRef which didn't seem to be doing anything.
2021-11-19 13:53:44 -08:00
Amanda Bullington
493ff99b30 Add install details to README 2021-11-11 17:22:19 -08:00
Amanda Bullington
845004b0df Update README.md 2021-11-04 11:35:21 -07:00