Hi! I am checking out the project and noticed there are a bunch of TypeScript errors when I open some of the files I was reading. I ran `tsc` and noticed there's an error with the current TypeScript configuration file:
```
tsconfig.json:7:23 - error TS5063: Substitutions for pattern 'appConstants' should be an array.
7 "appConstants": "src/appConstants",
~~~~~~~~~~~~~~~~~~
```
This change should resolve that error, which will allow the `tsc` linter to be executed from the terminal.
* Repair integration test
* Repair Explore.test.js
* Move no longer broken test
* Mock the fadeInView that does screen transitions in tests
* Mock another fade in view
* Start screen in a loading state for 700ms
One idea I have about the bug is that maybe it takes a few renders to initialize the device. As we are immediately backing out of the screen in case we have no device, maybe just adding a few ms to give the native side time helps.
* If no device is selected log the length of devices available
* Add missing mock
* Move interpolation function
* Export pan handler for zooming
* Prop panToZoom to camera
* Small debug menu refactor
* Extract magic numbers into const
* Reorder conditions
* This does not really do anything because the option
keys have different names
* The Add Location CTA should always ask for permission
The only state we show the Add Location CTA is if the observation does not have a location when landing on ObsEdit.
* Use an initial state wether an observation should watch users location
In this case we can override the state to true whenever we want to force the app to watch the location.
For example when the user grants location permission on the screen we want to watch no matter where the user came from.
* Remove unused or nowhere imported functions
* Use same navigation on Match as ObsEdit does
* Always ask for permission when the MyLocation button
is pressed on the map
* Add a loading state to the "Add Location button"
* Update package.json
* Update package-lock.json
* Update
* Update to v13
* Update package-lock.json
* Breaking change: remove extend-expect
* Latest version
* Update package-lock.json
* Breaking change: Removed Accessibility matcher
* Update Suggestions.test.js
* Update DisplayTaxonName.test.js
* Testing the same but differently phrased
* Not really needed to test this
And since not.toHaveTextContent stopped working I just remove it.
* Update useTaxonSearch.test.js
* Move broken tests into folders that are not run
* Only move single tests that are failing
* This does work after all
* Remove only single tests that are broken
* Only move failed tests
* Only move failed tests
* Only move failed tests
* Does not pass on CI only
* Upgrade helper changes JS side
* Upgrade helper Android
* Upgrade helper iOS side
* Update project.pbxproj
* Create react-native-modal+14.0.0-rc.1.patch
* BackHandler.removeEventListener is deprecated
* Update react-native-modal
* Update .flowconfig
* Update package-lock.json
* Update Podfile.lock
* Update Podfile.lock from main
* Replace toBeVisible with toBeOnTheScreen
This is not recommended by react-navigation, because even though toBeOnTheScreen makes sure the components are in the tree it does not mean they are visible to the user. For example, in terms of navigation a previous screen is still i the tree but not visible to the user in the app.
I spent around a day trying to figure out why the isVisible check stopped working, and still have no clear answer.
Testing in the actual app shows that all of those flows are still working as expected, so it is a test-environment-only problem.
My suggestion would be to re-visit this problem after we have updated RN to latest, and testing related libraries to latest versions.
* Remove suggestions screens when navigating back after choosing a taxon
* Rewrite to use StackActions
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* Refactor Tooltip into AddObsModal
* Update AddObsModal.tsx
* Remove unintentionally hardcoded condition
* Disallow close modal while tooltip is visible
While the tooltip is visible the modal should not be dismissed
* Reinstate logged-in triggers
* Disable tooltip for users that just signed up
Because of a bug in showing the "Account creation" pivot card the trigger here is not always set to true and so the correct behaviour of showing the tooltip is currently not possible.
* Remove buggy check for button press
* Re-position modal
* Make sure we have numbers of observations by the user
We need it to make a decision on wether to show the tooltip. If we don't have it don't show it.
* Show the modal when tooltip should be shown
With a timeout because we have a lot of overlapping modals here.
* Remove react-native-walkthrough-tooltip dependency
* Add triangle under bubble
* Update snapshot tests