Commit Graph

179 Commits

Author SHA1 Message Date
Johannes Klein
b4516b7b25 Update react native to v0.78.x (#3043)
* Update package.json

* Update package.json

* Updates for native files with upgrade-helpers

* Update .flowconfig

* Update package-lock.json

* Update Podfile.lock

* Add react-dom types

* Update package-lock.json

* Wrong install

* Use types-react-codemod

* Update TaxonSearch.tsx

* Remove react-native-accessibility-engine dependency

This is currently not maintained and not compatible with RN 0.78

* Comment out accessibility tests

* Disable broken snapshot test

* Move broken test

* Move broken test

* Move broken test

* Remove duplicate file

* Move broken tests

* Move broken tests

* Move broken tests

* Move broken tests

* Move broken tests

* Move broken test

* Remove duplicate file

* Move broken tests
2025-08-09 13:47:46 +02:00
Johannes Klein
a618b6e870 Update react-native-testing-library to latest (#3044)
* Update package.json

* Update package-lock.json

* Update

* Update to v13

* Update package-lock.json

* Breaking change: remove extend-expect

* Latest version

* Update package-lock.json

* Breaking change: Removed Accessibility matcher

* Update Suggestions.test.js

* Update DisplayTaxonName.test.js

* Testing the same but differently phrased

* Not really needed to test this

And since not.toHaveTextContent stopped working I just remove it.

* Update useTaxonSearch.test.js

* Move broken tests into folders that are not run

* Only move single tests that are failing

* This does work after all

* Remove only single tests that are broken

* Only move failed tests

* Only move failed tests

* Only move failed tests

* Does not pass on CI only
2025-08-05 13:44:49 +02:00
Johannes Klein
f10188250c Some Flow to Typescript migrations, in simple components (#3034)
* Update Attribution.tsx

* Update FollowButton.tsx

* Update LoginSheet.tsx

* Update UnfollowSheet.tsx

* Update UnfollowSheet.tsx

* Update EstablishmentMeans.tsx

* Update TaxonDetailsTitle.tsx

* Update Taxonomy.tsx

* Update TaxonMapPreview.tsx

* Update FullScreenActivityIndicator.tsx

* Update ActivityIndicator.tsx

* Update SpeciesSeenCheckmark.tsx

* Update Mortal.tsx

* Update HideView.tsx

* Update ConfidenceInterval.tsx

* Update ViewWrapper.tsx

* Update ScrollViewWrapper.tsx

* Update SimpleObservationLocation.tsx

* Update Divider.tsx

* Update DateTimePicker.tsx

* Update MediaNavButtons.tsx

* Update MediaNavButtons.tsx

* Update MediaNavButtons.tsx

* Update DisplayTaxon.tsx

* Update InputField.tsx

* Update InputField.tsx

* Update ObservationLocation.tsx

* Update WarningText.tsx

* Update LoadingIndicator.tsx

* Update CrosshairCircle.tsx

* Update CoordinatesCopiedNotification.tsx

* Update PhotoSharing.tsx

* Update TaxonDetailsMediaViewerHeader.tsx

* Update EvidenceButton.tsx

* Update TextSheet.tsx

* Update Wikipedia.tsx

* Update About.tsx

* Update About.tsx

* Update imports

* Code style
2025-08-01 12:25:46 +02:00
Johannes Klein
f2145dc86d Update react-native-reanimated (#2987)
* Update package.json

* Update package-lock.json

* Update Podfile.lock

* Reactivate snapshot tests

* Update Podfile.lock
2025-06-27 15:29:21 -07:00
Johannes Klein
1f0300db57 Update react native to 0.76.9 (#2974)
* Changes according to the RN upgrade helper

* Update .flowconfig

* Update Gemfile.lock

* Fix typo in minimunSDK version specified

* Disable New Architecture

* Prefer double-quotes

* Update .flowconfig

* Update vision camera patch version number

* Update package-lock.json

* Update Podfile.lock

* Remove no longer needed mock
2025-06-27 14:13:23 -07:00
budowski
836438cd1e MOB-752 - use FasterImageView for caching obs/taxon/project images (#2887) 2025-06-26 11:10:01 -07:00
Johannes Klein
b9b58bdfc4 Update react-native-reanimated to version 3.16.6 (#2957)
* Use updated version

Version 3.16.0 introduces support for RN 0.76. 3.16.7 introduces support vor RN 0.77 so I decided for 3.16.6 for now.

* Update package-lock.json

* Update Podfile.lock

* Update UploadStatus.test.js.snap

* Comment out snapshot tests

* Comment out snapshot tests
2025-06-16 10:56:52 -07:00
Amanda Bullington
bb31c1907b Update react navigation libraries for performance (#2903)
* Update navigators and create util for tabstack navigation

* Changes for react navigation 7

* Refactor to use navigateToTabStack throughout app

* Add comment about unmountOnBlur

* Get all unit tests passing; remove navutils & mock HeaderBackButton

* Fix animation issues in tests

* Temporarily remove parts of tests with back functionality

* Fix tests

* Delete ios/iNaturalistReactNative.xcodeproj/project.pbxproj

* Fix pbxproj

* Code cleanup; minimize unnecessary changes

* Fix tests

* Downgrade react-native-screens to v4.4.0 (#2918)

react-native-screens version 4.5.0 increases the react native version that it supports to 0.74.0+ (https://github.com/software-mansion/react-native-screens/pull/2613/files). So, by using 4.4.0 we are still able to build the app on Android as we are still on 0.73 for now (have tested and it works).
Have not seen any effect on the changes related to the latest react-navigation versions.

* Make requested changes

* Speed up Explore nearby tile loading (#2912)

* Create a performance tracker to show urltile load time in debug mode

* Set default radius to 1km, not 50km

* Code cleanup & TypeScript definitions

* Fix TypeError

* Address eslint error

* Make github actions happy

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>

* New Crowdin translations by GitHub Action (#2920)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* MOB-690 - Add error context to 401 errors (#2921)

* MOB-690 - Add error context to 401 errors

* Add Object.defineProperty like in the other error classes

* Add logger line

* Also throw 401 error if the error object has no response property

---------

Co-authored-by: Yaron Budowski <budowski@gmail.com>

* v1.0.4+164

* Rebase with latest version of RN screens. Remove unused code and packages, add eslint package for TS, suppress TS errors (#2924)

* New Crowdin translations by GitHub Action (#2926)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* New Crowdin translations by GitHub Action (#2929)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* Use 3 separate initial routes for tabs; hide animations on drawer screens

* Fix test

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
Co-authored-by: Ken-ichi <kenichi.ueda@gmail.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Yaron Budowski <budowski@gmail.com>
2025-05-30 09:26:47 -07:00
Angie
cd6d6543f1 Add login button where logout button is on menu (#2891)
* Add login button in menu where the logout button is

* Update snapshots

* Changes to fit design
2025-05-14 10:00:04 -07:00
Amanda Bullington
2be121d1a8 Fade out MyObs checkmark without fading into ObsStatus (#2763)
* Don't fade into ObsStatus in MyObservations

* Update snapshot
2025-03-13 18:33:17 -07:00
Amanda Bullington
d4d29b3aa8 Fix icons for dropdown carets in ObsEdit (#2748)
* Add icon

* Add icon

* Add icon

* Fix triangle dropdowns on ObsEdit other data section

* Update snapshots
2025-03-12 14:53:45 -07:00
Johannes Klein
626fbfd94f Full screen loading state on match screen (#2717)
* Build UI for loading state between AI->Match

* Make designs for AI loading screen match Figma

* Selective changes from bf872e2d4f

* Selective changes from 9ed81f99c7

* Selective changes from 4bc7c3474f

* Selective changes from 4916cf70fb

* Replace loading state from store with props

* Add some types

* Make component agnostic of what skipping does

* Remove debug info

* Add more debug data

* Elongate loading state if online errors out and offline is still loading in sequence

* Remove underline

This classname had no effect as far as I can tell.

* Hide skip button when it has no function

* Remove a comment that slipped through partial cherry-picking

* Split apart online and offline fetch status

Weird but even though they start in sequence it happened to me that online error was received after offline was fetched successfully. So, Let's split apart online and offline loading state.

---------

Co-authored-by: Amanda Bullington <albullington@gmail.com>
2025-03-07 11:50:49 +01:00
Johannes Klein
a44f0412f3 Hide observation status for logged out users on simple MyObs (#2710)
* Show simple my obs header only for logged-in users

* ActivityCount TS

* CommentsCount TS

* IdentificationsCount TS

* ObsStatus TS initial pass not looking at errors

* QualityGradeStatus TS

* Update RealmObservation interface

* Update RealmObservation interface

* ObsUploadStatus TS, plain copy, no errors yet

* Update types

* Update type

* IconicTaxonIcon TS

* ObsImage TS

* PhotoCount TS

* ObsImagePreview TS

* Image is only opaque when logged in

* DateDisplay TS

* Remove debug flag from UploadObsStatus

* Update type

* Prop to hide ObsUploadStatus

* Test observations need those otherwise they appear as needing edit

* Update imports
2025-03-04 09:01:21 +01:00
Johannes Klein
bb03bb695a Change default MyObs layout to grid (#2686)
* Change default MyObs layout to grid

* Rename testID

* Update tests expecting to start with list view

* Reverse order of buttons in layout selector

* Fix layout bug of having empty boxes on explore
2025-02-21 18:50:14 +01:00
Johannes Klein
e2ee6170ea Some camera design changes with using geomodel (#2677)
* Do not show double gap for when no zoom button to show

* Add location-off icon

* Basic location button for camera

* Do not show new button in default mode

* In advanced mode using geomodel is opt-in with the button state

* Basic info box layout

* Add opacity

* Update strings.ftl

* Use location if present

* If no location permission given, show permission gate on pressing use location

* Minor restyle for offline text

* Refactor LocationStatus and add animation

* Update snapshot tests
2025-02-20 11:32:47 +01:00
Amanda Bullington
400f118ad9 Change terminology from gallery to photo library (#2663)
* Update user-facing terminology from gallery to photo library

* Update terminology for devs to make the user-facing change easier to remember

* Update snapshots
2025-02-13 17:11:28 -08:00
Amanda Bullington
3fbb2c470a Prevent cell recycling in FlashList (#2643)
* Create simple taxon grid item and prevent cell recycling for this component

* Code cleanup

* Apply cell recycling fixes to Explore > SpeciesView and ObservationFlashList

* Fix tests; update snapshot
2025-01-29 14:29:29 -08:00
Ken-ichi
736eba5a52 feat: add labels to tab buttons (#2611)
* feat: add text labels to bottom tabs
* fix: treat icon and text as single pressable for screen readers in bottom tabs
* feat: float AddObs button outside of bottom tab bar

Closes MOB-254

---------

Co-authored-by: Kirk van Gorkom <55742+kvangork@users.noreply.github.com>
2025-01-21 11:20:48 -08:00
Ken-ichi
8121e1452c feat: show simplified MyObservations to logged in users (#2616)
* refactor: convert UserIcon to TypeScript
* feat: show simple MyObs to signed in user; add user icon & login to header
* feat: show warning and edit button for unuploaded obs w/o basics
* refactor: consolidate ObsEdit navigation logic
* feat: show edit button with circle dots
* refactor: upload UploadQueuedRotatingIcon to the more reusable CircleDots
  component
* refactor: upload icons to use more composition and fewer specialized, one-off
  components
* fix: bugs in determining if an obs has date and coords
* refactor: extract MyObservationsSimple business logic into container
* refactor: get total obs count from relevant hooks
* feat: show remote species for signed in users
* fix: hide photo count icon when missing basics icon is present
* feat: show banner alerting user when missing location or date

Closes MOB-318
2025-01-17 17:21:29 -08:00
Ken-ichi
75d69f8c74 feat: add simplified MyObservations for logged out users with at least 1 obs (#2599)
Simplified version of MyObs for signed out users with more than 1 obs. Currently only in debug mode.

Also:

* refactor: extract TaxonGridItem into a reusable component
* chore: TypeScript cleanup

Closes MOB-317
2025-01-10 19:48:29 -08:00
Amanda Bullington
40a375dd9f Create text style Subheading2 and apply in Match screen (#2605)
* Add Subheading2 component and apply to Match screen

* Add snapshot test for Subheading2

* Add snapshot
2025-01-09 17:10:26 -08:00
Angie
ce7e91e209 fix side by side button text is cut off in different languages and large font sizes (#2571)
* fixes issues where side by side button text is cut off in different languages and large font sizes.
Refactor to use ButtonBar in all places with side by side buttons. Truncates header in ObsEdit when language text exeeds space to not push kebab menu off screen. Closes #2500.

* update snapshots

* clean up BottomButtons.tsx
2024-12-18 10:56:00 -08:00
budowski
2162f55ac3 Fix #2323 - view taxon observations from explore screen by tapping on taxon (#2554)
* Fix #2323 - view taxon observations from explore screen by tapping on taxon

* Updated test snapshots
2024-12-17 16:30:11 -08:00
Ken-ichi
7f09778a7f fix: center number in photo count (#2512)
Closes #2506
2024-12-03 22:14:13 -08:00
Ken-ichi
7f9a272820 feat: show notifications from others (#2491)
* split notifications into tabs
* lots of TypeScript conversion
* feat: resize Heading5 and add Heading6 (closes #2480)
* fix: mark remote observations as viewed from ObsDetails
* feat: show indicator in Notifications tabs if unviewed notifications

Closes #2451
2024-11-27 23:32:31 -08:00
israr002
c11681f6e0 fix: limit text scaling in PhotoCount (#2235)
Limit text scaling in PhotoCount so it doesn't overflow at large font sizes.

Closes #2131
2024-11-19 16:54:43 -08:00
Angie
04271bef07 Prevent activityheader text and withdraw button from being cut off in smaller screens (#2431)
Also includes adjustments to explore at large font sizes. Closes #2315.
2024-11-15 10:09:37 -08:00
Ken-ichi
b5ed9d0475 feat: show obs on TaxonDetails map (#2399)
* reduce prop surface area for map-related components
* map just receives an observation, not a bunch of its properties
* adjust a lot of logic based on observation.obscured to more specific logic
  based on whether the current user can view the coordinates
* hide the map on ObsDetails if there are no coordinates
* show the spec'd explanation for why coordinates are obscured
* remove a prop that just hides a component if true; that should really be up
  to the outer context
* fixed a bug on ObsDetail where the remote obs wasn't getting mapped to
  Realm-ish attributes
* prevent button mashing from opening multiple TaxonDetails
* clean out the state related obs create / edit after exiting that flow so
  that TaxonDetails (or anyone else trying to detect an obs being edited)
  doesn't end up finding it when the user has finished creating / editing.

Closes #2271
2024-11-11 14:20:14 -08:00
Amanda Bullington
6b391fbb9b Restore queued upload animation & disable press on queued observations (#2397)
* Disable row when upload is queued

* Show UploadQueuedRotatingIcon if obs is in queue with no progress

* Refactoring to make list rendering a little faster

* Fix UploadStatus test

* Fix tests

* Remove outdated snapshot
2024-11-08 15:16:21 -08:00
Amanda Bullington
0916da7787 Remove @ symbol from usernames (#2339)
* Remove @ symbol from user handle

* Remove @ symbol from e2e test

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-11-06 10:03:09 -08:00
Ken-ichi
3dcc833c98 feat: support basic layout, typography, and photo carousel in RTL (#2334)
* Use a wrapper around Text for all typography components that sets
  app-specific defaults, allowing default RTL to work
* feat: make iOS permission prompt text translatable
* fix: allow RTL layout of char limit on text input bottom sheet
* fix: allow RTL photo carousel on ObsDetails and TaxonDetails

Removes react-native-reanimated-carousel, which needs to be patched to support
RTL and maybe wasn't providing anything beyond FlatList for us anyway.

InfoPlist.xcstrings will not be automatically updated on Crowdin sync pending
a Crowdin bug.

Work toward #2099
2024-11-01 12:59:25 -07:00
Johannes Klein
5c8e3be12c test AI camera in e2e (#2188)
* Add a cameraZoomRange default
* Small detox version bump
* Add a mocked camera with a take photo button
* An e2e mock for the computer vision plugin predicting a frame
* Mock taking a photo by loading the first photo from the CameraRoll

Closes #1981
2024-11-01 10:38:37 -07:00
Angie
49bfb78d1b limit button width to 500px (#2335)
* Limit button width to 500px.
Closes #2170.

* Update snapshots
2024-10-31 18:16:38 -07:00
Angie
0cdccddf02 Prevents text in explore species and observation grid view from flowing off grid in large font sizes. (#2330)
* Prevents text in explore species and observation grid view from flowing off grid in large font sizes.
Includes several UI fixes for Explore in large font sizes. Closes #2257.

* Updated snapshots and fixed failing test
2024-10-31 11:46:31 -07:00
Ken-ichi
a76645276e refactor: restore ObsGridItem and ObsListItem UI demos (#2324)
Pulls store interaction up a few levels in the hierarchy to make demos and
tests of upload-related components simpler.
2024-10-29 09:38:57 -07:00
Ken-ichi
464b65c2a5 feat: make username copyable in obs activity headers and on user profile (#2299) 2024-10-25 11:18:58 -07:00
Amanda Bullington
bc817e8b80 Add projects, followers, and following lists via UserProfile (#2300)
Show projects, followers, and following lists via UserProfile
2024-10-24 19:04:42 -07:00
Ken-ichi
9cccdf2f05 Obs list item iconic taxon fix (#2234)
* chore: upgrade fastlane to 2.224.0
* fix: ObsListItem was lacking border around iconic taxon
2024-10-16 19:27:20 -07:00
Amanda Bullington
9cba689a4a Audit and simplify text colors (#2229)
* Change black text to dark gray text

* Start simplifying to a single color scheme

* Remove custom paper theme colors

* More theme cleanup

* Styling specifically for RNPaper components

* Update snapshots to use hex colors, not rbga
2024-10-04 13:37:48 -07:00
Amanda Bullington
bd6bed71ce Simplify bottom sheet component; don't use onChange to close (#2226) 2024-10-03 21:36:17 -07:00
Ken-ichi
a3a43c4e2c g11n audit (#2189)
* chore: validate and normalize translations in addition to src strings
* fix: globalize lat/lng/acc in LocationPicker
* refactor: extract language picker into component
* refactor: globalized text
* feat: added a script to i18ncli called "checkify" that generates
  localization files prepended with a checkmark to help see strings that are
  not globalized
* fix: localize date formatting (closes #1622)

Closes #2102
2024-09-26 22:33:23 -07:00
Amanda Bullington
653340d854 Add infinite scroll to Projects (#2185)
* Implement infinite scroll in Projects

* Styling fixes for empty state in projects; add infinite loading wheel

* Resolve require cycle from ObsFlashList and FlashList shared components

* Order by distance and remove radius for nearby projects fetch

* Code cleanup

* Fix test

* Code cleanup

* Minor tweaks to search API request and results
2024-09-25 11:17:32 -07:00
Amanda Bullington
dfc8fc8983 Support FlashList in RTL mode (#2158)
* Use custom FlashList with auto layout disabled in GroupPhotos

* Fixes for grid view in RTL mode

* Fix styling for PhotoCount in RTL

* Standardize ExploreSearchHeader; use BackButton for RTL support

* Styling fixes for filters search header
2024-09-23 19:08:43 -07:00
Ken-ichi Ueda
842fbe384d fix: reduce gradient shade for MyObs grid view
If you're not going to hide your light under a bunch of text, you might as
well not hide it under a lot of gradient either.
2024-09-20 15:30:52 -07:00
Amanda Bullington
74d81481ff Simplify ObsGridItem view in MyObservations (#2120)
* Only show one taxon name
* Remove comments, IDs, and quality grade
* Memoize grid and list display taxon name components
* fix: remove border on photoless ObsGridItem
* fix: don't show iconic taxon photo for another taxon

Closes #2088

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-09-20 12:43:45 -07:00
Ken-ichi
b81346f623 fix: control max text scaling to allow nav w/ large font sizes (#2129) 2024-09-20 10:42:22 -07:00
Angie
704284b096 Location icon based on obscured state (#1943)
* location icon also based on taxon obscuration

* check for private before obscured

* Update schema ver
2024-08-23 02:23:41 -07:00
budowski
b96051cb02 Internal feedback form (#1992)
Adds internal feedback form that posts to our logging infrastructure.

Also,

* Adds maxLength prop to TextInputSheet w/ UI to show characters remaining
* Adds optional description to TextInputSheet
* Adjusts TextInputSheet input height to fit area left by the keyboard

Closes #1844 

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-08-22 15:12:37 -07:00
Amanda Bullington
5945ccc525 Fixes and error handling for API throttling (#1971)
* Add new error type for 429; remove unnecessary logs

* Batch API calls for SpeciesSeenCheckmark

* Remove SpeciesSeenCheckmark test

* Revert logging errors

* Use Set for observedTaxonIds

* Add comments around logger.info statements

* Merge linting update

* More fixes from code review

* Switch to non-authenticated useQuery for fetching taxon ids seen by X user id

* Fix tests
2024-08-14 22:08:03 -07:00
Amanda Bullington
2ee0f14a2d Unify global shadow styling (#1947)
* Remove shadow from bottom sheets

* Shadow fixes

* Update snapshots
2024-08-09 19:03:19 -07:00