From 818a78eca00a6fc60d5fce90b561f73ae9d2483a Mon Sep 17 00:00:00 2001 From: Aleksandrs Proskurins Date: Tue, 15 Nov 2022 11:49:13 +0200 Subject: [PATCH] Update documentation files (#313) * Updated md files * Changelog * Update CONTRIBUTING.md Co-authored-by: Stefan Ceriu * PR fixes * Update README.md Co-authored-by: Stefan Ceriu Co-authored-by: Stefan Ceriu --- CONTRIBUTING.md | 2 +- README.md | 4 ++++ Tools/Scripts/README.md | 16 ++++++++++++++++ Tools/Scripts/createScreen.sh | 2 +- changelog.d/312.doc | 1 + 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 changelog.d/312.doc diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d8aa2c451..273140585 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,7 +50,7 @@ Please see our [pull request guide](https://github.com/vector-im/element-android ## Implementing a new screen -New screen flows are currently using MVVM-Coordinator pattern. Please refer to the screen template under [Tools/Scripts/createScreen.sh](Tools/Scripts/createScreen.sh) to create a new screen or a new screen flow. +New screen flows are currently using the MVVM-Coordinator pattern. Please refer to the [create screen template](Tools/Scripts/README.md#create-screen-templates) section. ## Changelog diff --git a/README.md b/README.md index 99779f8a3..9ff2e1533 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,10 @@ Please see our [contribution guide](CONTRIBUTING.md). Come chat with the community in the dedicated Matrix [room](https://matrix.to/#/#element-ios:matrix.org). +## Build instructions + +Please refer to the [setting up a development environment](CONTRIBUTING.md#setting-up-a-development-environment) section from the [contribution guide](CONTRIBUTING.md). + ## Support When you are experiencing an issue on ElementX iOS, please first search in [GitHub issues](https://github.com/vector-im/element-x-ios/issues) diff --git a/Tools/Scripts/README.md b/Tools/Scripts/README.md index 34ffeb57b..024858b96 100644 --- a/Tools/Scripts/README.md +++ b/Tools/Scripts/README.md @@ -23,3 +23,19 @@ Usage: ``` ./bootTestSimulator.py 'iPhone 13 Pro Max' ``` +## Create screen templates +New screen flows are currently using the MVVM-Coordinator pattern. Run [Tools/Scripts/createScreen.sh](Tools/Scripts/createScreen.sh) to create a new screen and all its required dependencies. + +Usage: +``` +./createScreen.sh Folder MyScreenName +``` + +After that run `xcodegen` to regenerate the project. + +`createScreen.sh` script will create: + +- `Folder` within the `/ElementX/Sources/Screens/`. Files inside will be named `MyScreenNameXxx`. +- `MyScreenNameScreenUITests.swift` within `UITests/Sources` +- `MyScreenNameViewModelTests.swift` within `UnitTests/Sources/Unit` + diff --git a/Tools/Scripts/createScreen.sh b/Tools/Scripts/createScreen.sh index a0b5b3600..d2f813df4 100755 --- a/Tools/Scripts/createScreen.sh +++ b/Tools/Scripts/createScreen.sh @@ -1,7 +1,7 @@ #!/bin/bash if [ ! $# -eq 2 ]; then - echo "Usage: ./createSwiftUISimpleScreen.sh Folder MyScreenName" + echo "Usage: ./createScreen.sh Folder MyScreenName" exit 1 fi diff --git a/changelog.d/312.doc b/changelog.d/312.doc new file mode 100644 index 000000000..db1136f3c --- /dev/null +++ b/changelog.d/312.doc @@ -0,0 +1 @@ +Updated some documentation files.