Commit Graph

72 Commits

Author SHA1 Message Date
Johannes Klein
3036529323 Switch react-native-fs (#3524)
* Update package.json

* Update package-lock.json

* Update Podfile.lock

* Update PrivacyInfo.xcprivacy

* Update react-native-logs.config.ts

* Update paths.ts

* Update savePhotoToDocumentsDirectory.ts

* Update useAppSize.ts

* Update installData.ts

* Update mlModel.ts

* Update storageMetrics.ts

* Update removeAllFilesFromDirectory.ts

* Update util.ts

* Update removeSyncedFilesFromDirectory.ts

* Update contexts.ts

* Update index.ts

* Update Photo.ts

* Update Sound.js

* Update logManagementHelpers.ts

* Update PhotoLibrary.tsx

* Update flattenUploadParams.ts

* Update shouldFetchObservationLocation.ts

* Update Developer.tsx

* Update vision-camera.js

* Update sentinelFiles.ts

* Move mock

* Switch to unlink util
2026-04-14 00:57:20 +02:00
Ryan Stelly
ad62fc104f Add rozenite controls plugin with ff toggle (#3490)
* add controls rozenite plugin

* refactor rozenite config to useRozenite hook

* add TODO comment for lifting up nav rozenite config

* move rozenite controls from devDeps to deps

* switch ff toggle to use..... a toggle : p

* remove temp code disabling logbox
2026-04-03 14:26:05 -05:00
Johannes Klein
21ea3ea386 Add some TS to our use of react-navigation (#3454)
* Add tsconfig options

Following https://reactnavigation.org/docs/typescript/?config=dynamic

* Add a navigation types file with root stack params list

* Use param list type

* Add root type for creating the navigation container ref

* Add onboarding stack param list

* Migrate OnboardingStackNavigator to TS

* Update param list type

* Update import path

* Add BottomTabParamList

* Add NoBottomTabStackParamList

* Migrate NoBottomTabStackNavigator to TS

* Add param list type

* Type options as const

* Change headerLeft option

According to the documentation (and type) this should either be a function that returns null, or undefined.

* Migrate SharedStackScreens to TS

* Just realized that SharedStack creates it's own stack navigator

* Refactor screenOptions into standalone object

* createNativeStack has not cardStyle option

I am assuming here that contentStyle is what was supposed to be set here without testing this change.

* Use header props type as provided by library

* Add LoginStackParamList

* Migrate LoginStackNavigator to TS

* Use LoginStackParamList

* Type screen options as const

* Migrate TabStackNavigator to TS file

* Add TabStackParamList

* Type screen options as const

* Create type for the bottom tab navigator props

* Use actual values possible only for the initialRouteName

* Refactor base screen options into standalone object

* Refactor debug group screen options as const

* Add missing screen

* Use Log as screen name

Follows current naming standard

* Update Log route params type

* Let function component return type be inferred

* Clean up no longer used screens

These components are not actually used as navigation screens anymore but only as modals that are shown inside of ExploreFilters.

* Type nested root navigators with the NavigatorScreenParams utility

* Move param list

* Specifying default type in the same file (move from existing type file)

https://reactnavigation.org/docs/typescript/?config=dynamic#specifying-default-types-for-usenavigation-link-ref-etc

* Composite first level of screen props

* Second nested level screen params composition

* Update BottomTabParamList to be typed as nested navigators

https://reactnavigation.org/docs/typescript/?config=dynamic#type-checking-screens-and-params-in-nested-navigator

* Make native stack screen props generic

* Two examples of using typed route params

* Use alias import

* Move file to be .ts

* For the two navigators with shared screens, intersect  param type with the shared stack params
2026-03-24 01:13:09 +01:00
Ryan Stelly
793c6bb215 MOB-992 start using rolling daily logs instead of a single append-only (#3433)
* extract non-react log helpers out of custom hook

* git mv useLogs to more appropriate name / location

* update logmgmt imports, clean up getLogs

* git mv Log.js Log.tsx

* remove sharing functionality from log preview screen

* reorganize debug screen w/ headers

* refactor all Debug sections for consistency

* add rolling log config, switch existing logmgmt to 'legacy' var

* factor path out of share/email for legacy wrappers

* add 'legacy' log category in prep for showing new logs

* add legacy flag to log preview screen params

* add useLogPreview for Log screen supporting legacy and aggregated recent rolling logs

* actually support sharing the new logs w/ a tmp file of concatenated recent logs

* delete low value developer screen test

* fix double reverse and handle bad filename
2026-03-17 16:19:18 -05:00
Johannes Klein
3d9f2c3040 Refactor lodash function imports (#3348)
* Change destructured imports to individual imports

* Change full lodash imports to individual function imports

* Remove unused imports

* One more
2026-02-03 18:12:48 +01:00
Ryan Stelly
6c97fa2ca8 MOB-1098 add debug screen option to delete log file (#3325) 2026-01-23 12:21:52 -06:00
Ryan Stelly
7e7c5529fe add zustand slice for feature flags, shared hook, and Debug UI for overriding for test (#3323)
* feature flag toggle checkpoint

* finish slice management and debug UI

* more documentation for feature flags and move debug override impl to debug screen
2026-01-16 22:17:34 -06:00
sepeterson
ca2ecf91b0 MOB-721 merge main 2026-01-15 15:17:43 -06:00
Ryan Stelly
81291455c9 eslint to prefer interface over type where possible in TS definitions (#3322)
* MOB-1045 eslint config to prefer interface in ts

* MOB-1045 enforce eslint rule preferring interfaces in ts
2026-01-14 06:43:01 -06:00
sepeterson
a8deb6f5f3 MOB-721: first pass component consolidation 2026-01-06 19:16:02 -06:00
Ryan Stelly
b78be9243d lint rule & autofix for "trailing comma" (#3299)
* (lint) MOB-1063 enforce trailing commas

* autofix trailing commas

* manually fix newly introduced maxlen violations

* add trailing comma convention to i18n build
2025-12-22 20:17:13 -06:00
Ryan Stelly
4c49e69851 MOB-1039 apply member delimiter style and autofix (#3281) 2025-12-12 14:04:58 -06:00
Ryan Stelly
2e35071a5a more strict type import style (#3265)
* MOB-1058 add consistent-type-specifier-style lint for even more consistency

* MOB-1058 apply consistent-type-specifier-style lint autofix
2025-12-04 20:51:01 -06:00
Ryan Stelly
ca686f3c11 lint config for consistent import style (#3248)
* MOB-1008 add lint config for consistent ts imports

* auto-fix consistent imports

* auto-fix consistent imports

* reapply autofix from latest main

* Extend Props interface from PropsWithChildren

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-11-27 20:21:03 -06:00
Yaron Budowski
9c2facc680 MOB-925 - new designs for add-obs button sheet 2025-11-14 14:19:05 -08:00
Ryan Stelly
fd712f10e2 typescriptify Developer.js and refactor size calculation (#3176)
* typescriptify Developer.js and refactor size calculation

* remove logs

* fix typography component types / spacing, clean up naming

* fix type annotation, unused export, and variable name
2025-11-13 16:43:41 -06:00
Corey Farwell
a43446909c Remove the need to specify TypeScript file extensions in imports (#3094)
* Don't require TS extensions in imports

* Resolve all import extension errors

* Remove file extension from import paths used in mocks

* Remove .d of type definition file paths

* Remove .d of type definition file and import as type

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-09-07 23:41:42 +02:00
Johannes Klein
c0902412fd Allow a logged in user to log in again with password only Debug login button (#3007)
* A button to navigate to login screen

From the debug menu.

* Add TODO

* Allow to log in only the currentUser.login if not null

* Remove TODO
2025-07-08 00:35:20 +02:00
Johannes Klein
895bab8ffa Remove tenth observation pivot card (#2986) 2025-06-27 23:10:45 +02:00
Amanda Bullington
95151e065b Remove unused code and packages, add eslint package for TS, suppress TS errors (#2924) 2025-05-28 17:01:10 -07:00
Amanda Bullington
ed6243b4f9 Fixes for errorContext reporting with test cases 2025-04-08 13:28:15 -07:00
Johannes Klein
98086035da Add pivot card for the tenth observation (#2795)
* Add string

* Add string

* Reorder strings

* Add image

* Add new pivot card to UI lib and my obs list

* String comment

* Rename component for consistency
2025-03-25 10:42:31 +01:00
Johannes Klein
322a7ce327 Change pivot card timing from on second to fifth observation (#2796)
* Replace string

* Rename component
2025-03-25 10:01:00 +01:00
Amanda Bullington
70ffa9112a Make MyObservationsSimple the standard UI across default/advanced mode (#2788)
* Update TypeScript

* Fix some tests with new default MyObservationsSimple

* Show upload toolbar on MyObs advanced

* Update tests for simple mode

* Fix deletions popping back up on MyObs

* Fix e2e test, which also means fixing our deletion process

* Fix useSyncObservations test

* Requested changes to better fit latest designs

* Add tests to check for hidden upload banner
2025-03-20 17:04:31 -07:00
Johannes Klein
57dc1d226e Revert "Add a plus icon button to add all observation types to default mode header (#2734)" (#2754)
This reverts commit 37a9f6d58b.
2025-03-15 10:18:40 +01:00
Johannes Klein
37a9f6d58b Add a plus icon button to add all observation types to default mode header (#2734)
* AddObsButton TS

* Add simple plus icon version of the AddObsButton to my obs list header

* Update imports
2025-03-10 11:52:00 +01:00
Johannes Klein
310f65a515 Fix: pivot cards not closing with X button (#2718)
* Fix typo

* Move button higher in z Axis.
2025-03-06 20:59:45 +01:00
Johannes Klein
ff6a5d690a Add pivot cards and onboarding cards (#2667)
This adds pivot cards to the app.
The cards are shown only once per app install lifetime, as their state being shown is persisted in the zustand store.
The basic idea is, if the triggerCondition of the modal turns true it is shown, if dismissed it is never shown again.
2025-02-19 14:51:37 +01:00
Johannes Klein
574627fb6d During signup check first if an email is taken or not (#2665) 2025-02-14 11:49:37 +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
Johannes Klein
11d262e10e Some signup login flow UI changes (#2645)
* Add title string

* Label for icon button

* Restyle 3rd party sign in section

* Add apple svg icon

* Use apple svg

* Add google icon

* Update strings.ftl

* Partially bold string

* SignUpForm TS

* SignUpConfirmation TS

* Rename signup screens

* SignUpConfirmation TS

* Remove string

* TS fixes

* Button text change

* Remove superfluous margin

* Move two text fields to sign up confirmation

* Revert "Remove superfluous margin"

This reverts commit 6a8fe1e7cf.

* Add TODO

* Remove text under Continue button

* Reorder states

* Close button only on login

* LoginSignupWrapper TS

* SignUp TS

* Remove Learn More screen

* Update text input field label

* Remove email confirmation screen

* Disable button when inputs empty

* Navigate to main after register

* Only show one check box

* Add error component to first signup screen

* Partially italics string

* Remove previous text

* SignUpConfirmationForm TS

* Add a type

* Make exclamation mark appear white

* Example email validation

* Updated Learn More webview title

* Comment out some registration fields from previous checkboxes

* Add comment

* Update Error.tsx

* Set all previously separate checkbox consents to true if the one is checked

* Revert removal of LearnMore screen

* Navigate to Learn More screen

* Update LoginForm.tsx

* Revert "Remove email confirmation screen"

This reverts commit 52c396e411.

* Use pink_flower as background for Learn More screen

* Remove old confirmation screen

* Remove LearnMore demo

* Show translated error text for common errors

* Force dark buttons in signup/login flow screens

* Add text to forgot password page

* Change text input label
2025-02-05 11:36:57 +01: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
5aa16088f5 feat: add a LearnMore screen for use in signup flow (#2610)
Closes MOB-351
2025-01-13 17:57:03 -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
Johannes Klein
df4ff645c5 Get altitude for user location; Add Geo model (#2492)
* Also collect altitude from geolocation calls

* Update geomodel plugin

* Prop user location down into ai camera

* Add geo model file to be linked into xcode project

* Update env.example

* Update env.example

* Add geo model to cv model info file

* Update Developer.js

* Use user location for geo model while frame processing

useGeoModel boolean signals the frame processing plugin to use the geo model as well. It is turned on when we have a location.

* Update README.md

* Geo model is optional

* Adding a dummy neural network called geomodel.placeholder

This model doesn't do anything just returns the input. This is a overhead we could justify in my view as not to spend some more time figuring out how to make a model optional in an Xcode project.

* Geo model files are optional

* Update README.md

* Fix wrong model usage

* Update README.md

* This comment is no longer true

* feat: use full-text index on new _searchableName field (#2487)

Supports searches across non-contiguous tokens, e.g. finding "Mount Diablo
fairy lantern" with a query like "diablo lantern"

Related to #2348

* feat: add pull to refresh on notifications (#2489)

Closes #2349

* 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

* feat: add option to save all observations from batch obs edit (#2493)

* fix: bring KebabMenu in line with designs

Closes #2268

* Update testing instructions

* v0.55.2

* v0.55.2+129

* fix: show observation from external link when Explore filters open (#2453)

* Open observation in app when link is pressed even if modals are open

* Remove comments

* Add comment and reset obsid

* fix: show onboarding content when signed in user has 0 observations (#2510)

Closes #2508

* fix: load new Explore results when filters change (#2507)

URL params got removed from the query key as a part of pull-to-refresh, but
that's how changes to filters were triggering a new request. This restores
that behavior, adds a test to ensure changes to filters call the API again,
and fixes the prior test of pull to refresh which was not testing the
equivalent behavior when pulling to refresh (API on first load, so the mock
needed to be cleared).

* fix: restore observation fetch when focusing on myobs (#2511)

* fix: center number in photo count (#2512)

Closes #2506

* refactor: minor edits for clarity

* fix: specify CV model version in e2e test

Hoping this deflakes the e2e a bit. Not sure why the AICamera test ever worked
without this.

* v0.55.3

* v0.55.3+130

* New Crowdin translations by GitHub Action (#2481)

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

* fix: get quality grade descs closer to designs; add Joanne to staff (#2517)

* fix: prevent BottomSheet title from overflowing over close button

* Update to Geomodel name

* Another name change

* Rename var and const names

* Rename const file references

* Also collect altitude from geolocation calls

* Update geomodel plugin

* Prop user location down into ai camera

* Add geo model file to be linked into xcode project

* Update env.example

* Update env.example

* Add geo model to cv model info file

* Update Developer.js

* Use user location for geo model while frame processing

useGeoModel boolean signals the frame processing plugin to use the geo model as well. It is turned on when we have a location.

* Update README.md

* Geo model is optional

* Adding a dummy neural network called geomodel.placeholder

This model doesn't do anything just returns the input. This is a overhead we could justify in my view as not to spend some more time figuring out how to make a model optional in an Xcode project.

* Geo model files are optional

* Update README.md

* Fix wrong model usage

* Update README.md

* This comment is no longer true

* refactor: minor edits for clarity

* Update to Geomodel name

* Another name change

* Rename var and const names

* Rename const file references

---------

Co-authored-by: Ken-ichi <kenichi.ueda@gmail.com>
Co-authored-by: Angie <angie@inaturalist.org>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-12-05 17:14:28 +01: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
Amanda Bullington
f4dae74fe8 Animate AddObsModal with fade in/out; closes #2350 (#2372) 2024-11-06 15:26:03 -08: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
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
Ken-ichi Ueda
23a6a9d031 fix: remove spacer on ObsEdit
We added the spacer in #2133 to make all of ObsEdit scrollable, but that just
creates whitespace no one can get rid of. This adjusts the button bar so it
is regularly positioned at the bottom.
2024-10-16 16:24:29 -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
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
Amanda Bullington
645be6256d Add toggle button for RTL/LTR on debug screen (#2143)
* Add toggle in Debug mode to either force RTL or LTR

* Reverse back button arrow in RTL mode
2024-09-23 11:18:23 -07:00
Ken-ichi Ueda
bef2a96262 fix: log 429 errors before they get screwed up by failed JSON parsing 2024-09-17 14:42:50 -07:00
Ken-ichi Ueda
34e8679cb5 Try to ensure white bg of SpeciesSeenCheckmark does not bleed 2024-08-26 16:06:08 -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