* Only add zoom options if camera device has the actual physical devices
* Fix mock
* Add mocks to unit test
* Revert "Add mocks to unit test"
This reverts commit 0738d2b115.
* Optional chaining
* Alternative return for match screen in absence of suggestion
* Add lower part text elements
* Add margin at bottom
* Copy code to make a new suggestions scrll for iconic taxa
* Removing not needed properties of the copied code
* Remove log
* Remove width constraints
* Add a state to track selected iconic taxon
* Comment and code style
* Pass prop down to taxa scroll
* Use new props in iconic taxa scroll
* Color border according to selected state
* Use iconic taxon as top ID if none given
* Remove testing code
* Update Match.test.js
* 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>
* Use unrestricted commonAncestorRankType for offline predictions from file
* The plugin provides an interface for this
* Fix type error
* Add missing type
* The iconic taxon is no longer part of the predictions result
If we use common ancestor rollup mode the ancestor taxa are no longer included in the result (which in turn are the top 10 species predictions). So, we have to get the iconic taxon name for each result in a different manner.
* Not needed as results are returned with highest score first
* Remove number wrapper
* Update comment
* There is no special offline not-confident criterion
This now returns common ancestor as top ID in case there is none over the threshold. So, same as online.
* No distinction between debug types
* Update ModelPrediction.js
* This is actually redundant
* Offline suggestions need to be sorted same as online
* Should not have removed the export
* Update comments
* 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
* Update vc plugin
* Update tests with breaking change: combined_score now 0-100
* Frame processor predictions are in range of 0-100 with new key
* Remove offline convert score to confidence
* Update calculateConfidence.js
* Common ancestor should use combine_score
* Offline suggestions have combined_scores now instead of scores
* Change filtering to range 0-100
* Only use combined_score for Match screen
* Update debug data
* Fic typo in tests
* Remove key from type
* 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
* 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
* 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
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.
* Remove default mode from debug mode
* Make sure tests with advanced options are fully out of default mode
* Add two simple tests to make sure correct screens show in default mode
* Show logged out empty observation screen before loading either MyObs screen
* Fix tests
* Fix tests
* Update e2e ios node module caching
* Update caching for node modules
* Modify cache node modules setup for CI
* Revert e2e signIn code
* Update user-facing terminology from gallery to photo library
* Update terminology for devs to make the user-facing change easier to remember
* Update snapshots
* Fix#2572 - New design for MyObservations - default mode, logged out, no observations
* Fixed tests
* Update close onboarding part of e2e tests
* Update sign-in for e2e
* Update loadTranslations.js
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* 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
* 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
* remove assumed and undocumented meaning of page being zero from our use of
useInfiniteScroll in Explore; uses explicit type checks instead
* document byzantine pagination logic in useInfiniteExploreScroll
* fix broken infinite scroll when sorting by faves (was only showing first
page)
The underlying problem from 96c316a was setting initialPageParam to 1 in
useAuthenticatedInfiniteQuery, which seems rational, except
useInfiniteExploreScroll was using a false-ish value of page to detect when
it was requesting its first page. This does the same by being more explicit
about page's type without injecting undocumented meaning into the params we
hand to useInfiniteScroll.
* refactor: move Explore page param munging into unit tested helper
Closes MOB-400
Ensure useAuthenticatedQuery only executes the query when it knows if the user
is signed in or not, and appends that state to the query key so signed in and
signed out results are distinct.
The problem here was that useIconicTaxa was mysteriously returning stale,
signed out results while offline.
Closes MOB-383
* feat: add text labels to bottom tabs
* fix: treat icon and text as single pressable for screen readers in bottom tabs
* feat: float AddObs button outside of bottom tab bar
Closes MOB-254
---------
Co-authored-by: Kirk van Gorkom <55742+kvangork@users.noreply.github.com>
* 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
* Create useSuggestions hook with all online/offline logic for reuse in Match screen
* Show real online/offline suggestions on Match screen
* Code improvements
* Display top suggestion from useSuggestions, not AICamera
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
* Save TaxonPhoto to realm; display taxon on match screen
* Code tweaks
* Add match screen to navigation after AI camera in debug/default mode
* Fix test and refactor
* Fix issue with infinite renders in useLayoutPrefs
* Add functionality for advanced iNaturalist mode
* Fix language settings test by toggling advanced mode on
* Fix e2e tests by adding advanced user toggle
* Fix more tests in Settings with advanced toggle
* 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
* fixes issues where side by side button text is cut off in different languages and large font sizes.
Refactor to use ButtonBar in all places with side by side buttons. Truncates header in ObsEdit when language text exeeds space to not push kebab menu off screen. Closes#2500.
* update snapshots
* clean up BottomButtons.tsx
* Fix#2212 - use physical volume buttons to capture photo
* Fixed tests (mocking VolumeManager)
* Fixed tests (mocking VolumeManager)
* #2212 - physical volume buttons for camera capture - also in AI camera
* #2212 - additional fixes for AI camera
* Update pods
* Update pods
---------
Co-authored-by: Amanda Bullington <albullington@gmail.com>
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).
* 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