Commit Graph

1613 Commits

Author SHA1 Message Date
Kirk van Gorkom
9d767204ff Add simple mode to ObsDetailsDefaultMode 2025-03-04 16:54:35 -08:00
Kirk van Gorkom
d0879ac6e6 Adjust map height to 200px
Matches Figma for default mode
2025-03-04 16:32:06 -08:00
Johannes Klein
7408e81733 Show congratulatory text based on rank and score (#2712)
* Add strings

* Add more congratulatory texts
2025-03-04 17:23:15 +01:00
Johannes Klein
271d0bd856 Add higher rank mode unrestricted to offline suggestions (#2711)
* 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
2025-03-04 16:37:14 +01:00
Angie
25d0ac7e22 Removes location picker from match screen, fetches user location and reload suggestions (#2703)
* Removes location picker from match screen, fetches user location and reloads suggestions instead

* fix variable name

* Remove unused prop

* changes requested, changes to fetching place guess, changes to refetch offline

* Close permission gate when permissions denied initially

* change toggle to set in reducer

* add optional chaining to location values

* Add optional chaining for place name

* Closing on initial block optional

The function of closing the permission gate on pressing the initial block button was as far as I can see only scoped to the Match container.

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-03-04 12:22:10 +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
Kirk van Gorkom
daa4b5bccf Merge pull request #2707 from inaturalist/mob-373-offline-suggestions-should-have-parity-with-online
Offline suggestions should have parity with online
2025-03-03 19:39:16 -08:00
Kirk van Gorkom
8d86e411e0 Fix property naming between online/offline
Snakes and camels.
2025-03-03 17:47:27 -08:00
Johannes Klein
97269260a4 Comment out Welcome back pivot card (#2708) 2025-03-03 21:12:13 +01:00
Kirk van Gorkom
c2e1249a39 Remove early rank filtering of offline suggestions
This is likely no longer necessary now that offline scoring is based on common ancestor rollup instead of best branch. If we want to have a rank ceiling, it can be in filterSuggestions or at the UI level, applying both to offline and vision api results.
2025-03-02 23:47:21 -08:00
Kirk van Gorkom
2c8d4d3e9f Remap score to combined_score for common ancestor in prediction results
Duplicative with existing change in MOB-513’s confidence calculation fix, but makes a combined score available for sorting or filtering.
2025-03-02 23:43:01 -08:00
Kirk van Gorkom
cff703fbfe Use commonAncestor from offline model
Closes MOB-373

Change the schema of offline predictions to include results array and seaprate commonAncestor, matching vision api responses.

Configure offline image predictions to set common ancestor mode.
2025-03-02 23:40:47 -08:00
Kirk van Gorkom
960ed4fabe Return null to help us visibly diagnose missing scores; update comment after debugging.
Part of MOB-513
2025-03-02 01:19:45 -08:00
Kirk van Gorkom
6918849cc8 Patch confidence calculation crash by handling both score and combined_score 2025-02-28 22:23:47 -08:00
Kirk van Gorkom
f0e0f7ca3d Revert "Patch confidence calculation crash by handling both score and combined_score"
This reverts commit 4bab4b222d.

Didn't catch an error when trying to change to a new branch, accidentally committed and pushed to main.
2025-02-28 22:16:44 -08:00
Kirk van Gorkom
4bab4b222d Patch confidence calculation crash by handling both score and combined_score 2025-02-28 22:13:58 -08:00
Johannes Klein
6b018345ac Small cleanup for frame processor predictions (#2702)
* Remove unused fields taken from frame processor predictions

* Remove unused field from e2e test
2025-02-28 20:52:38 +01:00
Johannes Klein
12c2e0e8ea Update vision-camera-plugin; breaking changes (#2701)
* 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
2025-02-28 14:21:01 +01:00
Johannes Klein
360a63cdbe Photo similarity representative photo result sent to taxon details (#2699)
* A key like this does not exist because we don't save rep Photo to realm

* Show rep photo on suggestions

* Add comment

* Update types.d.ts

* Move code around

* Send rep photo ID to taxon result

* Send rep photo to taxon result

* Add white background to box on taxon details

Closes MOB-491

* Comments

* Only send ID around and move photo to top

* Send first photo id also from match screen

* If rep photo is of same taxon, only send ID, else send entire photo to taxon details

* Refactor taxon image

* Updated realm types

* If rep photo is of other taxon send entire object

* Create copy of realm taxon

Avoids an error "object has been invalidated and deleted" which I didn't have tome to track down.
2025-02-27 15:20:06 +01:00
Amanda Bullington
e2b8adbfa0 Fix: login screen scroll to input field (#2700)
* Hide header & footer but show input fields when keyboard pops up on Login screen

* Scroll to username when keyboard pops up

* Reset scroll on focus of login screen

* Code cleanup

* Fix scrollview taps
2025-02-26 17:18:19 -08:00
Johannes Klein
83bb3a88a6 Setting to control if screen after camera/library is suggestions (#2695) 2025-02-26 07:30:50 +01: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
4c7c41d3cf There might be a 4th photo displayed behind match map (#2691) 2025-02-23 11:10:41 +01:00
Amanda Bullington
245130f5ac Tapping an observation navigates to ObsDetails in default mode (#2692) 2025-02-21 21:23:13 -08:00
Amanda Bullington
42e9b6bb2e Remove binoculars from Explore SpeciesView (#2689)
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-02-21 15:02:39 -08:00
Amanda Bullington
18af8a4918 Add upload banner to SimpleMyObservations (#2688)
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-02-21 15:02:25 -08:00
Ken-ichi
b52541fa74 New Crowdin translations by GitHub Action (#2646)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-02-21 21:03:55 +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
002d3615b8 Changing to Advanced Mode should set the Observation Button setting to "All Observation Options" (#2687)
* Changing to Advanced Mode should set the Observation Button setting to "All Observation Options"

* Fix test
2025-02-21 14:40:16 +01:00
Johannes Klein
34e8c54dc7 Fix bug in showing notification onboarding modal shortly before data is loaded
Also a minor UI restyle of the close button taking safe area into account (e.g. notches).
2025-02-21 12:15:11 +01:00
Johannes Klein
66e03cec64 Add dotted empty boxes to fill up observation grid (#2684) 2025-02-21 11:15:55 +01:00
Johannes Klein
0e6a0a3900 Fix wrong order of showing results (#2683) 2025-02-21 09:45:11 +01:00
Johannes Klein
cbf9c1b24d For online suggestions, setting common ancestor rank limit to Kingdom, in unrestricted mode (#2681) 2025-02-21 08:25:42 +01:00
Amanda Bullington
015c27ef06 Fix: sharing into the app (#2680)
* Fix sharing into the app

* Revert useShare, then improve performance so e2e tests still pass
2025-02-20 17:08:08 -08:00
Amanda Bullington
db5221d821 Persist number of observations/species for StatTab in zustand/mmkv storage (#2682) 2025-02-20 16:22:29 -08:00
Johannes Klein
7660de73a8 Show user info on logged-in my obs empty (#2678)
* Rename MyObsEmptyLoggedOut because it will have a logged in state as well

* Add a copy of InlineUser for headers

* Prop in currentUser and isConnected

* Use HeaderUser on empty my obs

* Adjust top position based on safe area insets

* Also use HeaderUser for MyObsList

* Refactor User components to use a base component

* npm calls for separate tests

* Revert "npm calls for separate tests"

This reverts commit 6317e0eda5.
2025-02-20 15:44:36 +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
Angie
fa0e78df10 don't show Add Location as place name in match screen (#2664)
Instead if an observation on the match screen has no location this text say "Observed at" and shows only the date there.
2025-02-20 10:22:03 +01:00
Amanda Bullington
750e1fa9a9 Fix: show loading wheel after login on MyObs (#2671)
* Keep showing loading wheel when remote obs are still being stored in realm

* Fix tests
2025-02-19 19:55:42 -08:00
Amanda Bullington
0a7ae03832 Fix attempt: Signal 11 crash on install (#2676)
* Split up all the custom hooks in App.js; begin to only run things when they're needed

* Code cleanup
2025-02-19 19:18:08 -08:00
Johannes Klein
9d92eac03f Adapt Match screen layout depending on number of taxon photos to display (#2675) 2025-02-19 18:39:14 +01:00
Johannes Klein
f396e887cc Change taxon details header to be Heading3 (#2674) 2025-02-19 16:24:05 +01:00
Johannes Klein
08910a13bf Include taxon photo similarity parameter when making online vision api requests for the match screen (#2673)
* Include search for representative photos

* Request representative photo as a taxon field

* Show representative photo if given for alternative suggestions

* Add comment

* Use representative photo of top suggestion in photos section
2025-02-19 15:28:02 +01:00
Johannes Klein
24e5c9c3ee Add margin for "Add location" button on bottom of match screen 2025-02-19 15:14:14 +01:00
Johannes Klein
ff6a5d690a Add pivot cards and onboarding cards (#2667)
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.
2025-02-19 14:51:37 +01:00
Amanda Bullington
0b6acec913 Feat: track default vs. advanced mode in grafana (#2670)
* Add default/advanced mode to feedback text field, since /log endpoint doesn't support what we would need for additional grafana columns
2025-02-18 17:10:50 -08:00
Amanda Bullington
7064d0651f Feat: sync button rotates in default mode (#2669)
* Port over code to rotate the sync button when uploads are happening or sync is tapped
2025-02-18 16:25:07 -08:00
Johannes Klein
6e00774357 Change initial app state to advanced mode (for now) (#2666) 2025-02-15 10:52:18 +01:00
Johannes Klein
574627fb6d During signup check first if an email is taken or not (#2665) 2025-02-14 11:49:37 +01:00
Amanda Bullington
5cf1d16999 Remove DefaultMode from debug mode (#2662)
* 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
2025-02-13 20:30:50 -08:00