* Do not filter out hidden comments and IDs when getting an obs from server
* Do not add a filtered set of comments and IDs to local obs
Searching for visibleComments and visibleIdentifications anyways gives 0 results outside this file.
* Move file
* Remove flow
* Type fcts
* Add a type to item
* More types
* Add field to RealmTaxon
* Type navigation as used in ObsDetails
* Update ActivityItem.tsx
* Migrate FloatingButtons to TS
* Change prop type
* Rename ActivityHeader
* Migrate ActivityHeaderKebabMenu to TS
* Type functions
* Add undefined as possibility from TextInputSheet callback
* Revert "Add undefined as possibility from TextInputSheet callback"
This reverts commit 95b5fef2b9.
* Revert "Type functions"
This reverts commit 6997f195ce.
* Revert "Rename ActivityHeader"
This reverts commit e384c1f5a5.
* Revert "Update ActivityItem.tsx"
This reverts commit c1dc151b9a.
* Revert "Add field to RealmTaxon"
This reverts commit 965af041c0.
* Revert "More types"
This reverts commit 73af10bfcd.
* Revert "Add a type to item"
This reverts commit 5e5bf0ebae.
* Revert "Type fcts"
This reverts commit 84cac53e33.
* Revert "Type navigation as used in ObsDetails"
This reverts commit 9febf9ea30.
* Revert "Remove flow"
This reverts commit dca054c212.
* Revert "Move file"
This reverts commit bf62c0db95.
* Add UI for a hidden comment/ID
* Rename export like file name
* Update ID category text in tests
* Ask for hidden status from API and persist in realm
* Show fallback UI for hidden photos in PhotoContainer
* Update strings.ftl
* Show fallback UI for hidden sounds in SoundContainer
* Change mock to remoteObservation
Previously, this test file was relying on a faulty remoteObservation. The passed in remoteObservation was {} and because of the now removed filter code in useRemoteObservation what was passes into the test was {comments:[], identifications:[]} which made this test pass without ever using the useLocalObervation mock.
* Add eye icon to photo
* Add eye icon to sound
* Add eye icon to comments/IDs
* Update package.json
* Update package-lock.json
* Enable plugin
* Update package.json
* Update package-lock.json
* Update .eslintrc.js
* Create a new object instead of mutating the existing one
* Update SoundRecorder.js
* Do not mutate prop directly
* Do not mutate store value directly
* Disable compiler for zoom hook
Because it uses reanimated logic, and previous work laid out we should specifically disregard a rule of react here, unsure what to do here for now.
* Move array for tracking results into component
* Disable compiler for StandardCamera
* Do not mutate store value directly
* Disable compiler for FullPageWebView
* Do not mutate route param
* Remove unnecessary check if state is true before setting it to false
* Fix: user might be undefined
* Update reanimated usage with new compiler compliant API
* Fix: taxon might be undefined
* Fix: taxon might be undefined
* Fix: common pitfall of trying to render text outside of Text component
* Update interface
* Add package override
* Update package-lock.json
* Refactor updating of user preferences into User model
* Remove no memo directive from zoom
* Update file imports
* Migrate safeRealmWrite to TS
* Update interface and import path
* Update interface
* Refactor useLocaalObservation hook to not mutate return value of a function that should not be mutated
* Update tests to new return structure
* Remove useSafeRoute hook
We get the same information from error contexts and surrounding documents, and this hook was violating the rules of react by conditionally calling another hook.
* Use optional chaining
* Update TaxonNamesSetting.test.js
* Fix: use optional chaining
* Extend on RNTLs renderHook instead of re-implementing
* Remove unnecessary mock
* Remove unnecessary mock
* Remove unecessary mock
* Remove trailing spaces
* 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
* Restyle community taxon section
* Use fave/unfave mutation in case of need_id metric
* Add votes field to Observation
* Change useIsConnected to TS
* Refactor fetching of remote observation into hook
Also includes the code to update local copy of a user's own observation
* Use const as key instead of string
* Remove unused prop
* Only send obs uuid to DQA
* Get obs in DQA container
* Rebuild object that is to check as it was send in nav params
* Refactor qualityGrade
* Refactor set to not loading state
* Update test to reflect fetching of obs
* Refactor too long lines
* Refetch remote observation after success in adding/removing vote
* Change qualitcMetrics to make use of observation.votes as well
Also refactored the object structure to use more efficient and performant filtering and finding in child components.
* Only use data slice for DQA buttons
* Refactor DQAButtons to only work with data slice relevant to that metric
* Special case for needs_id metric
* Also show loading indicator when fetching remote obs
* Add TODO
* Check only for vote of this user
* Optional chaining for user id
* Update test
* Enable fetching of remote if local is falsy
* Invalidate query on mutation
* Only set loading to false after refetch is finished
* Split up DQA test into unit tests and integration tests
* Use factory for mock user
* Add needs_id DQAVoteButtons unit test
* Revert hook to js
* Check for observation before using it
* Undo code style changes
* Remove unused value
* Refactor faves to be derived from votes
* Refactor needs_id interaction into standalone fcts
* Code style