Commit Graph

7 Commits

Author SHA1 Message Date
Johannes Klein
37a9f6d58b Add a plus icon button to add all observation types to default mode header (#2734)
* AddObsButton TS

* Add simple plus icon version of the AddObsButton to my obs list header

* Update imports
2025-03-10 11:52:00 +01:00
Amanda Bullington
f4dae74fe8 Animate AddObsModal with fade in/out; closes #2350 (#2372) 2024-11-06 15:26:03 -08:00
Amanda Bullington
b61ff38f7c Reset stack when user navigates from AddObsModal (#1858)
* Reset navigation stack when user navigates from AddObsModal; closes #1857

* Fix AddObs nav test
2024-07-25 09:58:54 -07:00
Amanda Bullington
aa167c669d Refactor upload functionality into hook/zustand (#1606)
* Refactor upload code into hook and zustand slice

* Create a single source of truth for toolbar and individual progress

* Fix unit tests

* Fix more tests

* Continue trying to simplify upload progress and status code

* Continued overhaul of upload code

* Fix exclamation point in Toolbar

* Fix total toolbar progress

* Fix tests

* Update snapshots

* Code cleanup

* Update MyObs test

* Fix most tests by not deleting realm

* Keep attempting to make toolbar text clear in subsequent tests

* Mock Zustand and reset state after all tests

In theory this should make testing with Zustand simpler. The real kicker is
that resetting state will fail if we're not careful about manually replacing
nested objects in Zustand state updates.

* Bugfix: removeAllFilesFromDirectory works with File objects, not raw paths

* Update status text when uploads canceled

* Only show red exclamation rotating icon after all uploads attempted

* Fix progress bar with zustand nested object

* Fix toolbar progress

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-05-30 20:36:50 -07:00
Johannes Klein
345171f77c Replace AR with AI in strings and mentions 2024-04-15 11:12:19 +02:00
Amanda Bullington
d62167e712 Refactor navigation (#1387)
* Separate navigator into two main stacks: tab and no tab

* Organize screen options

* Preserve separate navigator for Login

* Restore login navigation

* Fix navigation/test for advanced users
2024-04-12 10:48:27 -07:00
Johannes Klein
efd88802ed 1364 UI setting (#1384)
* Show settings menu item to all users

* Add strings

* Update strings.ftl

* Add a logged out section to Settings

* Refactor logged in section

* Prop to use small label

* Restyle radio buttons

* Add react-native-mmkv

* Show logged in section only when logged in

* Add a boolean if user is advanced

* Hook for storage

* Change bottom tab button based on isAdvancedUser

* Add string

* Change supported AR camera version

* Refactor navigation out of AddObsModal

* Create new observation only on ObsEdit navigation inside Modal

* Reset store needs to happen before making new observation

* Merge conflicts removed some strings, put them back

* Remove comment

* Refactor AddObsModal test to unit test only

* Refactor navigation parts into integration test

* Add test case for advanced user

* Code style

* Add test case for advanced user to Tab bar

* Do not use a user object for snapshot tests, only the advanced user layout

* Use advanced user layout in navigation tests

* StandardCamera test with advanced user layout

* Add default value for boolean setting

* Remove default value as it is breaking immediate update of UI

* Refactor persisted layout value to be a part of zustand store

* Refactor persisted state into one bound store

* Explicit state for snapshot needed?

* Revert "Explicit state for snapshot needed?"

This reverts commit d448edc3dc.

* Remove snapshot test
2024-04-12 16:47:10 +02:00