Commit Graph

50 Commits

Author SHA1 Message Date
Abbey Campbell
5a212adf6e update snapshots 2025-12-01 14:29:50 -08: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
budowski
836438cd1e MOB-752 - use FasterImageView for caching obs/taxon/project images (#2887) 2025-06-26 11:10:01 -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
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
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
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
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
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
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
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
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
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
Ken-ichi
fe0229291e Restore photo deletion (#1789)
* Restore photo deletion
* Rename methods for accessing media files
* Added integration test for photo deletion
* Cleaned up some accessibility labels

Closes #1429
2024-07-10 15:23:53 -07:00
Amanda Bullington
f95e73c27f Default to iconic taxon image in TaxonResult (#1759)
* Show iconic taxon instead of loading wheel in TaxonResult

* Fix tests; closes #1739
2024-07-03 06:54:05 -07:00
Amanda Bullington
aa167c669d Refactor upload functionality into hook/zustand (#1606)
* Refactor upload code into hook and zustand slice

* Create a single source of truth for toolbar and individual progress

* Fix unit tests

* Fix more tests

* Continue trying to simplify upload progress and status code

* Continued overhaul of upload code

* Fix exclamation point in Toolbar

* Fix total toolbar progress

* Fix tests

* Update snapshots

* Code cleanup

* Update MyObs test

* Fix most tests by not deleting realm

* Keep attempting to make toolbar text clear in subsequent tests

* Mock Zustand and reset state after all tests

In theory this should make testing with Zustand simpler. The real kicker is
that resetting state will fail if we're not careful about manually replacing
nested objects in Zustand state updates.

* Bugfix: removeAllFilesFromDirectory works with File objects, not raw paths

* Update status text when uploads canceled

* Only show red exclamation rotating icon after all uploads attempted

* Fix progress bar with zustand nested object

* Fix toolbar progress

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-05-30 20:36:50 -07:00
Amanda Bullington
e19221ddf0 Reduce app size (fonts and model/taxonomy assets) (#1513)
* Remove material community icons

* Remove unneeded font files from app

* Show app size in Debug on Android

* Update snapshots

* Code cleanup
2024-05-08 09:22:01 -07:00
Amanda Bullington
1484bc7749 Display saved photos after app updates (#1468)
* Correctly access local photos in ObsList/MediaViewer after app updates; closes #1420

* Use displayLargePhoto method in masonry layout

* Map bug fix; snapshot fix
2024-04-25 14:52:52 -07:00
Amanda Bullington
73b8f6e5ee Update Typography with latest text styles (#1410)
* Replace Whitney fonts with Lato

* Escape font family names so Lato works on iOS

* Update custom fonts

* Typography file cleanup

* Rename constants to appConstants

* Fix margins in AddObsModal

* Update Typography styles in tailwind config; closes #1398

* Styling fixes for typography

* Update snapshots

* Fix snapshots

* Fix photo count typography

* Code cleanup

* Update Heading2 snapshot
2024-04-17 15:52:13 -07:00
Amanda Bullington
2f94987b4c Whitney -> Lato font (#1407)
* Replace Whitney fonts with Lato

* Escape font family names so Lato works on iOS

* Update custom fonts

* Typography file cleanup

* Rename constants to appConstants

* Fix margins in AddObsModal
2024-04-17 11:30:55 -07:00
Ken-ichi
a7784d7f82 Obs list item media finishing (#1403)
* Started separating UILibrary into components
* move sound photo icons to the bottom corners
* thick border for photoless styles
* altered icon drop shadows per designs
* might have fixed missing multiple photos icon on ObsGridItem
2024-04-16 17:30:14 -07:00
Ken-ichi
fbf93e40d1 Add pre-commit checks for unused i18n keys and used keys not in strings.ftl (#1343)
FYI, this also essentially outlaws variables in translation keys because a key
that is only used with interpolated strings will never appear as "used".

Also starts using a convention of adding info to i18n keys that do not relate
to the text after double dashes, e.g. `Unknown--taxon = Unknown` for a string
that is specifically meant to describe a missing taxon but only needs to have
the word "Unknown".

* Changed several accessibilityHints to 3rd person
* Made several accessibilityLabels shorter and more verb-oriented
* Removed many unused i18n keys
* Refactored variables in i18n keys
* Removed some unused code from the old Settings
2024-04-02 12:17:57 -07:00
Angie
f37f92795b 1221 explore screen icons (#1308)
* Identifiers and Observers icons

* Add icons to explore bottomsheet
2024-03-27 16:21:56 -07:00
Ken-ichi Ueda
b3fbbd799d Minor UI fixes for TaxonDetails explore btn & establishment means 2024-03-07 17:18:25 -08:00
Ken-ichi Ueda
8e77cabedb Forgot updated snapshots 2024-03-07 14:30:06 -08:00
Ken-ichi
6fdf3d2faf Taxon result updates (#1254)
* Only requests remote taxon if local is missing or hasn't been synced in a
  week
* Returns a localized version of the remote taxon immediately without waiting
  to get a newly-created record from realm
* Expands tests to use a unique realm, integrate more of our code, and check
  to ensure the API gets called
* Show indicator while loading taxon on ARCamera
* Show iconic taxon found in model results if we can't load a remote taxon
* Show iconic taxon as backdrop for ObsImage whenever possible
2024-03-05 16:54:42 -08:00
Ken-ichi Ueda
fe883ddfe0 Bugfix: iconic taxon on ObsEdit was looking off 2024-03-01 17:32:37 -08:00
Ken-ichi
0f67a10fe4 Obs grid view updates (#1241)
* Adjust iconic icon size, dark gradient size and breaks for ObsGridItem, hide noevidence when photos
* Layout consistency for upload status
2024-03-01 09:45:10 -08:00
Amanda Bullington
045ce6f789 Improve Jest performance (#1160)
* Use faker import with specific locale

* Add global beforeAll to initiate i18next
2024-02-16 16:17:00 -08:00
Amanda Bullington
3a485f4d4b Load ObsDetails skeleton before observation data is ready (#1116)
* Load ObsDetail screen skeleton and loading wheels before observation is fetched; closes #1091

* Fix e2e test: make sure ActivityIndicator doesn't stay rendered
2024-02-06 17:09:51 -08:00
Amanda Bullington
ededfe82d1 Show ObsStatus in correct position after animating, ObsGridItem (#1099)
* Show ObsStatus in correct position after animating upload; closes #1056

* Update snapshots
2024-01-31 10:06:58 -08:00
Amanda Bullington
51a3d171b2 Limit display taxon name on ObsGridItem (#1042)
* Ellipsize long common name text, ObsGridItem; closes #913

* Update snapshots
2024-01-16 16:52:10 -08:00
Amanda Bullington
21f83d7f58 Only show current ids in IdentificationCount; closes #995 (#1007) 2024-01-09 11:15:41 -08:00
Ken-ichi
f7dc08a704 Suggestions fixes (#972)
* Bugfix: TaxonDetails was crashing if it received a null taxon
* Send lat and lng instead of latitude and longitude to the score_image
  endpoint
* Show offline suggestions when you are offline
* Show notice when viewing offline suggestions
* Moved code unique to useOnlineSuggestions into that file
* Ensure we use a medium size image to get suggestions when dealing with
  remote URLs
* More logging around React Query retries
* Use default retry logic for useAuthenticatedQuery
* Made a module-resolver shortcut for tests
* Move offline notice above top suggestion; hide when offlines exist but onlines do too
2023-12-15 19:58:12 -08:00
Ken-ichi
8119a3e5ca Taxon detail media viewer (#966)
* Access MediaViewer from TaxonDetails
* Added our own presets for ActivityIndicator
* TaxonDetail should show a local taxon if one is available
* Made it a little easier to import the custom logger
* Refactored MediaViewer to accept photo-like objects instead of URIs
* Added license / attribution button to MediaViewer
* Moved delete button into MainPhotoDisplay so each photo has its own button
  and it can be laid out relative to its photo
* Add custom header to MediaViewer when accessed from TaxonDetial
* Allow DisplayTaxonName to accept custom text components as props
* Added darker bg to photo on TaxonDetail to make title more legible
2023-12-14 17:18:41 -08:00
Ken-ichi
0c7c807b56 Realm & other bugfixes (#950)
* Updated faker; fixed bug w/ DisplayTaxonName trying to modify a Realm object
* Fixed crash going from ObsDetail to ObsEdit
* Fixed bug fetching observation dates (not clear how this didn't instantly crash_
* Bugfix: MyObs observation fetch was failing on taxa w/ float rank_level
2023-12-04 13:47:00 -08:00
Amanda Bullington
7de3790230 Performance: move upload reducer out of ObsEditProvider into MyObservationsContainer (#879)
* Move upload functionality into MyObservations, out of ObsEditProvider

* Move upload into helper function

* Fixes for ObsEdit -> MyObs flow

* Progress on making uploads faster

* Update performance test

* Fix toolbar progress

* Fix tests for observation upload flow

* Fixes from code review; fix e2e test for signed in user by bypassing permission gate

* Hide sign up test when keyboard visible; fixes Android e2e test

* Comment out permissions code in e2e test to see if it's only needed locally

* Comment out permissions gate for signed out user iOS

* Use focused hook to stop ObsEdit from rerendering while user is on other screens

* Restore reassure in branch

* e2e code cleanup
2023-11-15 11:40:11 -08:00
Amanda Bullington
1d9adb0f51 More performance improvements (#845)
* 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

* Use callbacks and memoization to cause less rerenders

* Fix tests

* Remove unused code

* Remove log

* Minimize calls to check whether internet is reachable

* Remove unused code
2023-11-06 12:24:31 -08:00
Amanda Bullington
d38720f9b2 Tests & fix for upload progress (#826)
* Add unit tests for Toolbar upload progress

* Tests and improvements to upload progress bars

* Fix tests

* Update type for showsExploreIcon

* Fix tests

* Clear realm before MyObs tests
2023-10-20 16:01:48 -07:00
Amanda Bullington
7d20f6aa81 Suggestions (using server data) (#821)
* UI overhaul for Suggestions

* Updates to suggestions

* Update permissions library and Podfile

* Get tests passing

* Add tests for suggestions

* Update snapshot

* Add comment prompt & box to TaxonSearch

* Add empty state

* Nav and loading fixes

* Add more tests to Suggestions flow

* Fix tests

* Fix tests
2023-10-13 14:46:05 -07:00
Angie
1487e5f421 Accuracy circle and obscuration cell for obsdetail map (#744)
* Obscuration cell and accuracy circle on ObsDetail map
* DetailsMap view
* Copy and share location from DetailsMap
* Patched react-native-maps to address bug with showsUserLocation

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-10-09 12:41:22 -07:00
Ken-ichi
f166131fe5 ObsGridItem layout fixes (#815)
* Fixed layout changes for ObsGriditem
* Added noevidence icon when no photos
* Added a few tests
* Minor cleanup
2023-10-05 11:22:03 -07:00