Commit Graph

16 Commits

Author SHA1 Message Date
Abbey Campbell
a84d2fb6d3 autofix array type definitions 2025-12-22 18:26:38 -08: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
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
Ken-ichi
7e960d9010 feat: display time zones and times in time zones (#2636)
* fix: show observation datetime in the obs time zone

I.e. it doesn't offset the observation datetime into the viewer's time zone.

* test: adjust to literal times by default

* chore: update to date-fns 3.0

* wip: show time zone names with all times

* show time zone name whenever a time zone is passed to a formatting function
* store observation IANA time zone in Realm

Note that this required patching around a bug in Hermes in which it should be
returning a GMT offset for the short time zone but is instead just returning
GMT.

* fix: omit time zone for unuploaded obs

* feat: show relative time differences on ActivityItem headers

* fix: hide zone/offset on ObsEdit before upload when signed in

* fix: hide clock icon in activity item header in new default mode

Also

* stop using checkCamelAndSnakeCase when not necessary in DetailsTab.js
* make POJO types only refer to other POJO types
2025-01-31 23:22:55 +01:00
Ken-ichi
7ec14e9e78 fix: fill ObsEdit BottomBar with Save button when logged out (#2597)
* chore: TypeScript and style fixes
* fix: fill ObsEdit BottomBar with Save button when logged out
2025-01-08 11:00:07 -08: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
Johannes Klein
6f8f2ea926 1953 suggestion logged out (#2163)
* TaxonResult TS

* Suggestion TS

* Do not show checkmark for logged out online suggestions

* Update strings.ftl

* From suggestions show bottom sheet on taxon detail

* Refactor updateTaxon

* Add text

* Another text

* Two more texts

* Fix import

* Function stubs

* Use a bulleted text list

* Restyle entire bottom sheet

* Code reorder

* Refactor saveObservation function

* Navigate to login screen for Upload now button

* Add key

* Save obs on press and nav to list

* Code style

* Get updated currentObservation immediately to pass to saveObservation

* Test AICamera with current user

* Show the bottom sheet only for logged out users

* Mock useCurrentUser hook

* Mock useCurrentUser hook

* Mock user

* Mock user
2024-09-25 12:56:32 +02:00
Amanda Bullington
23baf5e207 Update exif-reader library (#2052)
* Update exif-reader library and don't convert to local timezone in this repo

* Use github tag for exif-reader
2024-09-09 15:12:55 -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
budowski
fac15eb1e6 Use latest react-native-exif-reader package version; use writeLocation instead of writeExif (#1268)
* Use latest react-native-exif-reader package version; use writeLocation instead of writeExif
* Use react-native-exif-reader v0.4.0
2024-05-21 13:58:42 -07:00
Ken-ichi
059c4ab8c4 Return to ObsEdit after taking additional photo (#1555)
* Renamed parseExif test
* Bugfix: could not import photo w/o exif from ObsEdit for new obs
* Ensure Camera screen is pushed onto stack from ObsEdit
2024-05-15 13:22:48 -07:00
budowski
26701312de Try to fill out missing metadata using all photos in an obs
* when importing photos, try to fill out EXIF data (location+date) from all photos, by order
* handle cases of adding photos to existing unsynced obs

Closes #1093
2024-02-23 18:34:30 -08:00
Ken-ichi
f8c370394d Bugfix: ObsEdit was blank after importing several photos (#868)
The problem seemed to be reverse geocoding the coordinates for each
observation before moving on to ObsEdit, i.e. when that threw an exception it
kind of silently cause Promise.all not to resolve... which is not supposed to
happen for a few reasons, foremost among them that we were catching the error
and returning null instead. So I'm still confused about why exactly this was
happening.

Regardless, geocoding is potentially slow and buggy, so IMO it's better to do
it on ObsEdit than in the provider, and only do it when we need it, i.e. when
the user is actually looking at the obs.

Some other minor changes

* Show loading indicator on GroupPhotos button while creating obs
* fetchPlaceName performs a null check on coords before making a network
  request to test connectivity
* More precise error handling
* Removed some redundant await statements
* Mocked react-native-geocoder-reborn in tests

Closes #857
2023-11-08 10:29:46 -05:00
budowski
ef9a06f5eb #392 - Write photos taken via the app into the camera roll and update their location metadata (#496)
Writes photos out to external storage at capture time, and updates GPS EXIF fields when observation is saved. Closes #392. There is a known bug in Android causing landscape photos to be inverted.

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-06-09 18:04:17 -07:00
Amanda Bullington
2412b8dde0 Ensure observed_on_string is actually a string for upload (#316)
* Format exif date as string for upload; remove unused code for handling evidence upload errors; closes #311

* Fix tests; add a new test to check for string formatting
2022-12-29 13:03:02 -08:00
Amanda Bullington
5061812b89 Fix: observed on date in ObsEdit (#286)
* Fix exif test

* Make sure camera/no evidence still create a new observed_on_string

* Fix failing test with observed_on_string in fake LocalObs; closes #259

* Parse date into local timezone
2022-12-16 10:13:15 -08:00