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

Release/v5.6.4 #1114

Merged
merged 28 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1e40eb9
chore: clear input on error
ErikSin Mar 6, 2023
05cc26e
chore: update touchpoint for gitbook link
ErikSin Mar 6, 2023
23c8d1e
chore: take out unnecessary import
ErikSin Mar 6, 2023
8ae1860
chore: explicit react.fragment
ErikSin Mar 6, 2023
dc43e99
Merge pull request #1092 from digidem/Es/chore-adjust-touchpoint-and-…
ErikSin Mar 6, 2023
6d85ee5
chore: New Crowdin updates (#1091)
digidem-bot Mar 6, 2023
1a46457
New translations en.json (Thai)
digidem-bot Mar 7, 2023
0deeeca
New translations en.json (Sinhala)
digidem-bot Mar 7, 2023
befe4b1
New translations en.json (Sinhala)
digidem-bot Mar 8, 2023
62ce9a8
New translations en.json (Thai)
digidem-bot Mar 27, 2023
2e8e579
New translations en.json (Mongolian)
digidem-bot May 22, 2023
ee0bf06
Improved instructions for building locally (#1054)
rudokemper Jun 15, 2023
ca167c2
Merge branch 'deploy' into develop
ErikSin Jun 29, 2023
e1d7a1a
New translations en.json (Mongolian)
digidem-bot Aug 8, 2023
90acd1a
New translations en.json (Mongolian)
digidem-bot Aug 14, 2023
b69d402
New translations en.json (Mongolian)
digidem-bot Aug 25, 2023
c034010
New translations en.json (Mongolian)
digidem-bot Aug 25, 2023
f29db62
New translations en.json (Mongolian)
digidem-bot Aug 25, 2023
b92f3c7
New translations en.json (Mongolian)
digidem-bot Aug 26, 2023
adce681
New translations en.json (Mongolian)
digidem-bot Aug 26, 2023
d7f8076
New translations en.json (Mongolian)
digidem-bot Aug 27, 2023
026aedf
New translations en.json (Mongolian)
digidem-bot Aug 27, 2023
97d7267
New translations en.json (Mongolian)
digidem-bot Aug 27, 2023
3570327
Merge branch 'develop' into l10n_develop
ErikSin Aug 28, 2023
59575a5
Merge pull request #1094 from digidem/l10n_develop
ErikSin Aug 28, 2023
4cfd3c7
chore: update bitrise yml(#1111)
ErikSin Aug 28, 2023
0d435a8
chore: update bitrise.yml (#1113)
ErikSin Aug 29, 2023
fcdadb4
chore(release): Prepare release 5.6.4
ErikSin Aug 29, 2023
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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [5.6.4](https://github.com/digidem/mapeo-mobile/compare/v5.6.3...v5.6.4) (2023-08-29)

### [5.6.3](https://github.com/digidem/mapeo-mobile/compare/v5.6.2...v5.6.3) (2023-06-29)

### [5.6.2](https://github.com/digidem/mapeo-mobile/compare/v5.6.1...v5.6.2) (2023-05-25)
Expand Down
141 changes: 72 additions & 69 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,32 @@
# Contributing

Thank you so much for taking the time to contribute to Mapeo development!
mapeo-mobile is a mobile app written in react-native that currently runs on
Android. For most development you will need the Android SDK installed on your
computer, but it is possible to contribute to UI Component development using the
storybook server.
Thank you so much for taking the time to contribute to Mapeo development! Mapeo Mobile is a mobile app written in react-native that currently runs on Android.

After doing the [Initial Install](#initial-install), for most development you will need Android Studio and the Android SDK installed on your computer as outlined in the [Full App Development](#full-app-development) section.

It is also possible to contribute to UI Component development using the
storybook server. See the below [Storybook](#storybook) section for more information on that.

## Initial Install

In order to start developing you will need git and node >=v10 installed on your
computer (node v14 does not seem to be working at this time, you can use [nvm](https://github.com/nvm-sh/nvm) to rollback
your node version). For many development tasks you will also need the Android SDK installed.
your node version).

```sh
git clone https://github.com/digidem/mapeo-mobile.git
cd mapeo-mobile
npm install
```

## Storybook

[Storybook](https://storybook.js.org) is a tool for developing React UI
components in isolation. You can see how a component renders with different
props as inputs, and changes you make to the code will update in realtime
through the storybook UI. What you see in the Storybook UI is defined by
"stories" which are in the [`src/stories`](src/stories) folder.

### Storybook Web

**_Storybook web is fragile, it currently requires some code modifications for
everything to work correctly on web_**

The easiest way to get started without setting up your machine for mobile
development is to use Storybook web. It uses
[`react-native-web`](https://github.com/necolas/react-native-web) internally in
order to render react-native components in a browser. Note that layout and
colors do not appear exactly the same in the browser, and you may need to add
some additional styles to get things looking right. To start the storybook web
server:

```sh
npm run storybook-web
```

Your default browser should open with the Storybook interface. You can browse
different stories, and as you edit a component you will see your changes update
in real-time.

### Storybook Native

For a development environment that is closer to the actual app end-users will
see you can run storybook on a device or in the Android emulator. To install and
run the app in storybook mode on a device:

```sh
npm run android-storybook
```

You can edit components and write new stories and see how components on-screen
render in isolation.

Optionally you can also start a server that will give you a web interface to
control what you see on the mobile device:

```sh
adb reverse tcp:7007 tcp:7007
npm run storybook-native
```

You will probably need to reload the storybook mobile app for the web app to be
able to control the mobile app.

## Full App Development

### Pre-requisites

Follow the [official React Native instructions](https://reactnative.dev/docs/0.67/environment-setup) for setting up the majority of what's needed for your development environment (ignore the "Creating a new application" section and anything that comes after it).
In order to develop the full app you will need the Android Studio, Android SDK, React Native CLI, and other dependencies installed, as per [this guide](https://reactnative.dev/docs/0.66/environment-setup) following the instructions up to *Creating a new application*.

In order to develop the full app you will need the Android SDK installed and
specifically [21.4.7075529 of the NDK](https://developer.android.com/ndk/guides/) in order to build
nodejs-mobile for Android.
Once you have done so and have Android Studio open, you may need to open your app's `/android` folder in Android Studio, so that it detects, downloads and configures requirements that might be missing, such as the NDK and CMake to build the native code part of the project. However, the version of NDK to use with Mapeo Mobile needs to be specifically [21.4.7075529](https://developer.android.com/ndk/guides/). You can download this version (as well as CMake if necessary) in Android Studio by navigating to Tools -> SDK Manager -> SDK Tools.

You may need to open your app's `/android` folder in Android Studio, so that it detects, downloads and configures requirements that might be missing, like the NDK and CMake to build the native code part of the project.

Due to an [issue](https://github.com/rnmapbox/maps/issues/1572) with installing some Mapbox SDK Android deps, you will also have to complete additional steps before getting the app to build:

Expand All @@ -95,17 +40,17 @@ Due to an [issue](https://github.com/rnmapbox/maps/issues/1572) with installing
MAPBOX_DOWNLOAD_TOKEN=your_token_here npm run android
```

- Export the environment variable in your shell environment. Usually this will be in a file like `$HOME/.bashrc` (or `$HOME/.bash_profile`), `$HOME/.zshrc`, etc (depending on which shell you use). For example, add a line like this in the file and then restart your shell session:
- Create a `.env` file in your Mapeo Mobile directory and paste the following in there with your Mapbox access token. This will be utilized when building Mapeo Mobile.

```sh
export MAPBOX_DOWNLOAD_TOKEN=your_token_here
MAPBOX_DOWNLOAD_TOKEN=your_token_here
```

We recognize that this extra configuration is not ideal and we intend for this to be temporary.

### Testing Device

To use a real device, you will need to [enable USB
Testing Mapeo Mobile builds locally is much faster and more efficient with a real device. To use a real device, you will need to [enable USB
debugging](https://developer.android.com/studio/debug/dev-options) and connect
the phone to your computer with a USB cable. Enter `adb devices` in the terminal
to check that you can see the phone. You may need to unlock the phone screen and
Expand Down Expand Up @@ -136,7 +81,13 @@ dev version of the app on your device:
npm run android
```

You can configure the app to reload whenever you make a change: shake the device
This process may take a while when you are first building the app. Additionally, to bypass unneeded latency when installing certain dependencies like TypeScript, you can add the following to your `.gitconfig` file in your home directory (`~`):
```sh
[url "https://"]
insteadOf = git://
```

Once started, you can configure the app to reload whenever you make a change: shake the device
to bring up the developer menu, and select "Enable Live Reload". Whenever you
change the code the app should reload. Changes to any code in the `src/frontend`
folder will appear immediately after a reload. If you change anything in
Expand All @@ -147,7 +98,7 @@ computer.
`npm run android` does two things: starts "Metro bundler" in one window, and
then builds and installs the dev version of Mapeo on the connected device.
That might not work on all machines, so in order to start the Metro bundler on
its own (e.g. if you already have the app installed), use `npm start`.
its own (e.g. if you already have the app installed), use `npm start` first.

### Running end-to-end tests

Expand All @@ -169,6 +120,58 @@ Now, to run the tests on a device or a running emulator, replace `DEVICE_ID` in
RN_SRC_EXT=e2e detox test -c android.device.debug -n DEVICE_ID -r
```

## Storybook

[Storybook](https://storybook.js.org) is a tool for developing React UI
components in isolation. You can see how a component renders with different
props as inputs, and changes you make to the code will update in realtime
through the storybook UI. What you see in the Storybook UI is defined by
"stories" which are in the [`src/stories`](src/stories) folder.

### Storybook Web

**_Storybook web is fragile, it currently requires some code modifications for
everything to work correctly on web_**

The easiest way to get started without setting up your machine for mobile
development is to use Storybook web. It uses
[`react-native-web`](https://github.com/necolas/react-native-web) internally in
order to render react-native components in a browser. Note that layout and
colors do not appear exactly the same in the browser, and you may need to add
some additional styles to get things looking right. To start the storybook web
server:

```sh
npm run storybook-web
```

Your default browser should open with the Storybook interface. You can browse
different stories, and as you edit a component you will see your changes update
in real-time.

### Storybook Native

For a development environment that is closer to the actual app end-users will
see you can run storybook on a device or in the Android emulator. To install and
run the app in storybook mode on a device:

```sh
npm run android-storybook
```

You can edit components and write new stories and see how components on-screen
render in isolation.

Optionally you can also start a server that will give you a web interface to
control what you see on the mobile device:

```sh
adb reverse tcp:7007 tcp:7007
npm run storybook-native
```

You will probably need to reload the storybook mobile app for the web app to be
able to control the mobile app.
## Release Variants

We generate different variants of the app, each with a different Application ID,
Expand Down
17 changes: 9 additions & 8 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ workflows:
opts:
is_expand: false
steps:
- script@1.1.6:
- script@1.2.0:
title: Rename APKs
inputs:
- content: |
Expand Down Expand Up @@ -71,7 +71,7 @@ workflows:
# Save the variable to the env so it is accessible in other build steps
envman add --key BITRISE_APK_PATH_LIST --value "$NEW_APK_PATH_LIST"
- [email protected]: {}
- script@1.1.6:
- script@1.2.0:
title: Set APK path variables
inputs:
- content: |
Expand Down Expand Up @@ -102,7 +102,7 @@ workflows:
- bucket_name: $AWS_S3_BUCKET_NAME
- path_in_bucket: release/v${VERSION_NAME}
- file_path: $RELEASE_APK_PATH
- script@1.1.6:
- script@1.2.0:
title: Update download URL for release
inputs:
- content: |-
Expand Down Expand Up @@ -131,7 +131,7 @@ workflows:
- bucket_name: $AWS_S3_BUCKET_NAME
- path_in_bucket: release-ICCA
- file_path: $ICCA_RELEASE_APK_PATH
- script@1.1.6:
- script@1.2.0:
title: Update download URL for ICCA
is_skippable: true
inputs:
Expand Down Expand Up @@ -169,7 +169,7 @@ workflows:
opts:
is_expand: false
steps:
- script@1.1.6:
- script@1.2.0:
title: Rename APKs
inputs:
- content: |
Expand Down Expand Up @@ -210,7 +210,7 @@ workflows:

# Save the variable to the env so it is accessible in other build steps
envman add --key BITRISE_APK_PATH_LIST --value "$NEW_APK_PATH_LIST"
- script@1.1.6:
- script@1.2.0:
title: Set APK path variables
inputs:
- content: |
Expand Down Expand Up @@ -281,7 +281,7 @@ workflows:
inputs:
- destination: $PROJECT_LOCATION/app/mapeo-release-key.keystore
- source: $BITRISEIO_ANDROID_KEYSTORE_URL
- script@1.1.6:
- script@1.2.0:
title: Update SDK components
inputs:
- content: |
Expand All @@ -306,6 +306,7 @@ workflows:

echo "Downloading correct cmake version"

rm -rf /usr/local/share/android-sdk/cmdline-tools/latest/
mkdir /usr/local/share/android-sdk/cmdline-tools/latest/
mkdir /usr/local/share/android-sdk/cmdline-tools/latest/bin/
ln -s /usr/local/share/android-sdk/cmdline-tools/cmdline-tools/bin/sdkmanager /usr/local/share/android-sdk/cmdline-tools/latest/bin/sdkmanager
Expand All @@ -322,7 +323,7 @@ workflows:
inputs:
- npm_version: ""
- command: run build:translations
- script@1.1.6:
- script@1.2.0:
title: Set version name & code
inputs:
- content: |
Expand Down
Loading
Loading