Commit Graph

3 Commits

Author SHA1 Message Date
Ryan Stelly
b78be9243d lint rule & autofix for "trailing comma" (#3299)
* (lint) MOB-1063 enforce trailing commas

* autofix trailing commas

* manually fix newly introduced maxlen violations

* add trailing comma convention to i18n build
2025-12-22 20:17:13 -06:00
Johannes Klein
5553719a2f Community Taxon improvement DQA (#1291)
* 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
2024-03-22 21:57:28 +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