Commit Graph

9 Commits

Author SHA1 Message Date
Johannes Klein
a20a22bad8 Hide "id with ai button" for no media or sound only (#2896)
* Add Boolean to control button being shown

Same Button component, only with changed indentation

* Apply margin between buttons to hide button instead

* Move left margin to container

Because ID button is now optional but container is not.

* Increase margin between buttons

Not part of the ticket, but it was not according to designs.

* Use existing state for the button

* Update integration test

* Update duplicate testID

* Add unit test for showing button behaviour based on photos
2025-05-16 15:30:06 +02:00
budowski
af6ac3694a MOB703 - changes to obs edit screen identification section (#2865)
* MOB703 - changes to obs edit screen identification section

* Adjust size of magnifying glass icon

---------

Co-authored-by: Amanda Bullington <albullington@gmail.com>
2025-04-22 10:03:51 -07:00
Amanda Bullington
7f2ed32d32 Use fields to limit response from search API; save taxon results in realm (#1905) 2024-08-01 14:21:26 -07:00
Amanda Bullington
045ce6f789 Improve Jest performance (#1160)
* Use faker import with specific locale

* Add global beforeAll to initiate i18next
2024-02-16 16:17:00 -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
Ken-ichi
f7dc08a704 Suggestions fixes (#972)
* Bugfix: TaxonDetails was crashing if it received a null taxon
* Send lat and lng instead of latitude and longitude to the score_image
  endpoint
* Show offline suggestions when you are offline
* Show notice when viewing offline suggestions
* Moved code unique to useOnlineSuggestions into that file
* Ensure we use a medium size image to get suggestions when dealing with
  remote URLs
* More logging around React Query retries
* Use default retry logic for useAuthenticatedQuery
* Made a module-resolver shortcut for tests
* Move offline notice above top suggestion; hide when offlines exist but onlines do too
2023-12-15 19:58:12 -08:00
Amanda Bullington
361ad1d1f5 Performance: simplify ObsEditProvider (#908)
* Simplify ObsEditProvider by moving functions into local state & calling reducer less frequently

* Fix delete all observations

* Fixes

* Move index selection to MediaViewer via params

* Access ObsEditContext on top level of ObsEdit and pass props

* Move context to top level screen components

* Fix tests

* Use waitFor to fix ObsDetails integration test

* Alphabetize props; remove realm check; refactor new Id method

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-11-17 12:35:29 -08:00
Amanda Bullington
5913fb511e Energy usage / performance improvements (#844)
* Remove console statements in production build

* Move uploadReducer into separate file

* Create reducer for creating obs; combine reducers

* Fixes with createObsReducer

* Move album, passes test states out of global context

* Bug fixes for ObsEdit flow

* Create photo gallery container

* Set accessibility test todo for PhotoGallery

* Improve FlashList performance MyObs

* Prevent flicker on modal close

* Create less rerenders in MyObservations

* Memoize drawer items for less rerendering

* Memoize custom tab bar

* Remove unused libraries and update snapshot

* Fix and prune dependencies

* Add AddObsModal tests

* Fix e2e test android by making comment confirm button visible
2023-11-02 11:03:48 -07:00
Amanda Bullington
d05c2f5405 Hide iconic taxon chooser when non-iconic taxon selected (#791)
* Hide iconic taxon chooser if user chooses a non-iconic taxon

* Add tests for iconic taxon chooser
2023-09-25 11:46:45 -07:00