Commit Graph

2387 Commits

Author SHA1 Message Date
Johannes Klein
027e08d90e Optional access of optional property 2025-03-11 10:31:04 +01:00
Johannes Klein
7bf26278e5 Merge pull request #2739 from inaturalist/mob-539-sharing-multiple-photos-shows-former-suggestions-screen
Fix: reset store when sharing photos into the app
2025-03-11 10:13:54 +01:00
Amanda Bullington
8464145e01 Remember to actually reset the observation store when sharing photos into app 2025-03-10 17:11:33 -07:00
Johannes Klein
eec7cf727b Hide obs status with boolean prop (#2738)
* Hide obs status with boolean prop

* Update ObsGridItem.test.js.snap

* Grid item not supposed to show obs status at all
2025-03-10 15:16:37 +01:00
Johannes Klein
dd0bdd01f1 Center icon, add margin right (#2735) 2025-03-10 15:16:11 +01:00
Johannes Klein
eaed9ada59 Only add zoom options if camera device has the actual physical devices (#2737)
* 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
2025-03-10 14:04:58 +01:00
Johannes Klein
3e14a78a45 Max lines of 1 for all headers (#2736) 2025-03-10 12:26:43 +01:00
Johannes Klein
37a9f6d58b Add a plus icon button to add all observation types to default mode header (#2734)
* AddObsButton TS

* Add simple plus icon version of the AddObsButton to my obs list header

* Update imports
2025-03-10 11:52:00 +01:00
Johannes Klein
15c1946b71 Use default mode from first app install (#2733)
* Default mode used on app install

* Update integration tests
2025-03-10 09:47:47 +01:00
Johannes Klein
1cdf491ed1 Make obs list header a React component 2025-03-09 20:51:26 +01:00
Johannes Klein
58bd263c23 Update vision-plugin to prepare for cv model v2.20 (#2732)
* Update vision-camera-plugin-inatvision

* Update Podfile.lock
2025-03-09 17:59:02 +01:00
Johannes Klein
08eced93e9 Adding some more info to errors thrown from camera (#2731)
* Use entire error as param outside of CameraView

* Pass error through to helpers

* Log entire error object to logstash and Alert
2025-03-08 00:30:27 +01:00
Amanda Bullington
fc737b1481 Crash fix and use offline notice for species tab of MyObs (#2730) 2025-03-07 14:04:04 -08:00
Amanda Bullington
d764e37f5c Reset zoom when tapping a different photo in media viewer (#2729) 2025-03-07 13:12:35 -08:00
Amanda Bullington
9ae17dce14 Hide floating buttons in ObsDetailsDefaultMode if observation is unsynced (#2723) 2025-03-07 10:47:48 -08:00
Amanda Bullington
8c0cfe1c47 Fuss a lot with invisible layout to make sure all suggestions are the same height (#2726) 2025-03-07 10:46:19 -08:00
Johannes Klein
d1398a4d29 Add UI for match screen not identifying (#2728)
* 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
2025-03-07 19:42:38 +01: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
Kirk van Gorkom
2ac737e9ad v0.59.4+146 v0.59.4+146 2025-03-06 22:27:23 -08:00
Kirk van Gorkom
6624acf65f Bump version to 0.59.4 2025-03-06 22:22:31 -08:00
Kirk van Gorkom
007fee6fea Merge pull request #2722 from inaturalist/524-remove-default-mode-announcements
Remove Announcements from default mode
2025-03-06 20:07:38 -08:00
Amanda Bullington
04b8212d78 Fix agree button placement in both ObsDetails screens (#2725) 2025-03-06 17:39:18 -08:00
Amanda Bullington
fd7bf54818 Move empty observations header under iOS safe area with flex (#2724) 2025-03-06 17:39:06 -08:00
Amanda Bullington
fd6cd0148d Filter out hidden content from ObsDetails advanced/default activity feeds (#2721)
* Hide comments and ids that are supposed to be hidden on remote/local observations

* Add and fix tests related to hiding content
2025-03-06 15:33:02 -08:00
Johannes Klein
455031587d Comment out Announcements 2025-03-06 23:50:09 +01:00
Johannes Klein
2557936364 Also scroll to top when location permission is granted (#2720) 2025-03-06 21:05:51 +01:00
Johannes Klein
9d0538c026 Add bottom card UI when not in simple mode (#2719) 2025-03-06 21:00:13 +01:00
Johannes Klein
310f65a515 Fix: pivot cards not closing with X button (#2718)
* Fix typo

* Move button higher in z Axis.
2025-03-06 20:59:45 +01:00
Kirk van Gorkom
c203b6c8d9 v0.59.3+145 v0.59.3+145 2025-03-06 10:52:37 -08:00
Kirk van Gorkom
672e1913ef Bump version to 0.59.3 2025-03-06 10:48:44 -08:00
Johannes Klein
ba8315ab9f Remove initial block function from location permission gate (#2713)
This was introduced to a misunderstanding of requirements in a previous ticket. Now the permission gate behaves again the same on all screens.
2025-03-06 09:29:31 +01:00
Kirk van Gorkom
6ee44787c4 Merge pull request #2714 from inaturalist/mob-512-implement-simple-unuploaded-logged-out-obsdetail
Implement simple un-uploaded logged-out mode for ObsDetail
2025-03-05 15:36:41 -08:00
Johannes Klein
50b4689a0f Passing props through to child component
We are not sure if this screen will stay like this so this seems to me to be a better way. We are just expanding the interface to allow a customization that is already possible to pass through. Instead of adding a new "largeText" mode.
2025-03-05 23:56:45 +01:00
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
6b269192ff v0.59.2+144 v0.59.2+144 2025-03-04 18:08:58 +01:00
Johannes Klein
c1257d610b Update Podfile.lock 2025-03-04 17:58:44 +01:00
Johannes Klein
bd4723c2d2 Bump version 2025-03-04 17:57:45 +01: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
Ken-ichi Ueda
21e3287c0e fix: assume all InfoList.xcstrings strings are translated; disable skip_untranslated_strings 2025-03-03 18:33:31 -08:00
Ken-ichi Ueda
10be0c0a38 fix: restore some missing iOS source strings 2025-03-03 17:57:44 -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
375937bd6b Add common ancestor mode to vision camera plugin mock 2025-03-03 11:02:36 -08: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