Commit Graph

455 Commits

Author SHA1 Message Date
Ken-ichi Ueda
b30bb955c8 Re-arrange deck chairs; enable manual trigger for e2e workflows 2023-02-01 22:02:14 -08:00
Angie
d76446bbc6 Merge pull request #424 from inaturalist/397-qualitygradestatus-component
397 qualitygradestatus component
2023-02-01 16:58:17 -08:00
Angie Ta
4d606fbcd2 import cleanup 2023-02-01 15:44:36 -08:00
Chris
4e99ee3526 create view hider component (#412)
* Create view hider component

* Fix logic to be easier to use on consumer side

* Add tests

* Fix errors and tests

---------

Co-authored-by: Amanda Bullington <35536439+albullington@users.noreply.github.com>
Co-authored-by: Amanda Bullington <albullington@gmail.com>
2023-02-01 15:23:16 -08:00
Angie Ta
b71bc274e0 Merge branch 'main' into 397-qualitygradestatus-component 2023-02-01 15:15:45 -08:00
Angie Ta
65331ccf68 Accessibility labels to QualityGradeStatus component 2023-02-01 14:32:13 -08:00
Ken-ichi Ueda
fd9ed26d64 Guess I forgot a line 2023-02-01 14:16:45 -08:00
Ken-ichi Ueda
778a79ba01 Updated ios e2e workflow to use OS-specific npm scripts 2023-02-01 13:44:47 -08:00
Chris
11d05b5b01 Intro work to obs list toolbar redesign (#411)
* Intro work to obs list toolbar redesign

* Replace current upload prompt w/ toolbar

* Fix and skip locale tests

* Add resetting error to cleanup func

* Update icon size

* Make loading bar more accurate

* lint

* Fix file name

* Make requested changes

* Space parens

* Update UserCard.js

* Fix UserCard background color

* Fix navigation to Explore screen

* Small changes, mostly to get LoggedOutCard visible and tests passing

---------

Co-authored-by: Amanda Bullington <35536439+albullington@users.noreply.github.com>
Co-authored-by: Amanda Bullington <albullington@gmail.com>
2023-02-01 13:00:04 -08: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
Ken-ichi Ueda
bd0d0953f7 Adjust test IDs to fix e2e tests 2023-02-01 11:16:22 -08: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
Johannes Klein
1b4039eb36 417 eslint testing (#419)
* Add eslint-plugin-testing-library dependency

* Enable plugin inside tests folder

* Fix errors given by eslint-plugin
2023-02-01 12:50:59 +01:00
Angie Ta
9d18e7a6b2 Merge branch 'main' into 397-qualitygradestatus-component 2023-01-31 20:27:13 -08:00
Angie Ta
4b26a44260 QualityGradeStatus component, replaced QualityBadge, import svg 2023-01-31 19:54:36 -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
budowski
cca053ff39 110 upload sounds and obs separately (#395)
Closes #110

* #110 - upload photos/sounds separately from obs_photos/obs_sounds, using new API v2
* Updated package-lock.json with new version of inaturalistjs

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-01-31 16:35:08 -08:00
Chris
959a61316e Create base inline user component (#410)
* 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>
2023-01-31 21:41:26 +01:00
Chris
769fb124d8 Fix flatlist height in observations view (#409)
* Fix flatlist height in observations view

* Remove uneeded var

* Lint

* Readd parens
2023-01-30 16:36:23 -08:00
Chris
e825cb88c5 Fix overridden border radius (#413)
* Fix overridden border radius

* Extra comma
2023-01-30 10:45:45 +01:00
Johannes Klein
f8c403b9b1 353 retry with jwt (#382)
* Rename some functions and variables

* Rename function

* Revert to original timeout for tokens

* Get JWT for a 401 or 403 http errors in the react-query QueryClient retry handler

* Log API error to new logger

* Fetch token on every render in useApiToken hook

* Remove commented code

* Add comment

* Remove useEffect from useApiToken

* Revert "Remove useEffect from useApiToken"

This reverts commit 9cf1e0c0bc.
2023-01-29 10:09:50 +01:00
Angie
1299aeb014 350 cant tap next from standard camera on ipad in portrait orientation (#386)
* Standard Camera adjust for width when screen orientation changes. Closes #350.
* Remove SafeAreaView from StandardCamera
* Reduced pressable area for camera button
* Lock StandardCamera orientation to portrait mode on smaller devices, detect device rotation
* PhotoCarousel responsive to device rotation, mocks added to StandardCamera tests
* Image rotation when rotation to and from landscape mode
2023-01-27 16:31:28 -08:00
Johannes Klein
14d0239468 308 accessibility tests (#393)
* Regroup accessibility label strings at end of strings file
* Add accessibility test to AddID
* Add a11y labels to AddID
* Add a11y test to StandardCamera
* Add a11y props to StandardCamera
* Remove unit test with only todos
* Add a11y test to Messages
* Refactor PhotoScroll test into own file
* Add a11y test to ObsDetails
* Add a11y test to ObsList
* Add a11y matcher to PhotoGallery test
* Add a11y matcher to ProjectDetails test
* Add a11y matcher to ProjectObservations test
* Add a11y matcher to Projects test
* Add a11y props to ProjectList
* Add a11y props to ProjectTabs
* Add a11y matcher to Search
* Add a11y matcher to UserProfile test
* Add a11y test matcher to UserText test
* Update react-native-accessibility-engine
* Add a11y matcher to Tabs test
* Add a11y label to a selectable photo
* Refactor DataTab tests into separate file
* Refactor ActivityTab test out into own file
* Added a test how to check if a component uses a mocked container
* Add wrong a11y props to TextInput left icon
* Enable a11y test with actual BottomSheet because mock does not pass a11y props down
* Add a11y default props to Button
2023-01-27 12:30:57 -08:00
Johannes Klein
e947b21785 Correct DataTab title testID 2023-01-27 16:40:33 +01:00
Chris
bb4ccb36db 379 Make projects page use tab component (#389)
* 379 Make projects page use tab component

* Fix requested changes

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-01-27 11:05:53 +01:00
Chris
af7d47acf4 380 Make obs detail page use reusable tabs component (#385)
* Make obs detail page use reusable tabs component

* Fix requested changes

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-01-27 10:44:20 +01:00
Johannes Klein
4b36141d5f Update package-lock after updating picker peer dependency 2023-01-27 09:57:06 +01:00
Amanda Bullington
d367ef4f22 Update peer dependency for react native picker select to lock version of picker 2023-01-26 16:15:31 -08:00
Amanda Bullington
4597245b38 Update Button component with new styling (#388)
* 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
2023-01-26 16:05:14 -08:00
Ken-ichi Ueda
b5ceba376a Added UI Library component 2023-01-24 14:06:49 -08:00
Chris
a6762fd863 Create reusable tab components (#345)
* Create reusable tab components

* Add tests, accessibility, and nit changes

* Update a11y state to use expanded instead of selected add a11y role to parent

* Update Tabs.test.js

* Use screen, rearrange test, added expanded state

* Define default prop outside of component

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-01-24 15:04:54 +01:00
Johannes Klein
867baddcab Do not use --legacy-peer-deps for npm in e2e workflows 2023-01-24 10:58:15 +01:00
Ken-ichi Ueda
5c70783a7e v0.1.1+38 v0.1.1+38 2023-01-23 22:45:41 -08:00
Ken-ichi Ueda
05b896a56e Trying to re-fix the react-native-picker-select bug 2023-01-23 22:43:33 -08:00
Ken-ichi Ueda
7cd6e4ded2 v0.1.1+37 v0.1.1+37 2023-01-23 21:31:23 -08:00
Ken-ichi Ueda
0f19faa0cc Test cleanup 2023-01-23 19:05:24 -08:00
Ken-ichi
7a7e6619e7 Fix sign out after force quit in Android (#375)
Removes intentional Realm file deletion to avoid unintentional Realm file deletion, though the latter remains something of a mystery.

* Configure Realm with the full path to the file
* Remove all Realm.open calls in AuthenticationService in favor of passing the
  context/provider copy of realm (only one realm instance)
* Only delete the realm file on sign out if deleting realm contents fails for
  some reason
* Replaced deleteRealm with semantically more accurate clearRealm

Closes #373
2023-01-23 18:34:58 -08:00
Amanda Bullington
08bcdfd589 Catch Android camera tap to focus error (#374)
* Wrap focus errors in try/catch; show focus box immediately with correct coords; closes #355
* Throw errors which are not startFocusAndMetering error

Closes #363

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-01-23 18:32:39 -08:00
Amanda Bullington
0e82f83c50 Bug fix for importing photos to obs without evidence; closes #365 (#381) 2023-01-23 18:30:41 -08:00
Amanda Bullington
6349fb8831 Add double tap to zoom in Camera; update Gesture API (#372)
* Update to newer Gesture.Tap and GestureDetector API; add double tap to zoom
* Update pinch to zoom to use newer Gesture.Pinch API
* Improve zoom by comparing saved value instead of checking velocity to determine zoom in/out
* Wrap focus errors in try/catch; show focus box immediately with correct coords
* Added withTiming to animate tap-to-zoom without animating pinch-to-zoom

Closes #355

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-01-23 18:20:17 -08:00
Ken-ichi
fa46546b44 Use different library for location fetching (#377)
* #369 - use different library for location fetching
* Use @react-native-community/geolocation everywhere, including tests

Co-authored-by: Yaron Budowski <budowski@gmail.com>
2023-01-23 16:50:30 -08:00
Amanda Bullington
5ced128ee9 Trigger system back button from Modal in Android (#378) 2023-01-23 16:09:44 -08:00
Ken-ichi
d8ff78b076 Only mark obs as viewed when an existing mutation is not in flight (#376)
Also changed useAuthenticatedMutation to be more in line with the docs (it was
working, though).
2023-01-23 16:34:49 +01:00
Ken-ichi Ueda
5cab2cad23 Fix Android e2e test by updating react-native-mail 2023-01-20 13:12:40 -08:00
Amanda Bullington
aa0060c21a Add JS and native exceptions (#371)
* Add native and JS exception handlers
* Ignore jsErrorHandler when error undefined; add stacktrace to log file
* Add instructions in comment for testing native exception

Closes #358

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-01-19 13:26:16 -08:00
Amanda Bullington
9544eab730 Email debug logs from About screen; log sign in and sign out (#370)
* Set up logging for user signing in and out
* Set up button to email debug logs in About; closes #357
* Fix bug where signOut called too many times in App; code cleanup
* Add mocks to RNFS to get Auth tests passing
* Add simple test to make sure mailer is called on button press
* Added a file sharing fallback when Mail is not available in iOS
* Rename log extension

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-01-18 10:59:54 -08:00
Ken-ichi Ueda
e993f10a7a Added missing migration for optional Taxon.rank_level 2023-01-17 16:47:36 -08:00
Johannes Klein
7c4d13580f Add JWT_ANONYMOUS_API_SECRET to workflow 2023-01-17 22:58:14 +01:00
Amanda Bullington
a163e82ef8 Create e2e sign in test (#356)
* Add e2e test to log in a test user

* Add config variables to .env.example

* Add e2e user credentials to .env created for workflow

* Fix newline typo in workflow file

* Change ios e2e to run only on push to main as well

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-01-16 17:49:01 +01:00
Chris
81f0971384 Cleanup unsaved changes state after use (#368) 2023-01-16 15:30:05 +01:00