737 Commits

Author SHA1 Message Date
Amanda Bullington
d1421efd5b Show date ranges instead of project type on collection/umbrella projects (#2312) 2024-10-28 13:59:59 -07:00
Amanda Bullington
ce8cf1b19f Internationalize and format dates displayed in project requirements (#2303)
* Display project months with correct formatting

* Format each type of project date displayed in project requirements

* Rename project start date key to fit fluent formatting
2024-10-25 21:16:10 -07:00
Amanda Bullington
5e2cb9c84b Hide project section tests within debug mode 2024-10-25 12:37:09 -07:00
Ken-ichi
464b65c2a5 feat: make username copyable in obs activity headers and on user profile (#2299) 2024-10-25 11:18:58 -07:00
Ken-ichi
88c7d778c5 feat: set app locale on install, sign in, and sign out (#2294)
* Use system locale on install
* Check for system locale when app comes to foreground (required in Android
  b/c app doesn't get restarted when system locale changes)
* Create a constant of SUPPORTED_LOCALES in loadTranslations.js
* Restart app on sign out
* Use existing transaction when writing to Realm if available (might also
  consider an approach that waits for the existing transaction to complete)
* Make value returned by useCurrentUser actually reactive

Closes #2243
2024-10-25 09:39:50 -07:00
Amanda Bullington
bc817e8b80 Add projects, followers, and following lists via UserProfile (#2300)
Show projects, followers, and following lists via UserProfile
2024-10-24 19:04:42 -07:00
Amanda Bullington
9789b8d012 Display list of projects an observation belongs to (#2295)
* Add screen with list of projects an observation belongs to

* Test whether projects are displayed in ObsDetailsProjects; test project count in ProjectSection
2024-10-22 18:30:43 -07:00
Ken-ichi
ddca126ed5 refactor: log around repeat errors (#2293)
* Catch and squelch "Network request failed" errors that happen during logging itself (#1639)
* Log around RNSI access to resolve when/where those errors occur (#1639)
* Log around JWT retrieval to resolve when/where JWT missing errors occur (#2155)
2024-10-22 15:41:54 -07:00
Ken-ichi
bb0e357683 test: ensure Suggestions can skip ID (#2280)
* Failing Jest test: Skip id button unmounted as soon as you try to press it
* fix: memoize SuggestionsFooter to prevent dismounts and stabilize tests
* test: wait for elements to be visible in PhotoDeletion test

Also stabilizes several other dependencies, and uses findBy instead of queryBy
to ensure tests can find the skip ID button even it takes a second to
render.

Closes #2094

---------

Co-authored-by: Amanda Bullington <albullington@gmail.com>
2024-10-22 11:15:14 -07:00
Amanda Bullington
67dffdcf28 Screen transitions with fade animation (#2284)
* Disable animations on tab bar screens

* Fade in pages accessible from the tab bar

* Add fade in view to stack navigator screens

* Use time travel to step through frames of animation for SoundRecorder

* Use time travel to fix all tests with fade in navigation

* Nav fix
2024-10-20 14:45:31 -07:00
budowski
a1792bb507 Dismissable add obs modal help (#2236)
Closing the add-obs help text, only closes the help text + never shows up again

Close #2039

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-10-17 11:03:19 -07:00
Ken-ichi
9cccdf2f05 Obs list item iconic taxon fix (#2234)
* chore: upgrade fastlane to 2.224.0
* fix: ObsListItem was lacking border around iconic taxon
2024-10-16 19:27:20 -07:00
Ken-ichi
267d8a58b6 fix: prevent length of undefined error when processing UTFGrid data (#2228)
Adds null checks for UTFGrid processing and tests

Closes #2205
2024-10-16 12:47:34 -07:00
Amanda Bullington
9cba689a4a Audit and simplify text colors (#2229)
* Change black text to dark gray text

* Start simplifying to a single color scheme

* Remove custom paper theme colors

* More theme cleanup

* Styling specifically for RNPaper components

* Update snapshots to use hex colors, not rbga
2024-10-04 13:37:48 -07:00
Amanda Bullington
bd6bed71ce Simplify bottom sheet component; don't use onChange to close (#2226) 2024-10-03 21:36:17 -07:00
Amanda Bullington
b5634a2de5 Navigate logged out users from join project > login screen (#2224)
* Logged out users who press join project nav to login flow; closes #2115

* Fix a11y test
2024-10-03 15:28:02 -07:00
Ken-ichi Ueda
d3968ce2fd fix: layout, relative date, i18n changes
* ActivityHeader was not listing category
* ActivityHeader lacked space before date
* Combined duplicate strings, used more descriptive keys and comments
* Relative dates were showing fractional weeks
2024-10-02 14:08:32 -07:00
Ken-ichi
a3a43c4e2c g11n audit (#2189)
* chore: validate and normalize translations in addition to src strings
* fix: globalize lat/lng/acc in LocationPicker
* refactor: extract language picker into component
* refactor: globalized text
* feat: added a script to i18ncli called "checkify" that generates
  localization files prepended with a checkmark to help see strings that are
  not globalized
* fix: localize date formatting (closes #1622)

Closes #2102
2024-09-26 22:33:23 -07:00
Amanda Bullington
653340d854 Add infinite scroll to Projects (#2185)
* Implement infinite scroll in Projects

* Styling fixes for empty state in projects; add infinite loading wheel

* Resolve require cycle from ObsFlashList and FlashList shared components

* Order by distance and remove radius for nearby projects fetch

* Code cleanup

* Fix test

* Code cleanup

* Minor tweaks to search API request and results
2024-09-25 11:17:32 -07:00
Johannes Klein
6f8f2ea926 1953 suggestion logged out (#2163)
* TaxonResult TS

* Suggestion TS

* Do not show checkmark for logged out online suggestions

* Update strings.ftl

* From suggestions show bottom sheet on taxon detail

* Refactor updateTaxon

* Add text

* Another text

* Two more texts

* Fix import

* Function stubs

* Use a bulleted text list

* Restyle entire bottom sheet

* Code reorder

* Refactor saveObservation function

* Navigate to login screen for Upload now button

* Add key

* Save obs on press and nav to list

* Code style

* Get updated currentObservation immediately to pass to saveObservation

* Test AICamera with current user

* Show the bottom sheet only for logged out users

* Mock useCurrentUser hook

* Mock useCurrentUser hook

* Mock user

* Mock user
2024-09-25 12:56:32 +02:00
Amanda Bullington
dfc8fc8983 Support FlashList in RTL mode (#2158)
* Use custom FlashList with auto layout disabled in GroupPhotos

* Fixes for grid view in RTL mode

* Fix styling for PhotoCount in RTL

* Standardize ExploreSearchHeader; use BackButton for RTL support

* Styling fixes for filters search header
2024-09-23 19:08:43 -07:00
Amanda Bullington
3a9f831962 Enhancements: obs details from notifications (#2142)
* Rename obsDetailsTab & set to activity tab when nav from notifications

* Fix TS type
2024-09-23 11:18:08 -07:00
Ken-ichi Ueda
842fbe384d fix: reduce gradient shade for MyObs grid view
If you're not going to hide your light under a bunch of text, you might as
well not hide it under a lot of gradient either.
2024-09-20 15:30:52 -07:00
Amanda Bullington
74d81481ff Simplify ObsGridItem view in MyObservations (#2120)
* Only show one taxon name
* Remove comments, IDs, and quality grade
* Memoize grid and list display taxon name components
* fix: remove border on photoless ObsGridItem
* fix: don't show iconic taxon photo for another taxon

Closes #2088

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-09-20 12:43:45 -07:00
Ken-ichi
b81346f623 fix: control max text scaling to allow nav w/ large font sizes (#2129) 2024-09-20 10:42:22 -07:00
israr002
7f8519696d resolve typos on obs detail (#2098)
* resolve typos on obs detail

* correct typo in DetailsTab.test.js

---------

Co-authored-by: israr-stc-dev <Israr.Khan@intigral.net>
2024-09-19 17:11:05 +02:00
Amanda Bullington
36ae3f6660 Navigate via help text in AddObsModal (#2096)
* Make add obs help text pressable; closes #2077

* Fix test

* Styling updates; closes #2077
2024-09-18 10:24:37 -07:00
Johannes Klein
f85aba771b Username mentions navigate to User profile screen in-app (#2057)
* On user profile screen, if routed here with login as param search for user id

* UserText to TS

* Add linkify mention plugin dependency

* Rely on plugin for mention parsing

* Adjust rel

* Add a title attribute to mentions only

* Navigate to profile screen for mentions

* Use props

* Fix some types

* We dont really need this plugin if we check for href includes people link

* Replace user search api call with fetch by login

* Push new profiles on top of the navigation stack every time

* Add error strings

* If there is no user found for this id show error

This can happen I assume when a user changes the login but comments are not updated.

* Use this plugin

* Remove log

* Only react to anchors that have mention as a title

* Update types

* Another inferred type
2024-09-12 12:28:10 +02:00
Amanda Bullington
15382cee35 Integration test for photo import (#2058)
* Write an integration test for PhotoImport; closes #1430

* Add test for photo importer -> group photos -> obs edit flow

* Remove global image-picker mock
2024-09-10 16:26:23 -07:00
israr002
c7c25b029a Remove attribution for new photo in MediaViewer (#2040)
* 1570 Remove attribution for new photo in mediaviewer

* Guarding against photo being undefined

* Migrate AttributionButton to TS

* Remove console.log

* Find by label text instead of test ID

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2024-09-07 15:29:45 +02:00
Ken-ichi
ee37f6ce76 Account deletion improvements (#2044)
* Allow the in-app browser to open users/delete from settings
* When account deletion successful, sign the user out
2024-09-05 16:30:31 -07:00
Ken-ichi
d3a3c60715 fix: ident bodies should not get set by obs descriptions (#2018)
* separates ident body editing into its own state and UI
* stop adding an entire Realm object to nav params, where it gets out of date and causes access bugs
* fixes bug where accessing ObsDetails from MyObs can cause you to return there when returning from TaxonDetails via Explore
* separates BottomSheet handleClose callback so it can respond differently to the sheet closing and the user intentionally closing the sheet
* Suggest ID and Agree bottom sheets both have buttons of equal width with a single primary action
* Disagree sheet prompt refers to the taxon being disagreed with, not the ident taxon
* save taxon to local db when viewed on TaxonDetails
* minor refactors for readability

Closes #2003
2024-08-29 11:50:47 -07:00
Angie
704284b096 Location icon based on obscured state (#1943)
* location icon also based on taxon obscuration

* check for private before obscured

* Update schema ver
2024-08-23 02:23:41 -07:00
budowski
b96051cb02 Internal feedback form (#1992)
Adds internal feedback form that posts to our logging infrastructure.

Also,

* Adds maxLength prop to TextInputSheet w/ UI to show characters remaining
* Adds optional description to TextInputSheet
* Adjusts TextInputSheet input height to fit area left by the keyboard

Closes #1844 

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-08-22 15:12:37 -07:00
Amanda Bullington
c2f0b21167 Fixes for explore loading state after permissions granted (#1986)
* Fixes to loading explore after location permission; closes #1918

* Test fixes

* Test fix
2024-08-19 17:23:57 -07:00
Amanda Bullington
75e5193ae7 Upload status fixes (#1979)
* Uploads start as expected from ObsEdit; error state not shown while syncing; closes #1954

* Fix MyObs test

* Fix toolbar test
2024-08-16 13:12:36 -07:00
Amanda Bullington
5945ccc525 Fixes and error handling for API throttling (#1971)
* Add new error type for 429; remove unnecessary logs

* Batch API calls for SpeciesSeenCheckmark

* Remove SpeciesSeenCheckmark test

* Revert logging errors

* Use Set for observedTaxonIds

* Add comments around logger.info statements

* Merge linting update

* More fixes from code review

* Switch to non-authenticated useQuery for fetching taxon ids seen by X user id

* Fix tests
2024-08-14 22:08:03 -07:00
Amanda Bullington
3b9739e254 Set threshold for top offline suggestion & sort by ascending rank (#1972)
* Update pods

* Show high scoring taxon as offline top ID; closes #1963

* Leave comment about offline threshold

* Add human offline test
2024-08-14 14:39:02 -07:00
Ken-ichi
e08cd83d6a Control web access (#1970)
* Convert web view components to typescript
* Basic tests for URL handling in FullPageWebView
* Allowlist of domains in FullPageWebView
* Open links in browser in most situations
* Allow FullPageWebView to handle mailto links
* Throw errors if FullPageWebView is about to leak a JWT
* Restore FullPageWebView functionality to signup screens

Closes #1803
Closes #1934
2024-08-13 14:45:37 -07:00
Amanda Bullington
cf70a4358a Move modules from jest setup to __mocks__ (#1949)
* Get a few mocks working in __mocks__ folder

* Move more mocks into __mocks__

* Move mocks

* Move zustand mock

* Add more mocks to __mocks__

* More mocks

* Move more files to __mocks__ and audit existing mocks

* Mock react navigation in __mocks__

* Restore test to help with imports after jest env torn down

* Add fake timer to integration test with userEvent

* Add RN paper mock
2024-08-11 11:27:52 -07:00
Amanda Bullington
2ee0f14a2d Unify global shadow styling (#1947)
* Remove shadow from bottom sheets

* Shadow fixes

* Update snapshots
2024-08-09 19:03:19 -07:00
Amanda Bullington
eca656b984 Formatting in DatePicker, ObsEdit (#1945)
* Remove seconds from datetime picker dates; make formatting closer to Figma; closes #1920

* Add DatePicker tests

* Add test for no date given
2024-08-09 16:10:37 -07:00
Amanda Bullington
cf896a3a17 Toolbar upload status refreshes when user returns to MyObs (#1942)
* Write some failing navigation tests for MyObs navigation

* Add one more failing test to check for empty screen after all obs are deleted

* Update what happens on blur

* Changes to focus effect

* Revert "Changes to focus effect"

This reverts commit c779504cdf.

* Test: toolbar status reset when user leaves screen

* Unmock useFocusEffect in Jest; fix tests

* Minor nav mocking updates

* Fix import
2024-08-09 11:21:25 -07:00
Ken-ichi
bca4872def Ensure device stays awake during uploading can sleep after (#1939)
* Fix previous state in which it was never really allowed to sleep again after
  upload finished
* Rename `uploadObservations` to `startUploadObservations` to accurately
  describe what it does
* Minor improvements in ts typing
2024-08-08 14:46:18 -07:00
Ken-ichi
ea0afb87a9 Don't restart location fetch when view blurred (#1936)
* Don't restart location fetch when view blurred
* Removed what looked like an unnecessary callback in DisplayTaxonName
* Refactored tests
2024-08-07 17:33:22 -07:00
Ken-ichi Ueda
4545d72e2f Ensure default realm instance is always unique for a single run 2024-08-07 12:18:58 -07:00
Ken-ichi
609b7c936f Select taxon button always visible from Suggestions (#1933)
* Send user back when they access a camera on a device with no camera
* Always show SELECT button on TaxonDetails when reached from Suggestions
2024-08-07 09:39:32 -07:00
Amanda Bullington
e0b5d446a2 Don't overwrite description in Suggestions/TaxonSearch (#1916)
* Don't overwrite description in Suggestions/TaxonSearch; closes #1913

* Fix TS

* Remove unused code related to adding/editing comments in Suggestions/TSearch

* Remove test about showing comments on Suggestions
2024-08-06 18:41:54 -07:00
Johannes Klein
c81201cffa 1843 offline taxon search (#1864)
* realm TS

* provider/contexts TS

* todo

* useIconicTaxa TS

* Refactor taxa list into component

* Use TaxaList for taxon search screen

* Refactor render decision

* Use flex 1 container instead of footer

* Show offline notice for query without results

Refetch taxa when going back online

* Update required because of useIsConnected

* Await typing in test

* Mock useIconicTaxa

* Add tests to taxon search

* emitUploadProgress TS

* createUTFPosition TS

* convertScores TS

* Add field type

* Fix imports
2024-08-03 15:13:13 +02:00
Amanda Bullington
b8c08ae2d4 Reassure tests (#1914)
* Basic performance tests for key components

* Fix MyObs integration test with fake timers and less rerendering
2024-08-02 19:07:41 -07:00