Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix MapView crashing #910

Merged
merged 3 commits into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
...require('@amaurym/eslintrc'),
// FIXME Turn these rules on again:
// https://github.com/amaurym/shoot-i-smoke/issues/619
// https://github.com/shootismoke/mobile-app/issues/619
rules: {
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
Expand Down
4 changes: 2 additions & 2 deletions App/Screens/About/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const handleOpenBerkeley = (): void => {
};

const handleOpenGithub = (): void => {
Linking.openURL('https://github.com/amaurym/shoot-i-smoke').catch(
Linking.openURL('https://github.com/shootismoke/mobile-app').catch(
sentryError('About')
);
};
Expand Down Expand Up @@ -313,7 +313,7 @@ export function About(props: AboutProps): React.ReactElement {
Constants.manifest.version}
.
</Text>
{/* Add changing languages https://github.com/amaurym/shoot-i-smoke/issues/73 */}
{/* Add changing languages https://github.com/shootismoke/mobile-app/issues/73 */}
</View>
</CustomScrollView>
);
Expand Down
14 changes: 9 additions & 5 deletions App/Screens/Details/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { stationName } from '@shootismoke/dataproviders';
import homeIcon from '@shootismoke/ui/assets/images/home.png';
import stationIcon from '@shootismoke/ui/assets/images/station.png';
import React, { useContext, useEffect, useState } from 'react';
import { ImageRequireSource, StyleSheet, View } from 'react-native';
import { Image, ImageURISource, StyleSheet, View } from 'react-native';
import MapView, { Marker, PROVIDER_GOOGLE } from 'react-native-maps';
import truncate from 'truncate';
import { distanceToStation, getCorrectLatLng } from '@shootismoke/ui';
Expand Down Expand Up @@ -142,16 +142,20 @@ export function Details(props: DetailsProps): React.ReactElement {
>
<Marker
coordinate={station}
image={stationIcon as ImageRequireSource}
ref={handleStationRef}
title={t('details_air_quality_station_marker')}
description={truncate(station.description, 40)}
/>
>
{/* FIXME https://github.com/react-native-maps/react-native-maps/issues/3664 */}
<Image source={stationIcon as ImageURISource} />
</Marker>
<Marker
coordinate={currentLocation}
image={homeIcon as ImageRequireSource}
title={t('details_your_position_marker')}
/>
>
{/* FIXME https://github.com/react-native-maps/react-native-maps/issues/3664 */}
<Image source={homeIcon as ImageURISource} />
</Marker>
</MapView>
)}
</View>
Expand Down
2 changes: 1 addition & 1 deletion App/Screens/Home/Footer/ShareButton/ShareButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function ShareButton(props: ShareButtonProps): React.ReactElement {
const title = t('home_share_title');

// FIXME imageUrl doesn't work on Android
// https://github.com/amaurym/shoot-i-smoke/issues/250
// https://github.com/shootismoke/mobile-app/issues/250
await Share.share({ message, title, url: imageUrl });
} catch (error) {
sentryError('ShareButton')(error);
Expand Down
2 changes: 1 addition & 1 deletion App/stores/location.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function LocationContextProvider({
TE.chain(
sideEffect((gps) => {
// Set lat/lng for now, set the reverse location later
// @see https://github.com/amaurym/shoot-i-smoke/issues/323
// @see https://github.com/shootismoke/mobile-app/issues/323
console.log(
`<LocationContext> - fetchGpsPosition - Got GPS ${JSON.stringify(
gps
Expand Down
278 changes: 139 additions & 139 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ When you submit code changes, we ask you to sign a CLA: https://cla-assistant.io

## Report bugs using Github's issues

We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/amaurym/shoot-i-smoke/issues); it's that easy!
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/shootismoke/mobile-app/issues); it's that easy!

## Write bug reports with detail, background, and sample code

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<h4 align="center">Know how many cigarettes you smoke based on the pollution of your location</h4>

<p align="center">
<a href="https://github.com/amaurym/shoot-i-smoke/actions">
<img alt="Github Actions" src="https://github.com/amaurym/shoot-i-smoke/workflows/CI/badge.svg" />
<a href="https://github.com/shootismoke/mobile-app/actions">
<img alt="Github Actions" src="https://github.com/shootismoke/mobile-app/workflows/CI/badge.svg" />
</a>
<a href="https://david-dm.org/amaurym/shoot-i-smoke">
<img alt="david-dm" src="https://img.shields.io/david/amaurym/shoot-i-smoke.svg" />
Expand Down Expand Up @@ -59,7 +59,7 @@ Run the following commands:

```bash
# Clone this repo
git clone https://github.com/amaurym/shoot-i-smoke && cd shoot-i-smoke
git clone https://github.com/shootismoke/mobile-app && cd shoot-i-smoke
# Install dependencies
yarn install

Expand Down Expand Up @@ -91,17 +91,17 @@ All required API tokens are already pre-filled in `app.example.json`. If you wan

## :raising_hand: Contribute

If you find a bug, or if you have an idea for this app, please [file an issue here](https://github.com/amaurym/shoot-i-smoke/issues). We really appreciate feedback and inputs!
If you find a bug, or if you have an idea for this app, please [file an issue here](https://github.com/shootismoke/mobile-app/issues). We really appreciate feedback and inputs!

🇬🇧🇫🇷🇪🇸🇨🇳 You may also contribute with translations with our online tool [POEditor](https://poeditor.com/join/project/iEsj0CSPGX). If you need context for some terms, here are [some screenshots](https://nx1394.your-storageshare.de/s/grS6CZJGapRSH6i).

For code contribution, the codebase heavily relies on functional programming principles via the [`fp-ts`](https://github.com/gcanti/fp-ts) library. The codebase itself is quite simple, so even if you're beginner to functional programming, it shouldn't be hard to follow along. You can start with these [easy tasks](https://github.com/amaurym/shoot-i-smoke/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
For code contribution, the codebase heavily relies on functional programming principles via the [`fp-ts`](https://github.com/gcanti/fp-ts) library. The codebase itself is quite simple, so even if you're beginner to functional programming, it shouldn't be hard to follow along. You can start with these [easy tasks](https://github.com/shootismoke/mobile-app/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).

More information on contributing [here](./CONTRIBUTING.md).

## :microscope: Tests

The codebase unfortunately isn't much covered by tests. Check out the `*.spec.ts` files in the project for tests. If you're interested to help out, have a look at [issue #19](https://github.com/amaurym/shoot-i-smoke/issues/19).
The codebase unfortunately isn't much covered by tests. Check out the `*.spec.ts` files in the project for tests. If you're interested to help out, have a look at [issue #19](https://github.com/shootismoke/mobile-app/issues/19).

## :newspaper: License

Expand Down
2 changes: 1 addition & 1 deletion app.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"backendSecret": "staging-ssshhh!",
"sentryPublicDsn": null
},
"githubUrl": "https://github.com/amaurym/shoot-i-smoke",
"githubUrl": "https://github.com/shootismoke/mobile-app",
"hooks": {
"postPublish": [
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/native": "^5.9.3",
"@react-navigation/stack": "^5.14.3",
"@shootismoke/ui": "^0.8.6",
"@shootismoke/ui": "^0.8.7",
"@types/i18n-js": "^3.8.0",
"@types/react-native": "~0.63.2",
"date-fns": "^2.17.0",
Expand Down
28 changes: 14 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2477,32 +2477,32 @@
xcode "2.0.0"
yargs "^12.0.2"

"@shootismoke/convert@^0.8.5":
version "0.8.5"
resolved "https://registry.yarnpkg.com/@shootismoke/convert/-/convert-0.8.5.tgz#b091d0ceb768d63ffa3cf8519bec4dc34efe6658"
integrity sha512-YXOr6ZI3PReyEt+LVXuOp3f236fQlP4C/h7UXQXBB9lyFuicsdjZXcfZDaqnkD+M0R3oA861in2FfkLKeZzoYQ==
"@shootismoke/convert@^0.8.7":
version "0.8.7"
resolved "https://registry.yarnpkg.com/@shootismoke/convert/-/convert-0.8.7.tgz#b60e03d7c67bbd38a4e744213dbb55f7cfab115b"
integrity sha512-dxryJ7F+grFaNAIgQfwQJhfFUHVeEE9gPv3kIcVTPUVbs4QGUVdqwqQ33ZofhMA9pVxWgm/cGpBsYFm++eMz4Q==
dependencies:
"@types/debug" "^4.1.5"
debug "^4.1.1"

"@shootismoke/dataproviders@^0.8.5":
version "0.8.5"
resolved "https://registry.yarnpkg.com/@shootismoke/dataproviders/-/dataproviders-0.8.5.tgz#fe316c410c811f162f34598c686afd757ff0404d"
integrity sha512-jhZCA4ejrPmjVxJ4aBz8QQXpJkcSp+QmMskxam7mLAoISL2acDq2AOkc+m3PiOfwgRyHE5tuuoN8nlLBB2qgkw==
"@shootismoke/dataproviders@^0.8.7":
version "0.8.7"
resolved "https://registry.yarnpkg.com/@shootismoke/dataproviders/-/dataproviders-0.8.7.tgz#f17ee14b640ef9fbb5bd950916a85fe56401fdf7"
integrity sha512-6leoUJNyoB8GCFq7D/3SWH/tKEu5XHct0u/+IlwhMKfI3bVg1ZjnbMJF7WHLd5a7okGP5yiBIUAAbz3I2AaU3Q==
dependencies:
"@shootismoke/convert" "^0.8.5"
"@shootismoke/convert" "^0.8.7"
axios "^0.21.0"
date-fns "^2.8.1"
date-fns-tz "^1.0.9"
fp-ts "^2.1.1"
io-ts "^2.0.1"

"@shootismoke/ui@^0.8.6":
version "0.8.6"
resolved "https://registry.yarnpkg.com/@shootismoke/ui/-/ui-0.8.6.tgz#7f4644eeff108edd012857c7e11653f4a07bafc9"
integrity sha512-lft83A7kMl1NwylFQlsS9BljGrnWwZSgLPgy/8be5l3j+K23gTsg1/pRicROcLTatjipV3724XhUBBY/bHMoGw==
"@shootismoke/ui@^0.8.7":
version "0.8.7"
resolved "https://registry.yarnpkg.com/@shootismoke/ui/-/ui-0.8.7.tgz#0fbf47a132f159b2fa14a7f78abb7891df1069e5"
integrity sha512-cPejm5ZPQC25171bXXftUqEnhkAPmMOAtexXx8cFnM3gVlbckq6TEHsjeQZXDWyko+L1NaemUt5g7SPYQmEugQ==
dependencies:
"@shootismoke/dataproviders" "^0.8.5"
"@shootismoke/dataproviders" "^0.8.7"
"@sindresorhus/slugify" "^1.1.0"
"@types/async-retry" "^1.4.2"
"@types/haversine" "^1.1.4"
Expand Down