Commit Graph

4199 Commits

Author SHA1 Message Date
Johannes Klein
2b3407af81 Flip disabled state for tablets in AICamera (#1826) 2024-07-17 09:44:46 +02:00
Johannes Klein
e2cbeb6896 Set current tab depending on wether user is logged in or not (#1825) 2024-07-17 09:44:31 +02:00
Amanda Bullington
92cafdde83 Land user on Suggestions when one photo imported (#1824)
* Create navigation test for PhotoGallery

* Code and test land user on Suggestions when one photo imported
2024-07-16 14:47:02 -07:00
Amanda Bullington
abd4bcee23 Refactored location fetching for accurate locations (#1788)
* Refactor to use watchPosition

* Update useWatchPosition with permissions/retry

* Replace useUserLocation with useWatchPosition and fix tests; return userLocation from watch position hook

* Only update observation keys when there's an observation

* Improve TypeScript definitions

* Revert TypeScript commit

* Revert "Only update observation keys when there's an observation"

This reverts commit a4cd17a513.

* Code cleanup: make useWatchPosition more modular

* Code cleanup; location permission in ObsEdit instead of subcomponent

* Use correct accuracy in Camera photos

* Camera fixes

* Fixes to watching position in ObsEdit

* Fix useWatchPosition tests

* Fix tests

* Make sure state updates when renavigating to OsEdit; test fixes
2024-07-16 09:23:09 -07:00
budowski
b06ffd0f5e #1737 - projects UI fixes (#1797) 2024-07-16 08:37:24 -07:00
Johannes Klein
400436dd2a 1476 collaborators text (#1819)
* Replace collaborators text

* Update strings.ftl

* Add team members
2024-07-16 13:33:50 +02:00
Angie
1b05562a6c change external browser strings to all caps (#1818) 2024-07-15 21:50:41 -07:00
Angie
0f9dabe9f7 Change DQA and Settings headings to Heading4 (#1817) 2024-07-15 20:37:08 -07:00
Angie
1fb7d2a642 Add margins to location obsedit (#1816) 2024-07-15 19:46:16 -07:00
Angie
6672baeb24 Added font color to wikipedia text (#1815) 2024-07-15 17:47:54 -07:00
budowski
656a1c6bf3 #1104 - when searching for taxon, use the general /search endpoint (#1717)
* #1104 - Taxon search - use general search endpoint (not taxa/search endpoint)

* Linter fixes

* Updated inaturalistjs library to v2.12.0

* Test fix

* Further test fixes

* Linter fixes
2024-07-15 17:34:00 -07:00
Johannes Klein
e54bd2356e v0.36.0+101 v0.36.0+101 2024-07-12 17:16:26 +02:00
Johannes Klein
e5e4cd3a32 Bump version 2024-07-12 17:13:41 +02:00
Ken-ichi
934e486402 Hide skip ID button on Suggestions sometimes (#1791)
* Hide skip ID button on Suggestions sometimes

We only want to show the text "Add an ID later" when one needs to move forward
without adding an ID, so this hides it

* When reached from ObsDetails (you can go back)
* When reaced from ObsEdit and there is an existing identification
  (you've already added an ID so if you're editing it you need to choose a
  taxon or back out)

* Update test

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2024-07-12 13:34:27 +02:00
Johannes Klein
a52996f535 Changes to the way permissions are asked for (#1793)
* Replace name in permission requests

* TakePhoto TS

* PermissionGate TS

* Type

* PermissionGateContainer TS

* Interface

* Types

* LocationGate TS

* Remove LocationPermissionGate from Camera

* Remove write only permission

* Type

* ObsPhotoSelectionList TS

* Code style

* Show the improve with location button

* Create useLocationPermission.tsx

* Use new hook on suggestions

* Doc comment

* Use new hook in camera view

* Add strings

* Refactor Explore main content

* Use permission hook on RootExplore

* Add no location permission component

* Rename function

* Prop request permissions and use with button

* Default to Nearby label

* Remove Node type

* Projects TS

* Use useLocationPermission hook in projects screen

* Add string

* Prop permission down

* Refactor list render

* Refactor tab id into enum

* Tab type

* On nearby tab if without permission show button to prompt

* Leftovers

* Remove location permission gate from ObsEdit

* Use location permission hook on evidence section

* SearchBar TS

* Do not autoFocus on search bar in location picker.

Closes #1743

* Update type

* LocationSearch TS

* Show location permission gate on location picker's mount

* Add location permission to CurrentLocationButton

* Remove unused props of Map

* Remove unused exports from useMapLocation

* Migration

* Revert "Show location permission gate on location picker's mount"

This reverts commit 30ff75698c53d54d0b14cd2bd629f7155b743bf8.

* Add callbacks to useLocationPermission hook

* Show location permission ask on Obs Edit

* Remove unused string

* Reset explore filters should set location always to worldwide

* Add helper function to show place text in Explore

* Remove unused state of filter modal

* Show place text in filters modal with helper

* Show location permission button only for Nearby explore state

* Add a placeMode state

* Do not send placeMode to API

* Also treat limited permission as yes

* useLocationPermission in ExploreLocationSearch

* Refactor to setting place mode

Instead of logic based on the translated text of the place_guess string that is stored in ExploreContext, we are switching to an enum state that signifies which mode to show on explore:
1.) Nearby: Filters explore results based on the user's location. This also has a state without location permission that does not query the API.
2.) Place: Filtering by a specific place (as retrieved by /places API).
3.) Worldwide: Retrieve worldwide results, i.e. not having a place filter set.
4.) Map area: Filtering explore results precisely to the map rectangle shown on the explore map.

* Remove import from test

* Remove export

* Use blocked title only for blocked permission asks

* Move gallery permission container to Tab navigator as are the others

* Add gallery save title

* Split location permission explanation into two

* Update strings.ftl

* Only nav to location picker if permission was not  granted

* Check permission on app being foregrounded

* The location permission part is handled by useLocationPermission

* Do not store permission result in hook

* Use hasPermission from permissions hook

* Update fetchUserLocation.e2e-mock

* Move hook one higher

* Show user location if permission is given

* PermissionGate callbacks should use useCallback

* Add permission hook to map usage

* Fix test

* Update layout to be asserted

* Add location permission hook to Explore

* Remove console.log

* Few TS fixes

* Indentation

* Remove superficial check

* Update Podfile.lock
2024-07-12 11:00:24 +02:00
Angie
b3143d06ee Change unfollow button to correct button outline (#1795) 2024-07-11 22:12:48 -07:00
Angie
aa2f703fc4 Notifications with jsut sound shows sound icon (#1794) 2024-07-11 21:26:25 -07:00
Angie
b55db96db8 1723 agree button should not appear while signed out (#1792)
* Agree with id button does not show when logged out, test added

* updated pod

* Fix failing test
2024-07-11 12:38:10 -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
ce39b03495 Changes to showing select taxon button & vision attribute; closes #1773 (#1790) 2024-07-10 13:18:27 -07:00
Angie Ta
9d498167c7 remove comments 2024-07-09 09:58:39 -07:00
Angie
29c0f6beb7 1593 potential disagreement bottom sheet and disagreeing ids (#1749)
* Disagreeing IDs and Potential disagreement bottomsheet

* Change back to js

* Styling for withdrawn disagree text, string adjustments

* Agree taxon and disagree taxon share same state var, Reuse existing RadioButtonSheet for potential disagree, UI changes, styling for scientific name

* Remove duplicate

* Fix suggest id sheet not showing from teaxon details
2024-07-08 22:39:15 -07:00
Ken-ichi Ueda
e8f0b7f49d Ignore iOS permission error when trying to write to gallery
In theory we are checking for this permission before attempting to save, but
in practice it does happen, albeit rarely.
2024-07-08 15:39:33 -07:00
Ken-ichi Ueda
74c65672d9 v0.35.2+100 v0.35.2+100 2024-07-07 19:50:22 -07:00
Ken-ichi Ueda
cf9e41657f v0.35.2; make sure recently-created obs appear at top of MyObs 2024-07-07 19:41:04 -07:00
Ken-ichi Ueda
ddf928ed04 Remove unsynced-first sorting because it's very slow
Re-opens #1577
2024-07-07 19:09:35 -07:00
Ken-ichi Ueda
8fdfe37d97 v0.35.1+99 v0.35.1+99 2024-07-05 21:35:03 -07:00
Ken-ichi Ueda
2887e084a2 v0.35.1 2024-07-05 21:34:22 -07:00
Ken-ichi
50d9d1e60c Media clearing (#1771)
* (Re-)Fix bug where shared photo got deleted before it could be used
* Only run cleanup when MyObs has focus
* Only run cleanup once a minute
* Only delete files that are a day old or more
2024-07-05 21:33:52 -07:00
Ken-ichi Ueda
5ffe9e487d Bugfix: adding an ID from ObsDetails was landing on ObsEdit 2024-07-05 16:19:00 -07:00
Ken-ichi Ueda
5cd598587d v0.35.0+98 v0.35.0+98 2024-07-05 14:19:21 -07:00
Ken-ichi Ueda
b5860539c2 v0.35.0 2024-07-05 14:18:25 -07:00
Ken-ichi Ueda
857b584e94 Typed taxon in TaxonomyTaxon 2024-07-05 13:06:07 -07:00
Ken-ichi Ueda
bb5c7a5144 Bugfix: taxon search from Suggestions was not navigating to ObsEdit 2024-07-05 13:00:28 -07:00
Ken-ichi
464899f111 Restore removal of synced photos (#1768)
Closes #1741
2024-07-04 13:25:04 -07:00
Johannes Klein
3fd5b717c1 1746 radio bottom sheet (#1769)
* Update radio bottom sheet element margins and paddings

* Update radio button row element margins and paddings

* Revert "Update radio button row element margins and paddings"

This reverts commit 269882b93c.

* Label margin

* Explainer

* Add four pixel between radio button and text

* Actually, let's patch the radio button to not have intrinsic margin, that makes everything easy peasy

* Create react-native-paper+5.12.3.patch

* Add margin between label and description

* RadioButtonRow TS

* Icon is optional

* Update RadioButtonSheet.js

* RadioButtonSheet TS

* Radio labels in ExploreFilters should be smaller

* BottomSheetStandardBackdrop TS

* Move key

* Update Settings radio button containers

* Update containers of radio filters

* Modal TS

* Update types

* Update types

* Update interface

* Update types

* Update types
2024-07-04 12:24:03 +02:00
Johannes Klein
57cb7cba85 1732 header UI (#1763)
* Add margin between obscuration text and location text

* Wrap obscuration text with flex-1, and remove margin to back button
2024-07-04 11:23:56 +02:00
Ken-ichi
e747b37a8f Push TaxonDetails onto nav stack in Taxonomy section (#1767)
* Refactor useCallacks into components
* Push TaxonDetails onto the nav stack in Taxonomy section

Closes #1735
2024-07-03 17:25:58 -07:00
Ken-ichi
61cbbc9ac1 Show all obs photos in StandardCamera preview (#1765)
* Show all obs photos in StandardCamera preview
* Clear camera Zustand state after saving photos as ObservationPhotos
* Load Photo URIs into Zustand state when entering the camera
* Rename rotatedOriginalCameraPhotos to cameraUris to match galleryUri and to
  save us all a few keystrokes
2024-07-03 17:25:24 -07:00
Amanda Bullington
452ebcbdf4 Navigate user correctly with selected ID when coming from TaxonDetails (#1766) 2024-07-03 16:29:46 -07:00
Ken-ichi
32a4fb3931 Photos lost from StandardCamera when confirming before processed (#1764)
* Disable confirm button on StandardCamera until photos processed
* PhotoPreview prop names should make sense internally, or at least don't need to match external context

Closes #1690
2024-07-03 14:34:36 -07:00
Ken-ichi
591d6dc0e5 DQA voting status (#1757)
* Readability / cleanup updates for DQA
* Moved from unnecessary use of useMutation to useQuery for fetching metrics
* Log API errors
* Avoid warnings in tests about updates outside of act
* Update header in DQA after vote changes quality grade

Closes #1504
2024-07-03 10:08:47 -07:00
Amanda Bullington
d6f8dfa453 Fix: filter realm objects within listener to show correct num unsynced obs (#1762) 2024-07-03 09:59:51 -07:00
Johannes Klein
230646e2ae 1684 explore map null (#1760) 2024-07-03 16:33:08 +02: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
Johannes Klein
317a144ec9 Navigate to login on register authenticate fail (#1761) 2024-07-03 15:46:09 +02:00
Amanda Bullington
08d06221b1 Fixes for suggestions screen (#1756)
* Remove sticky headers from Suggestions

* Changes to suggestions

* Fix offline reload
2024-07-02 20:28:35 -07:00
Ken-ichi
2b8bbf9ffa Explore search taxon details (#1758)
* Close ExploreTaxonSearchModal before navigating to TaxonDetails
* Replace showInfoButton w/ hideInfoButton in TaxonResult
* Hide TaxonResult info btn in TaxonSearch from Explore filters

Closes #1705
2024-07-02 19:13:20 -07:00
budowski
2dad02238e Align location & date icons with text on ObsListItem
Closes #1446
2024-07-01 17:31:38 -07:00
budowski
473456b3b3 Show unsynced observations above others on MyObs
Closes #1577
2024-07-01 17:29:09 -07:00