Commit Graph

1162 Commits

Author SHA1 Message Date
Johannes Klein
bebef03a7a Fix wrong positioning because of dimension of focus square 2024-02-06 22:59:11 +01:00
Johannes Klein
a2bb7b93cc Use privateLat and privateLong to initialize location picker if present (#1111) 2024-02-06 22:38:47 +01:00
Johannes Klein
db050865d7 Show Focus square on cameras that do not focus; plus style changes (#1117)
* Show the focus square at the tapped coordinates even if we do not actually set the focus

* Add new tailwind color

* Add new border radius value

* Restyle focus square according to current designs
2024-02-06 22:37:39 +01:00
Angie
d9eafe8eed Change TextInputSheet styling to prevent text flowing into clear button (#1113) 2024-02-05 21:15:24 -08:00
Amanda Bullington
2bce3aa784 Prevent PhotoCount from rendering with no count on scroll (#1112)
* Remove ForeignObject from SVG to prevent PhotoCount from rendering blank; closes #1073

* Update snapshot

* Fix styling for photo count large sizes

* Update snapshots
2024-02-05 14:12:02 -08:00
Johannes Klein
21b0b6e6a3 Move back button on explore filter modal 2024-02-05 14:40:28 +01:00
Johannes Klein
fd2c491bed Filter out explore context params that should not be api params
Closes #1094
2024-02-05 13:07:37 +01:00
Ken-ichi Ueda
d20e100899 Notification text for comments no longer mentions mentions
observations/updates doesn't return notifications about mentions. This also
makes the text more translatable using the the Trans component.
2024-02-02 12:20:04 -08:00
Ken-ichi Ueda
794b014e15 Added smaller bird for Android icon 2024-02-02 10:57:56 -08:00
Ken-ichi Ueda
ecbe6fd53b Added background to Android adaptive icon 2024-02-02 10:57:56 -08:00
Amanda Bullington
a3b1371682 Fix agree button taxon id (#1105)
* Fix agree button taxon_id and write test; closes #1036

* Code cleanup
2024-02-01 20:58:29 -08:00
Angie
56e6ee34d2 Move Notifications to ObservationStack (#1106) 2024-02-01 18:56:32 -08:00
Ken-ichi Ueda
b9626c80b7 Don't log debug statements in release builds 2024-02-01 18:04:29 -08:00
Ken-ichi Ueda
97b78741f4 Minor text change for suggestions attribution 2024-02-01 15:36:39 -08:00
Amanda Bullington
9e32a2abe3 Prevent login screen from flickering on iOS 17 (#1102)
* Simplify login/signup form code

* Fix visual flickering

* Remove value prop from forms; let input fields maintain their own state

* Fix broken navigation links
2024-02-01 12:46:17 -08:00
Ken-ichi Ueda
ce763ec558 Some additional logging around upload 2024-02-01 11:40:54 -08:00
Amanda Bullington
b69e5a9923 Reset IconicTaxonChooser when navigating multiple observations (#1100)
* Reset IconicTaxonChooser when navigating multiple observations; closes #1092

* Fix test undefined key error

* Remove console log
2024-01-31 15:42:22 -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
f770304de8 Handle close & backdrop dismissal for Explore bottom sheet; closes #1075 (#1098) 2024-01-30 16:54:58 -08:00
Johannes Klein
93061bf8de Set user-agent in global config (#1096)
* Update inatjs

* Globally set user-agent for inaturalist js usage

* Remove user-agent from announcements
2024-01-30 15:41:32 +01:00
Johannes Klein
c15b9f5eb5 Explore location screen restyle (#1095)
* Restyle search location explore filter screen

* Update README.md
2024-01-30 12:12:34 +01:00
Amanda Bullington
be5765e298 Make explore observations layout persistent (#1090)
* Make explore observations layout persistent; closes #1052

* Code cleanup
2024-01-29 15:33:15 -08:00
Johannes Klein
f1bbf6f988 v0.21.1+70 v0.21.1+70 2024-01-29 13:56:39 +01:00
Johannes Klein
011f9d3fdc v0.21.1 2024-01-29 13:48:30 +01:00
Johannes Klein
dfeb9995fc Correct fave button placement 2024-01-29 12:22:00 +01:00
Johannes Klein
8cb2341439 Fix wrong usage of media explore filters 2024-01-29 11:45:12 +01:00
Johannes Klein
0a2c9c2302 ObsDetail header right icon white on non-tablet 2024-01-27 12:51:52 +01:00
Johannes Klein
6c1277c763 Fix crash in explore filters with exact dates 2024-01-27 00:06:00 +01:00
Amanda Bullington
b123373226 Standardize activity indicator (#1087)
* Use standard activity indicator; closes #1035

* Add input field to shared component index'
2024-01-26 11:04:16 -08:00
Amanda Bullington
226fd93da9 Timeout for online suggestions (#1086)
* Add timeout to useOnlineSuggestions; use offline suggestions when internet spotty

* Cancel network request when timeout occurs
2024-01-26 11:04:03 -08:00
Johannes Klein
7b7569e650 v0.21.0+69 v0.21.0+69 2024-01-26 13:35:54 +01:00
Johannes Klein
17518bb412 Bundle update 2024-01-26 13:28:20 +01:00
Johannes Klein
de7a728b78 Bump version 2024-01-26 13:25:44 +01:00
Johannes Klein
49e9339c51 ObsDetail media masonry layout (#1085)
* Simple masonry layout

* Scrollable masonry

* Render SoundSlide in Masonry

* Fix previos commit

* Fix param name

* Optional style for photo slide

* Rename

* Use photo slide

* Open media viewer on press

* Rename components

* Rename component

* Add test for tablet obs media
2024-01-26 11:57:42 +01:00
Johannes Klein
8cf68b724e ObsDetail tablet layout (#1084)
* Remove unused passedPhoto state

* Refactor render function

* Basic column layout on tablet

* Resize no evidence element on tablets

* Use full instead of percentage

* Prop tablet down to media

* Remove masonry

* Refactor obs header

* Add margin to overview

* Reposition fave button
2024-01-25 14:30:09 +01:00
Johannes Klein
fd79f57dd9 Remove log 2024-01-25 13:35:27 +01:00
Angie
ff02e6d920 1071 notifications infinite scroll (#1083)
* Infinite scroll notifications

* remove unneeded strings and vars
2024-01-24 18:12:28 -08:00
Amanda Bullington
bb6a180527 Observation deletion on MyObservations (#1082)
* Delete local & remote observations on MyObs; show progress

* Update tests & add test for delete hook

* Fix test failures

* Add tests for deletion strings in Toolbar; add test for multiple deletion

* Clear deletion text on toolbar when user navigates away from MyObs

* Add a check in e2e test to make sure observation was deleted
2024-01-24 17:32:11 -08:00
Johannes Klein
47b3525228 Announcements (#1081)
* Update iNatjs

* Add webshell dependency

* Basic announcement fetching component

* Styling

* Dismiss function

* Error handling TODO

* Add param

* React to link presses

* Missing code

* Add unit test

* Add string

* Refactor search query and dismiss to use react-query

* Activity indicator when refetching

* Add query provider to test

* Mock component in other integration tests

* Move user agent to api

* Throw error instead of logging
2024-01-24 22:22:50 +01:00
Johannes Klein
60de855f6b Explore filters (#1067)
* Remove Explore Filters screen

* State for Explore filters modal

* Accept modal state in Header to open modal

* Basic explore filters modal

* Save taxon object to explore state on update

* Update types expected

* Pass state and update function into filters modal

* Receive new props

* Destructure taxon from props

* Restyle header View

* Add main Heading

* Add taxon section

* Restyle modal header

* Add numbers badge component

* TaxonResult add prop for general on press

* Make TaxonResult checkmark optional

* DisplayTaxon can receive children as right-side component

* Refactor ExploreFilters component tree

* Move header out of scroll view

* Update ExploreFilters.js

* Update ExploreFilters.js

* Add icon to display taxon

* Update ExploreFilters.js

* Add basic taxon search screen

* Use taxon result without checkmark, send taxon to Explore screen

* Add string

* Accept taxon on explore screen

* Add a dummy screen for explore location search

* Add type

* Store place in state when received as route param

* Basic explore filters location section

* Add strings

* Move filter modal to separate component, add sort by props

* Add screen for testing purposes

Because atm we can not have two modals open at the same time, I move filters to a separate screen for testing the other modals.

* Add initial filter params and do not pass down undefined ones

* Pass function to update sort by down

* Create SortBySheet.js

* Navigate to test screen instead

* Sort by button text

* Add default filters definition

* Call reset function if filters are not default

* Add prop and function to reset

* Add user search screen

* Move search screens

* Move references

* Replace list with flash list

* Add item separator

* Remove footer

* Return user to Explore

* On press handle for user list item

* Fix wrong imports

* If a user is in prop show user icon and edit button instead

* Refactor display taxon to be inside a Pressable

* Missing import

* Receive user in explore rout params

* Quality grade section header

* Placeholder

* Add TODO

* Calculate number of filters set

* Only send user id to explore screen

* Do send back user object, filter out user_id

* Add project section

* Refactor project list item into standalone component

* Change initial value to undefined

* Add project search screen

* Remove loading state

* Show project in filter modal

* If project is in param set it to state

* Add Checkboxes to filter modal

* Remove comment

* Taxonomic Ranks section UI

* Use props for checkboxes

* Update ExploreContainer.js

* Calculate actual query param

* Is Most Faved possible?

* Actually set sort by query params

* Save hrank and lrank to explore state, prop down

* Update ExploreContainer.js

* Show ranks in button text

* Radio modal to test taxonomic ranks

* Add sticky toolbar

* Update strings.ftl

* Date observed section bottom sheet

* Date observed prop

* Change padding

* Date observed all UI

* Taxonomic ranks section

* Add todo

* Refactor open sheets state

* Update button

* Add exact date picker sections

* Store dates in state

* Update strings.ftl

* Refactor function name

* Refactor constants

* Reset date states on mode change

* Set new months to state on change

* Configuration for showing months checkboxes

* Receive and update months with checkboxes

* Refactor RadioButton sheet to export radio button row

* Add Media section UI

* Add media state to Explore

* Start with Establishment Means section

* Add checkbox texts

* Add states

* Functions to update state

* Add sort by param for most faved

* Spacing for checkboxes

* Wild Status section UI

* Wild status state

* Reviewed UI section

* Reviewed state

* Set current user id as viewer_id for review true to work

* Remove testing code

* Photo licensing UI section

* Photo license state

* Prop down photo license update, use param in search

Forgotten in previous commit

* Unused prop

* Add noStatus state

* Change Establishment Means status to TODO

* Add TODO text

* Console log for testing params

* After rebase from main this was necessary

* Simple switch between two UIs

* Simple explore context

* Lift Provider one up

* Copy over photo license to new provider

* Copy over review filter

* Refactor to use enum

* Copy over wild status, and enum refactors

* Refactor some more state

* Remove unused navigation

* Refactor one state

* Refactor some more state

* Refactor some more state

* Remove testing screen

* Refactor some more state and derived state

* Do send over project as param from Project Details

* Update FilterModal.js

* Rename components

* Remove unused param handling

* Add keys

* Remove substring for key

* lrank and hrank combined counts as one only

* Use the correct constants

* Add key

* Fix issue with button text

* Add View Wrapper for filters section

* UI cosmetics

* Compare current filters state to a snapshot

* Change button level to focus

* Add context action to revert to snapshot

* Confirmation dialog strings

* Add confirmation sheet

* Send current user along to Explore from Home Header

Closes #887

* Date bottom sheets texts

* Show texts in modal

* Set search to worldwide on param received

* Send taxon as param to Explore from Taxon details screen

Closes #889

* Show all observations worldwide of project

* On species view pressed should navigate to explore species view

Closes #893

* Go to explore from users profile

* Navigate to species view from user profile

Closes #894

* Enable unclear filters

* Add taxon to context

* Use context for explore params further down the tree

* Refactor one state

* Remove unused action

* Remove unused state

* Refactor function

* Refactor state

* Refactor place_id, which concludes reducer refactor

* Refactor names

* Do not use key inside context's state

* Add a11y label

* Remove duplicate test ID

* Remove superfluous component

* Create ProjectListItem.test.js

* Add failing filter modal test

* Remove log

* Rename function

* Months strings

* Remove todo

* A11y labels

* Remove TODOs

* A11y label

* A11y label

* Refactor taxon search hook

* Update FilterModal.js

* A11y labels

* A11y not possible in react-native-paper lead to test fails

* Update TaxonSearch.test.js

* Add dropshadow

* Another dropshadow

* Add TODO text to UI elements that are not finished

* Reverse order

* Refactor constants

* Revert "Refactor constants"

This reverts commit 2f52e936d6.

* Refactor to use constants

* Refactor constants use

* Refactor constant use

* Refactor constants use

* Refactor constants use

* Refactor constants use

* Refactor code

* Add validation of date format

* Correct type for snapshot action

* Add taxonomic rank enum

* Taxon can be undefined

* More precise type

* Fix wrong string usage

* Refactor radio button row component

* Refactor ProjectListItem import

* Example usage of new ui elements

* Pull sort by sheet back inside filter modal

* Rename params

* Add useEffect dependency

* Rename param

* Fix broken function
2024-01-23 18:08:36 +01:00
Ken-ichi
e6b5cb8aa6 Obs details sounds (#1062)
* Extracted non-photo stuff from PhotoDisplay
* Separate component for FaveButton
* Prevent faves while signed out
* Separate component for nav header
* Stick nav header while scrolling until tabs
* Nav header has slight gradient for visibility over white content
* Renamed ObsDetails media components so they're not focused on photos
* Data and layout changes leading up to sound player on ObsDetail
* Add sound player to ObsDetails
* Swiping away while playing should pause playback
* Swiping back to sound and playing again should resume where you left off
* Allow viewing media while offline (images may be cached)
* Stop playback when navigating away from ObsDetails
* Fetch sounds in Explore so we can show sound icon
* Map all observation objects in explore with Realm-ish attributes
2024-01-22 13:12:01 -08:00
budowski
da155a8f7e Show StandardCamera photo previews in reverse order (#1063)
Closes #996
2024-01-22 12:48:48 -08:00
budowski
1f2265df8b my observations - over-scroll header bug fix (#1032)
* my observations - over-scroll header bug fix
* refresh UI state only when over-scrolling (bounce)

Closes #560
2024-01-22 12:40:17 -08:00
Amanda Bullington
ca2d4bb6a6 Add autofocus prop to SearchBar; closes #914 (#1057) 2024-01-22 09:53:28 -08:00
Ken-ichi
4e42ebc262 Community taxon opt out notice (#1060)
* Shows notice when user or obs is opted out of Community Taxon on ObsDetails
  (closes #882)
* Unifies mapApiToRealm methods around a single interface
* Ensure that the remote obs used on ObsDetail is normalized to look like a
  local obs
* Ensure some tests that use signIn() have isolated Realm instances
* Update current user's obs from ObsDetails (closes #1045) 
* Fixed CC0 license display on ObsDetails (was not actually related to
  updating the local copy of the obs
2024-01-18 20:16:30 -08:00
joergmlpts
279ea8a118 comprehensive fix for Realm objects in observations; fix for issue #1031 (#1033)
I agree this is a better solution, though I wish neither solution was really necessary. We still need to watch out for nested Realm.Objects, I think.
2024-01-16 18:36:32 -08:00
Ken-ichi Ueda
6b37ca1d2b Several minor fixes
* use showSwitchMapTypeButton option in Location Picker and ObsDetails map
* title of comment bottom sheet to "Add Comment"
* fixed position of current location button on map
* text of geoprivacy on ObsDetails to "Geoprivacy: Open"
* don't load offline suggestions while loading online
2024-01-16 17:52:23 -08:00
Ken-ichi Ueda
e0695138e9 Removed vestigial code related to MediaViewer on ObsDetail 2024-01-16 17:52:23 -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
Johannes Klein
18ace3e397 Small dependency update 2024-01-16 22:38:47 +01:00