Commit Graph

29 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
Johannes Klein
bac5d02289 Remove deprecated estimatedItemSize prop 2025-10-28 16:07:17 +01: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
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
budowski
b1719261c2 MOB-665 - group photos - add white background to import observations button (#2834) 2025-04-07 11:59:22 +02:00
Amanda Bullington
d782538109 Advanced settings UI updates (#2797)
* Open more options on long press

* Add tests for long press

* Rearranging Settings screen with new layout

* Add toggle for advanced settings in layout slice; fix default mode toggle

* Update settings with navigation flows

* Fix tests

* Change power mode switch for e2e test

* Fix settings test for green button toggle

* Fix advanced user toggle in e2e test (which hides pivot cards)

* Changes based on design convo; test fixes

* Fix e2e tests

* Follow user flow chart and update nav accordingly

* Rename function

* Fix test

* Can be null so check for false only

* Little less spacing between radio button rows

* Minor UI updates

* Remove check for previous setting in UI

* This is no longer used anywhere

* Update AICamera.test.js

* Update AICamera.test.js

* Update AICamera.test.js

* Update Suggestions.test.js

* Update Settings.test.js

* Update LanguageSettings.test.js

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-03-27 17:36:36 +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
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
Amanda Bullington
2a0918a471 Float action bar relative to sticky toolbar, not bottom of screen (#2213) 2024-10-01 18:06:00 -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
d599b6f9cc Nav user back to Suggestions from ObsEdit (#1699) 2024-06-20 12:26:04 -07:00
Ken-ichi
e31858ebbe Ensure Group Photos sticky toolbar appears above floating action bar (#1600) 2024-05-22 13:31:31 -07:00
Amanda Bullington
d62167e712 Refactor navigation (#1387)
* Separate navigator into two main stacks: tab and no tab

* Organize screen options

* Preserve separate navigator for Login

* Restore login navigation

* Fix navigation/test for advanced users
2024-04-12 10:48:27 -07:00
budowski
940d9c20b1 #781 - Group photos - implement the add button - calling native photo picker (#878) 2023-11-10 14:17:22 -05: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
Amanda Bullington
5913fb511e Energy usage / performance improvements (#844)
* Remove console statements in production build

* Move uploadReducer into separate file

* Create reducer for creating obs; combine reducers

* Fixes with createObsReducer

* Move album, passes test states out of global context

* Bug fixes for ObsEdit flow

* Create photo gallery container

* Set accessibility test todo for PhotoGallery

* Improve FlashList performance MyObs

* Prevent flicker on modal close

* Create less rerenders in MyObservations

* Memoize drawer items for less rerendering

* Memoize custom tab bar

* Remove unused libraries and update snapshot

* Fix and prune dependencies

* Add AddObsModal tests

* Fix e2e test android by making comment confirm button visible
2023-11-02 11:03:48 -07:00
Johannes Klein
5c31cd2e1b Group photos UI (#780)
* Move onboarding into list header

* Use FlashList for group photos list

* Use INatIconButton in GroupPhotos

* Add opacity to disabled INatIconButton

* Calculate number of columns and item width based on screen width

* Refactor of icon button

* Add some padding border to cope with buttons

* Add a plus button to add photos

* Minor style fixes; allow some header options to work with ContextHeader

* Refactor nested ternary

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-09-18 15:03:56 +02:00
Ken-ichi Ueda
01b2ddb4ac Minor text update for GroupPhotos button 2023-06-06 11:49:58 -07:00
Amanda Bullington
5d9f9e89c3 Show correct group photos state (#642)
* Make sure GroupPhotos resets state of what is displayed; closes #636

* Allow user to return to GroupPhotos from ObsEdit; save grouped state in ObsEditProvider for easy cleanup
2023-05-25 10:48:03 -07:00
Chris
5b35e83b5c Utilize floating action bar and sticky toolbar in group photos ui (#527)
* lint

* Fix shadow on fab android

* lint
2023-03-14 12:42:53 -07:00
Ken-ichi
3320aec7f6 Add icons to repo & use script to generate font (#518)
This uses an npm package to convert SVGs into an icon font, allowing us to
not step on each others' toes when adding new icons in branches and
simplifying the icon addition process. It also allows us to track changes to
the icons, and embed them directly as SVGs if we need to.

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-03-10 12:21:09 -08:00
Chris
01099be1ce Create tab navigator (#507)
* Create tab navigator

* Add add obs button

* lint

* Wire up routes

* Fix login

* Add keys

* Fix delayed state bug

* Lint

* space parens

* Add details to tab nav

* Lint

* re-add back btn

* Rebase off main

* Fix format

* Fix back button

* Remove unused change

* Replace lowercase folder

* I don't know why that is needed

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-03-10 14:57:32 +01:00
Chris
6763e161f3 Create custom header (#508)
* Create custom header

* Add right button back

* lint

* Rebase main

* Make required changes

* Add header to ui library

* Remove abs positioning
2023-03-09 11:07:38 -08: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
budowski
4e5481a607 144 import photo exif (#168)
* #144 - when creating new observation, import first photo EXIF data for location + date
* #144 - usePhotoExif - read partial file data; added testing for usePhotoExif hook
* #144 - import photo exif - use our own react-native-exif-reader library + other fixes (not to automatically fetch location, save original uri)
* Do not save original photo URI in DB, only pass it along to obs edit screen for EXIF parsing
* Upgraded testing library version to support renderHook

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2022-11-28 20:58:34 -08:00
Amanda Bullington
a96e379b09 Standardize headers with react navigation (#243)
* Use react navigation header for photo gallery / album picker
* Use react navigation for group photos header
* Use react nav header for Add ID
* Use react navigation header for ObsEdit
* Fix tests by mocking navigation setOptions
* Show all buttons in camera options modal; remove header from StandardCamera
* Only show obs edit header when observations have loaded

Closes #226
2022-11-23 14:09:17 -08:00
Amanda Bullington
b700573327 Fixes for ObsEdit & adding evidence to an existing observation (#220)
* Fix for chosen photos persisting after cancelling new obs, closes #204
* Clear observations when a user backs out of ObsEdit screen
* Add android back handler condition to make sure a user can't back out of ObsEdit & see old observations
* Make sure local observations are properly updated in ObsEdit
* Create subcomponents for ObsEditHeader and AddEvidenceModal
* Fix add evidence functionality; separate ObsEdit into smaller components; rename UploadProvider
* Add disabled check for gallery photos previously selected; fix number of imports in add evidence
* Move fetch location into relevant component; ideally this makes ObsEdit stop rerendering every second
* Fix for android build in build.gradle
* Styling fix for photo gallery grid of images
* Renaming obs to observation, bulk uploader to photo importer, upload provider back to obs edit provider
* Update pods and rename test directory to PhotoImporter

Also closes #218
2022-11-08 12:16:23 -08:00