Commit Graph

4199 Commits

Author SHA1 Message Date
Chris
bcdc7a345c Add ability to select obs preview image (#491)
* Add ability to select obs preview image

* Use Inat icon

* lint

* Make icon smaller

* Change icon dimensions

* Add border radius to theme

* Add ability to select obs preview image

* Use Inat icon

* lint

* Make icon smaller

* Remove empty lines

* Update UiLibrary.js

* Update UiLibrary.js

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-02-20 17:02:11 +01:00
Chris
dafe00bcce 473 Create hold to delete photo interaction (#479)
* Create hold to delete photo interaction

* Delete w/o modal

* Clean code

* move delete back to review

* lint

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-02-20 14:22:10 +01:00
Johannes Klein
000e661ff5 Fix typo 2023-02-17 15:12:06 +01:00
Johannes Klein
f0977a47e6 Cleanup some missing changes from PR486 2023-02-17 14:22:41 +01:00
Chris
4d4ad83e64 432 obs list item 2 (#486)
* 432 obs list item

* Fix gradient

* Merge conflict essential change

* Merge conflict change required

* Fix tests

* Lint

* Make requested changes

* Space params

* Fix projects ui

* lint

* Use it.each

* lint

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-02-17 14:10:33 +01:00
Angie Ta
0fedf41c4f Adding tailwind breakpoints for screens 2023-02-16 16:05:52 -08:00
Chris
e0606a0c20 453 Integrate reusable components into obs details (#478)
* 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>
2023-02-16 18:10:23 +01:00
Johannes Klein
2324182999 Rename test 2023-02-16 15:51:04 +01:00
Amanda Bullington
b25aa6953c Replace SecondaryCTAButton with Appbar; styling updates; closes #452 (#459)
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-02-15 12:54:21 +01:00
Johannes Klein
621c39dfda 415 snapshot testing for UI buttons (#458)
* 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
2023-02-15 11:31:16 +01: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
Angie Ta
092ebb189d Add back inaturalisticons.ttf 2023-02-14 11:55:23 -08:00
Johannes Klein
0848e0f95b Remove unnecessary mocks from integration test 2023-02-14 12:04:58 +01:00
Angie
193b4cb75f Merge pull request #460 from inaturalist/439-activityheader-component
439 activityheader component
2023-02-13 20:20:10 -08:00
Angie Ta
9478467728 Merge branch 'main' into 439-activityheader-component 2023-02-13 20:02:44 -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
Angie Ta
46af16fb0f Change variable name 2023-02-10 13:14:37 -08:00
Angie Ta
6cabd9fdc9 Accessibility flags modal to clear warnings 2023-02-10 12:43:49 -08:00
Angie Ta
fec4ac5061 ActivityHeader icons, cleanup 2023-02-10 01:24:45 -08:00
Angie Ta
d2191892e2 Merge branch 'main' into 439-activityheader-component 2023-02-10 01:02:33 -08:00
Ken-ichi Ueda
0e043ad3c8 Revert to using react-native-asset to link assets 2023-02-09 20:41:58 -08:00
Angie Ta
5df0149c7e Merge branch 'main' into 439-activityheader-component 2023-02-09 18:19:55 -08:00
Angie Ta
987977de00 ActivityHeader component 2023-02-09 18:09:13 -08:00
Ken-ichi
f76e02e4fb Support custom font in UserText (#454) 2023-02-09 15:10:59 -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
Chris
f2ca5fa695 Obs grid item (#450)
Close #436
2023-02-09 14:45:04 -08:00
Johannes Klein
a21c3ae6e1 Add mock for react-native-exception-handler 2023-02-08 10:26:54 +01:00
Ken-ichi Ueda
3bc52a3e7f Minor touch-ups for unique keys and tests not wrapped in act 2023-02-07 23:41:56 -05:00
Chris
885f2e72d8 Location display component (#446)
Closes #438
2023-02-07 23:19:50 -05:00
Chris
4f732bace9 Create taxon name component (#444)
* Create taxon name component
* Switch to classnames

Closes #435
2023-02-07 23:13:27 -05:00
Chris
41e7fb3ff7 Obs status component (#443)
Closes #443
2023-02-07 22:52:58 -05: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
Chris
dc53c47a2a Date display component (#445)
Closes #437
2023-02-07 20:54:59 -05: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
e57aac93f6 418 create an index.js file for importing shared components (#427)
* 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
2023-02-04 15:18:42 +01:00
Chris
70129f8d48 Update copy for observation uploads (#430)
* Update copy for observation uploads

* lint

* Use compass rose icon

* lint

* Fix tests

* Change accessibility label and hint

* Fix translation comment

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-02-04 15:18:08 +01:00
Johannes Klein
4878fe48a4 Change android e2e location (#441)
* Add command to set specific location to emulator

* Skip steps for testing

* Revert "Skip steps for testing"

This reverts commit e2c2897095.

* Revert "Revert "Skip steps for testing""

This reverts commit 193037889c.

* Update e2e_android.yml

* Update e2e_android.yml

* Update e2e_android.yml

* Update e2e_android.yml

* Update e2e_android.yml

* Update e2e_android.yml

* Revert "Revert "Revert "Skip steps for testing"""

This reverts commit 93a9d6c790.
2023-02-04 13:21:22 +01:00
Angie
e14d620992 301 flag id functionality obsdetail (#333)
* Flag Id Modal created.

* Flag item modal radio buttons, styling, cancel button

* Flag Item Modal, Api Flags file created

* Added id field in Identifications realm schema, Flag Item Modal API call

* Clear form, toggle function, click title not just checkbox to toggle

* Fixed android checkbox toggle.

* Clean up. Flag ID ObsDetail. Closes #301.

* Flag realm model, flagged status shown on initial load

* Refresh observation after item flagged. In Progress.

* Remove console logs, add onError

* save button loading spinner

* Realm 31 migration for obsservation updated_at

* Flags test file

* FlagItemModal tests

* FlagItemModal tests

---------

Co-authored-by: Amanda Bullington <albullington@gmail.com>
2023-02-03 13:09:56 -08:00
Amanda Bullington
ba181e75fd Remove warnings about custom icons / Material icons in jest (#429)
* Mock INatPaperProvider to remove warnings about wrong icon names in jest; closes #421

* Remove unnecessary paper provider mock

* Add mocked views back to tests
2023-02-03 08:38:51 -08:00
Amanda Bullington
5bd4fc7ea9 Activity Count component (#426)
* 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
2023-02-03 08:30:40 -08:00
Chris
985defb28a Change progress bar color to inat green (#425) 2023-02-03 12:41:02 +01:00
Chris
158966b74e Fix nearby projects query for android (#406)
* Fix nearby projects query for android

* clean up code

* remove logs

* Fix delay and add loading return data

* Simplify hook

* Make minimal required changes

* Flatten if/elif

* Lint
2023-02-03 12:40:14 +01:00
Chris
44b28ff54e Incremental changes to navbar component (#407)
* Incremental changes to navbar component

* Fix tests

* Fix ally tests

* Space parens

* Add box shadow for android

* Add accessibility role

* Add a11y

* lint

* Add basic tests

* Fix tests

* Fix tests

* Update colors

* Merge remote changes

* Lint

* Add more comprehensive test

* Incremental changes to navbar component

* Fix tests

* Fix ally tests

* Space parens

* Add box shadow for android

* Add accessibility role

* Add a11y

* lint

* Add basic tests

* Fix tests

* Fix tests

* Update colors

* Merge remote changes

* Lint

* Add more comprehensive test

* switch to react native paper

* Make explore button nav to explore

* Remove inline styles

* Fix border on android

* Use user icon component in nav bar

* Rename props

* Remove t from nav button

* Change accessibility props

* Use a11y role for tabs

* Update NavBar.js

* Mock route for messages

* Mock route in tests

* Remove not needed function

* Remove NavBar unit test

* Create integration test file

* Add container mock to user profile test

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-02-03 11:42:55 +01:00
Angie Ta
d2f992924d Fix svg fill color 2023-02-02 15:56:14 -08:00
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