Commit Graph

20 Commits

Author SHA1 Message Date
sepeterson
815e47e533 MOB-1089: more cleanup 2026-01-29 20:56:53 -06:00
sepeterson
a1aa257c12 MOB-1089: rm unnecessary test logic 2026-01-25 14:43:49 -06:00
sepeterson
806a1c6c9a MOB-1089: add some reducer tests 2026-01-19 22:01:06 -06:00
sepeterson
73073ecee7 MOB-1089: add id sheet tests 2026-01-19 21:38:48 -06:00
sepeterson
0baef4ab75 MOB-721: consolidate test files 2026-01-09 09:11:38 -06:00
sepeterson
287cb5b94c MOB-721: fix tests, linting, and some visual bugs 2026-01-07 17:08:19 -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
sepeterson
0d42eab08a MOB-512 edit tests to rm unnecessary code, make consistent with greater test suite, and rm out of scope test 2025-12-08 18:10:32 -06:00
sepeterson
57d5996736 MOB-512 add component test to check for correct savedMatch or obsDetail component 2025-12-03 18:02:28 -06:00
sepeterson
19cb7064a6 MOB-512 minimal unit test fix and prop spreading allowed for tests 2025-11-21 10:12:59 -06:00
Johannes Klein
9c90c2e45f Update react-native to 0.79 (#3051)
* Upgrade helper: package.json

* Upgrade helper: gems

* Upgrade helper: Android

* Update AppDelegate

* Fix error in compiling

* Update package-lock.json

* Update Podfile.lock

* Update package-lock.json

* Update Podfile.lock

* Remove no longer needed mock

* Comment out entire test and not only the expect call

* Most other unit tests use this render helper function that

wraps the component in the entire app.

* Mock react-native exports as esModule

* Update .flowconfig

* Update Gemfile

* Revert "Comment out entire test and not only the expect call"

This reverts commit 8785f81529.
2025-10-01 22:44:14 -05: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
49091f8fc4 Enable React Compiler (#3082)
* Update package.json

* Update package-lock.json

* Enable plugin

* Update package.json

* Update package-lock.json

* Update .eslintrc.js

* Create a new object instead of mutating the existing one

* Update SoundRecorder.js

* Do not mutate prop directly

* Do not mutate store value directly

* Disable compiler for zoom hook

Because it uses reanimated logic, and previous work laid out we should specifically disregard a rule of react here, unsure what to do here for now.

* Move array for tracking results into component

* Disable compiler for StandardCamera

* Do not mutate store value directly

* Disable compiler for FullPageWebView

* Do not mutate route param

* Remove unnecessary check if state is true before setting it to false

* Fix: user might be undefined

* Update reanimated usage with new compiler compliant API

* Fix: taxon might be undefined

* Fix: taxon might be undefined

* Fix: common pitfall of trying to render text outside of Text component

* Update interface

* Add package override

* Update package-lock.json

* Refactor updating of user preferences into User model

* Remove no memo directive from zoom

* Update file imports

* Migrate safeRealmWrite to TS

* Update interface and import path

* Update interface

* Refactor useLocaalObservation hook to not mutate return value of a function that should not be mutated

* Update tests to new return structure

* Remove useSafeRoute hook

We get the same information from error contexts and surrounding documents, and this hook was violating the rules of react by conditionally calling another hook.

* Use optional chaining

* Update TaxonNamesSetting.test.js

* Fix: use optional chaining

* Extend on RNTLs renderHook instead of re-implementing

* Remove unnecessary mock

* Remove unnecessary mock

* Remove unecessary mock

* Remove trailing spaces
2025-09-01 17:06:51 +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
Johannes Klein
85a7385b62 Migrate MatchHeader and imported components/functions to TypeScript (#2890)
* Rename file

* Migrate flow to TS

* Update type

* Update type

* Rename file

* Update useTranslation.ts

* Check if instanceof Error

* Update imports

* Update type

* Rename file

* Migrate translatedRank to TS

* Migrate DisplayTaxonName to TS

* Also accept number for taxonId

* Those types are currently not optional

* Revert "Migrate translatedRank to TS"

This reverts commit c69cc18061.

* Rename taxon.js

* Add interfaces and types

* Remove adding a key to the function param

* Move fetchTaxonAndSave back to original file

* Move interface

* Update import

* Update types

* Rename some variables for clarity

* This is how it currently props down from only HOC

* Update imports

* Rename file

* Add param interface

* Update imports

* Revert "Move fetchTaxonAndSave back to original file"

This reverts commit 981ce228e8.

* Move fetchTaxonAndSave to own file

* Type inference is easiest way for React components

* Rename file

* Remove unused props

* Add types

* Update type

* Infer return type

* Update import

* Add interface

* Rename const and interface

* Update import (Merge conflict)
2025-05-13 11:34:59 +02:00
Amanda Bullington
fd6cd0148d Filter out hidden content from ObsDetails advanced/default activity feeds (#2721)
* Hide comments and ids that are supposed to be hidden on remote/local observations

* Add and fix tests related to hiding content
2025-03-06 15:33:02 -08:00
Amanda Bullington
a25386169b Fix: scroll to activity item in default mode (#2698)
* Minimize the number of rerenders by splitting sheet logic into separate component

* Fix agree sheet

* Fix y offset for scrolling from notifications to activity item
2025-02-25 19:00:23 -08:00
Johannes Klein
aaf4336a9a Few minor UI changes on default mode's ObsDetail screen (#2647)
* Remove FaveButton

* Remove ObsStatus

* Change community string

* Remove status text

* Add text to activity item

* Boolean prop to show this text

* Completely unrelated crash fix for suggestions on obs without photot

* Remove UUID

* Status section

* Update strings

* Move ID to Details

* Show ID explainer only conditionally

* Status section spacing

* Update ActivityItem.test.js
2025-02-06 10:08:19 +01:00
Amanda Bullington
1d340eb558 Feat: redesigned ObsDetails screen in debug mode (#2580)
* Create ObsDetailsDefaultMode and rearrange items on top of screen

* Move activity, details, and more into three different sections instead of tabs

* Styling cleanup; change Activity name to Community

* Fix scroll to activity item from Notifications

* Add ObsDetailsDefaultMode unit tests

* Show kebab menu on other users' observations
2024-12-18 19:24:24 -08:00