Commit Graph

14 Commits

Author SHA1 Message Date
Johannes Klein
de05552286 Display proper error message if project is invite only (#3676)
* Move ProjectDetails to TS

* Remove flow type

* Type object properties

* Narrower type possible for helper function

* Type nav prop

* Type route params away from here

* Type route params away from here

* Type more project keys

* Type route params to Explore

* Type place generic for now

* Type function props

* Update displayProjectType.ts

* WIP: Add Alert to dummy codepath

* Move Alert to on button press, so before sheet is displayed

* Update string

* Update ProjectDetails.tsx

* Update ProjectDetailsContainer.tsx

* Remove flow type

* Type nav props

* Type ApiProject with fields we query for in ProjectDetails

Also check which ones are nullable according to API V2 docs

* Reorder fields

* Also request place_id field

This must be some kind of bug because the next query expects that we are asking for this value for the project.

* Apparently ProjectDetails sends an entire api result over navigation params

* Fix a TS error

* Same fix

* Replace second API call with data we can get from project call

* Fix a TS error

* Nullable properties according to API docs, do actually get back as null to us and not undefined

* Null passes through as prop

* I don't think those can be null

* Add other API query types

* Refactor to not pass id as function param

* Also query for membership_model

* Code style

* This seems nonsensical to me

Omit project_type and then put it back in

* Lift rule_preferences type to ApiProject

* Query for rule_preferences in Project details

* Minimal interface to use this function

* Reinstate previous interface

* Project now has a rule_preference field from container

* Be specific with what keys we prop down from container

* Route params are not optional because of a prior null check

* Update mock

* Add a TODO

* Add export
2026-06-02 11:06:38 +02:00
Abbey Campbell
5d981fd150 fix tests to stay consistent with handling of traditional projects 2026-04-22 14:23:01 -07:00
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
Corey Farwell
a43446909c Remove the need to specify TypeScript file extensions in imports (#3094)
* Don't require TS extensions in imports

* Resolve all import extension errors

* Remove file extension from import paths used in mocks

* Remove .d of type definition file paths

* Remove .d of type definition file and import as type

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2025-09-07 23:41:42 +02:00
Johannes Klein
b4516b7b25 Update react native to v0.78.x (#3043)
* Update package.json

* Update package.json

* Updates for native files with upgrade-helpers

* Update .flowconfig

* Update package-lock.json

* Update Podfile.lock

* Add react-dom types

* Update package-lock.json

* Wrong install

* Use types-react-codemod

* Update TaxonSearch.tsx

* Remove react-native-accessibility-engine dependency

This is currently not maintained and not compatible with RN 0.78

* Comment out accessibility tests

* Disable broken snapshot test

* Move broken test

* Move broken test

* Move broken test

* Remove duplicate file

* Move broken tests

* Move broken tests

* Move broken tests

* Move broken tests

* Move broken tests

* Move broken test

* Remove duplicate file

* Move broken tests
2025-08-09 13:47:46 +02:00
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
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
Amanda Bullington
0833d2ddf0 Jest config updates; fixes for slower tests (#1401)
* Speed up ObsEdit test with jest-test-time

* Update jest config and standardize accessibility tests

* Add test:memory to package json
2024-04-17 10:07:29 -07:00
Amanda Bullington
60c2e730ff Fix navigation to Projects; fix ProjectDetails crash when no description; closes #1114 (#1262) 2024-03-14 16:38:32 -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
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
Ken-ichi
0c7c807b56 Realm & other bugfixes (#950)
* Updated faker; fixed bug w/ DisplayTaxonName trying to modify a Realm object
* Fixed crash going from ObsDetail to ObsEdit
* Fixed bug fetching observation dates (not clear how this didn't instantly crash_
* Bugfix: MyObs observation fetch was failing on taxa w/ float rank_level
2023-12-04 13:47:00 -08:00
Amanda Bullington
92fc62b5f8 Projects / ProjectDetails UI (#788)
* Start on project / details UI overhaul

* UI tweak

* Show HTML in ProjDetails; close search bar

* Add OverviewStats and relevant fetches to ProjectDetail

* Allow user to leave/join traditional projects

* Fix tests with mock react-native-paper
2023-09-20 13:09:31 -07:00