Commit Graph

4199 Commits

Author SHA1 Message Date
Chris
b6453c57b5 Fix observation deletion crash (#551)
Ensure requests to fetch observations that are in flight at the time an
observation is deleted to not re-create or overwrite the deleted observation.

Closes #545
2023-03-29 15:21:23 -07:00
Chris
6e133acbeb Use flash list obs page (#553)
* Convert to flash list on my obs page
* Use infinite scroll query

Closes #535
2023-03-29 14:56:17 -07:00
Amanda Bullington
0db7558abb Reverse geocode only when internet is connected (#552)
* Only reverse geocode from fetchPlaceName function; skip geocoding when no internet
* Reverse geocode when internet is reachable; closes #390
2023-03-29 11:47:02 -07:00
Ken-ichi Ueda
4ada127064 Fixed some style changes to ObsStatus 2023-03-28 17:05:30 -07:00
Ken-ichi Ueda
b5c340cf28 Bugfix: signing in w/o an Internet connection was raising an exception 2023-03-28 16:54:45 -07:00
Johannes Klein
ceec694933 489 contributing md (#498)
Add CONTRIBUTING.md
2023-03-21 10:22:56 -07:00
Chris
5385c5404b Implement forced state update to rerender svg content (#550)
* Implement forced state update to rerender svg content

* Fix tests
2023-03-20 15:26:56 -07:00
Amanda Bullington
16e7fa21bd Improve toolbar styling (#547) 2023-03-17 13:54:02 -07:00
Johannes Klein
868c95ee13 494 activity count (#495)
* 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
2023-03-17 11:55:29 -07:00
Johannes Klein
e1e968116c Do not use camera focus if device does not support it 2023-03-17 17:11:17 +01:00
Chris
94ec2de209 530 fix freezing loading spinner (#531)
* Fix freezing loading spinner

* Rebase

* Rebase

* Change from continuous spin to delay

* Change from continuous spin to delay

* Fix rotation
2023-03-17 10:50:03 +01:00
Amanda Bullington
47a34ce113 Replace nullish coalescing assignment (#548) 2023-03-16 17:54:47 -07:00
Amanda Bullington
32245cb526 Fix camera button alignment & add eslint indent rule 2023-03-15 17:26:44 -07:00
Amanda Bullington
1a2b042aa1 Fix nav to Explore screen 2023-03-15 15:58:34 -07:00
Chris
f21ef76cc9 Sync upload button w/ progress (#538)
* Sync upload button to upload progress

* lint

* Set upload progress to zero

* Remove cleanup

* Maintain progress bar
2023-03-15 14:09:30 -07:00
Amanda Bullington
cf2309b936 Rotate camera checkmark in landscape (#536)
* Rotate camera checkmark 90 degrees when device is in landscape; closes #470

* Add rotation to view around IconButton; fix android crash
2023-03-15 13:50:24 -07:00
Chris
c89fc837da add safe area to headers (#537)
* Adjust header margins and safe areas

* Lint
2023-03-15 11:09:44 -07:00
Ken-ichi Ueda
bed61aa6b4 v0.1.1+39 v0.1.1+39 2023-03-14 18:19:21 -07:00
Chris
b87efc5136 Fix stale navigation state issue (#520)
* Fix stale obs activity state

* Fix stale obs activity state

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-03-14 13:22:02 -07:00
Chris
ba937d4a9d Fix shadow on android context header (#528)
* Fix shadow on android context header

* Readd header to ui lib

* Render header left on context header

* lint

---------

Co-authored-by: Amanda Bullington <35536439+albullington@users.noreply.github.com>
2023-03-14 13:00:04 -07:00
Chris
5b35e83b5c Utilize floating action bar and sticky toolbar in group photos ui (#527)
* lint

* Fix shadow on fab android

* lint
2023-03-14 12:42:53 -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
Chris
6408890566 Use ObsPreviewImage for photo gallery and use PhotoCount component (#525)
* Use ObsPreviewImage for photo gallery and use PhotoCount component

* Lint

* Disable gradient

* Fix android border gap

* Lint

* Fix gap bug

* Lint
2023-03-14 13:38:08 +01:00
Chris
4267399d31 Center tab bar icons (#523)
* Center tab bar icons

* Shrink bell icon
2023-03-13 16:46:38 +01:00
Chris
1dfcf308ef Fix double back button android (#521)
* Fix double android back button

* Fix double android back button

* Remove back button from certain tab screens

* Remove back button from certain tab screens

* re-add back btn to obs detail
2023-03-12 14:25:26 +01:00
Chris
da743537bc 501 502 date dispaly location styling (#524)
* Use new icons for date + location display

* lint

* Update new icon in obsdetails
2023-03-12 13:18:45 +01:00
Chris
54479f22b3 Use trash-outline icon (#526) 2023-03-12 12:53:05 +01:00
Johannes Klein
607970d835 Replace icon usage in bottom tab 2023-03-11 11:01:30 +01:00
Johannes Klein
966008dcb7 Add if conditional to the actual e2e test job 2023-03-11 10:56:38 +01: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
Johannes Klein
f8a367ae37 E2e tests also run on pull requests but only when secrets are present (#519)
* E2e action step to test if secrets are given

* Comment out actual build steps

* Revert "Comment out actual build steps"

This reverts commit 02c7dbcb0e.

* Change name

* Update e2e_android.yml

* Run workflows on pull requests

* Remove comment
2023-03-10 18:54:25 +01:00
Chris
01099be1ce Create tab navigator (#507)
* 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>
2023-03-10 14:57:32 +01:00
Chris
6763e161f3 Create custom header (#508)
* Create custom header

* Add right button back

* lint

* Rebase main

* Make required changes

* Add header to ui library

* Remove abs positioning
2023-03-09 11:07:38 -08:00
Angie
fb23d925c4 400 uploadstatus component (#488)
* 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>
2023-03-09 17:49:32 +01:00
Johannes Klein
a771a309ef Change PhotoCount in UiLib 2023-03-09 16:48:42 +01:00
Yahia Jabeur
3342dfa9e2 483 create PhotoCount component (#497)
* 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>
2023-03-09 16:44:45 +01: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
7d63206862 Move sticky toolbar above footer in UI library 2023-03-07 14:48:22 -08:00
Chris
3565bcfe9d 484 - Create sticky toolbar (#506)
* Create sticky toolbar

* Clean up code

* Rebase off main

* Fix shadows
2023-03-07 14:42:44 -08:00
Chris
206934f7ad 471 create camera cancel bottom sheet (#516)
* 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
2023-03-07 11:06:57 -08:00
Chris
66607b0bc8 391 & 466 - Fix shutter effect & remove hidden camera areas (#513)
* Fix shutter effect & remove hidden camera areas

* lint

* Remove uneeded classes
2023-03-06 12:36:53 -08:00
Angie
c3ad393a0d 455 update colors and unify usage in the app (#505)
* Update tailwind colors to match current designs, update PaperProviderColors, unify usage

* Change snapshot test colors to match current design colors

* Added accessibility labels

* Edited accessibility labels

* Remove surface color, unify usage

* Update colors
2023-03-06 11:43:42 -08:00
Angie Ta
9eb031ea0b Fix getShadowStyle import 2023-03-02 16:05:03 -08:00
Chris
cb0a78f906 500 add obs btn styling (#504)
* 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>
2023-03-01 12:02:33 +01:00
Ken-ichi Ueda
6b239807ca Make sure we italicize genera 2023-02-28 21:36:39 -08:00
Chris
0843b96eee Create Floating Action Bar component (#492)
* Create Floating Action Bar component
* Add fn to get shadow stylesheet

Closes #485
2023-02-24 17:31:57 -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
Chris
2c349c3b72 Use i18next Trans component for complex interpolations
Closes #423
2023-02-21 15:35:58 -08:00
Angie
8ce4893625 Merge pull request #490 from inaturalist/469-customize-tailwind-breakpoints
Adding tailwind breakpoints for screens
2023-02-21 00:46:32 -08:00
Johannes Klein
09f61a85f4 Deduplicate string 2023-02-20 21:38:16 +01:00