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

Add formatting for Markdown files #1335

Merged
merged 2 commits into from
Mar 1, 2024
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
19 changes: 13 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
---
name: Bug report
about: Create a report about an issue or bug
title: ''
title: ""
labels: bug
assignees: ''
assignees: ""
---

## Describe the bug

<!-- A clear and concise description of what the bug is. -->

## Steps to reproduce the bug

<!-- A step by step explanation on how to trigger the bug. -->

1. Go to '...'
2. Scroll down to '....'
3. Click on '....'

## Current _broken_ behavior

<!-- What is the current broken behavior that happens when following the steps above? -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen instead. -->

## Screenshots, videos or logs

<!-- If applicable, add screenshots, videos or logs to help explain your problem. You can use code blocks (```) to format the logs -->

## Tested device
Expand All @@ -37,13 +42,15 @@ assignees: ''
<!-- What app type of Sharezone did you use? The web-app in the browser? The macOS app from the AppStore? Android app? -->

- App version: <!-- e.g. "1.6.1 (315)" -->
<!-- In which version of the app does the error occur?
You can find the version under Settings > "About us".
Otherwise you can find a tutorial with pictures under this link:
<!-- In which version of the app does the error occur?
You can find the version under Settings > "About us".
Otherwise you can find a tutorial with pictures under this link:
https://sharezone.zendesk.com/hc/de/articles/360013355879-Welche-Version-der-App-habe-ich-installiert- -->

## Additional context

<!-- Add any other context about the problem here. -->

## Possible solution
<!-- If know you a possible solution, you can write it here down. If you don't know a possible solution, you can leave this section empty or delete it. -->

<!-- If know you a possible solution, you can write it here down. If you don't know a possible solution, you can leave this section empty or delete it. -->
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/Pods/**
app/build/**
23 changes: 14 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _Note: The `CONTRIBUTING.md` is in the process of making. See [#28](https://gith

We love, that you are interested in contributing to Sharezone 💙 There are many ways to contribute and we appreciate all of them. This document gives a rough overview of how you can contribute to Sharezone and which steps you need to follow to set up the development environment.

* [How to set up your development environment](#how-to-set-up-your-development-environment)
- [How to set up your development environment](#how-to-set-up-your-development-environment)

If you have any questions, please join our [Discord](https://sharezone.net/discord).

Expand All @@ -22,8 +22,8 @@ You can use the operating system you like. But we recommend to use macOS because

#### Known issues:

* Golden tests are only passing with macOS
* The Sharezone CLI (used for development) only officially supports macOS and Windows (should also work with other operating systems, but might cause problems in some cases)
- Golden tests are only passing with macOS
- The Sharezone CLI (used for development) only officially supports macOS and Windows (should also work with other operating systems, but might cause problems in some cases)

If you discover unknown issues which are related to the operating system, please submit a new ticket on [GitHub](https://github.com/SharezoneApp/sharezone-app/issues/new/choose).

Expand All @@ -44,26 +44,29 @@ Please follow the official documentation: [Install Flutter](https://docs.flutter
### Sharezone CLI

We written our own CLI to manage our repository. Common use cases for the CLI are:
* Get all Flutter/Dart packages for all packages inside this repository (`sz pub get`)
* Run all tests for all packages inside this repository (`sz test`)
* Analyze all packages inside this repository (`sz analyze`)

- Get all Flutter/Dart packages for all packages inside this repository (`sz pub get`)
- Run all tests for all packages inside this repository (`sz test`)
- Analyze all packages inside this repository (`sz analyze`)

#### macOS

Execute the following steps to install the Sharezone CLI:

1. [Clone this repository](#clone-this-repository)
2. Navigate to the repository (`cd sharezone-app`)
3. Run `dart pub get -C tools/sz_repo_cli`
4. Add the `./bin` to your environment variables
5. Restart your terminal

You should now be able to run `sz` or `sharezone` in your terminal.
You should now be able to run `sz` or `sharezone` in your terminal.

#### Windows

At the moment, there is no Windows support for a command alias like `sz` or `sharezone`. Instead you need to run `dart run tools/sz_repo_cli/bin/sz_repo_cli.dart`, like `dart run tools/sz_repo_cli/bin/sz_repo_cli.dart pub get`. Please keep this in mind when reading commands like `sz pub get`.

Execute the following steps to install the Sharezone CLI:

1. [Clone this repository](#clone-this-repository)
2. Navigate to the repository (`cd sharezone-app`)
3. Run `dart pub get -C tools/sz_repo_cli`
Expand All @@ -79,13 +82,15 @@ git clone https://github.com/SharezoneApp/sharezone-app.git
```

After cloning the repository, we recommend to execute the following steps:

1. Get all dependencies with `sz pub get`

### Flutter Version Management (FVM)

We use [FVM](https://fvm.app) to have a consistent Flutter version across the developers and our CI/CD. You find in `.fvm/fvm_config.json` the Flutter, which we currently using.

To install & use FVM, follow the following steps:

1. Install FVM by running `dart pub global activate fvm` or use the other installation methods (see [FVM docs](https://fvm.app/docs/getting_started/installation))
2. Navigate to the root of the repository
3. Run `fvm install` (This installs the Flutter version from `.fvm/fvm_config.json`)
Expand All @@ -106,7 +111,7 @@ Make sure, you have the 0.3.0-dev.19 version or higher installed. You can check

## Running the app

After you have set up your development environment, you can run the app.
After you have set up your development environment, you can run the app.

First change the working directory to the `app` folder by running:

Expand All @@ -128,4 +133,4 @@ fvm flutter run --flavor dev --target lib/main_dev.dart
fvm flutter run --target lib/main_dev.dart
```

This command runs the app in the development mode. Keep in mind that the app will not use our production backend. Instead, it will use the development backend. This means that you can't use the app with your production account. You need to create a new account on the development backend.
This command runs the app in the development mode. Keep in mind that the app will not use our production backend. Instead, it will use the development backend. This means that you can't use the app with your production account. You need to create a new account on the development backend.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

## Download Sharezone

| Android | iOS | macOS | Web |
| --- | ---| --- | --- |
<a href='https://play.google.com/store/apps/details?id=de.codingbrain.sharezone'><img width=200 alt='Get Sharezone on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png'/> | <a href='https://apps.apple.com/de/app/sharezone/id1434868489'><img width=150 alt='Get Sharezone for iOS' src='https://user-images.githubusercontent.com/24459435/172480740-d70aff84-fcb6-4f4a-bbd1-a3e2fa58f3a9.svg'/> | <a href='https://apps.apple.com/de/app/sharezone/id1434868489'><img width=190 alt='Get Sharezone for macOS' src='https://user-images.githubusercontent.com/24459435/172480858-f2631b6c-c56d-47d2-abe5-84f735edbe85.svg'/> | <a href='https://web.sharezone.net'><img width=170 alt='Open the Sharezone web app' src='https://user-images.githubusercontent.com/29028262/151261789-ac4d7496-ff14-4ef0-8d9f-c9fee72cb302.png'/>
| Android | iOS | macOS | Web |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a href='https://play.google.com/store/apps/details?id=de.codingbrain.sharezone'><img width=200 alt='Get Sharezone on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png'/> | <a href='https://apps.apple.com/de/app/sharezone/id1434868489'><img width=150 alt='Get Sharezone for iOS' src='https://user-images.githubusercontent.com/24459435/172480740-d70aff84-fcb6-4f4a-bbd1-a3e2fa58f3a9.svg'/> | <a href='https://apps.apple.com/de/app/sharezone/id1434868489'><img width=190 alt='Get Sharezone for macOS' src='https://user-images.githubusercontent.com/24459435/172480858-f2631b6c-c56d-47d2-abe5-84f735edbe85.svg'/> | <a href='https://web.sharezone.net'><img width=170 alt='Open the Sharezone web app' src='https://user-images.githubusercontent.com/29028262/151261789-ac4d7496-ff14-4ef0-8d9f-c9fee72cb302.png'/> |

[Sharezone](https://sharezone.net) is a collaborative school organization app for iOS, Android, macOS and web.\
With Sharezone pupils, teachers and even parents can organize homework, files, timetables, events, information sheets and more together.
With Sharezone pupils, teachers and even parents can organize homework, files, timetables, events, information sheets and more together.

Sharezone is currently only available in German.
We might expand to more languages and regions in the future 🌍🚀
Expand All @@ -26,9 +26,9 @@ Guidelines for users and developers for the EUPL v1.2 can be found [here](https:

## Contribute

To contribute just open a PR and sign the [Contributor License Agreement](https://github.com/SharezoneApp/public/wiki/Sharezone-CLA-Overview).
A bot will automatically ask you to accept the CLA when a PR is opened if you haven't already.
To contribute just open a PR and sign the [Contributor License Agreement](https://github.com/SharezoneApp/public/wiki/Sharezone-CLA-Overview).
A bot will automatically ask you to accept the CLA when a PR is opened if you haven't already.

We have more instructions to help you get started in the [CONTRIBUTING.md](CONTRIBUTING.md).

## Follow us
Expand Down
5 changes: 2 additions & 3 deletions app/android/fastlane/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
fastlane documentation
----
## fastlane documentation

# Installation

Expand All @@ -23,7 +22,7 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do

Deploy to Google Play Store

----
---

This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.

Expand Down
1 change: 0 additions & 1 deletion app/integration_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Integration tests for Android are written using the [patrol ](https://pub.dev/pa

Integration tests for all other platforms are written using the [integration_test](https://github.com/flutter/flutter/tree/master/packages/integration_test) package, provided by the SDK.


## How to run integration tests

In order to run the integration tests, you need specific credentials for the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

You can customize the launch screen with your own desired assets by replacing the image files in this directory.

You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
19 changes: 14 additions & 5 deletions app/lib/groups/group_join/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,46 @@
### Group Join Documentation ###
### Group Join Documentation

# Zusammenfassung
Das GroupJoin System dient dem Beitreten einer Gruppe mittels eines **Sharecodes** oder eines **JoinLinks**. Dabei sendet der Client eine Join Anfrage an die https-Call Cloudfunction *JoinGroupByValue*. Diese verarbeitet die Anfrage anschließend.

Das GroupJoin System dient dem Beitreten einer Gruppe mittels eines **Sharecodes** oder eines **JoinLinks**. Dabei sendet der Client eine Join Anfrage an die https-Call Cloudfunction _JoinGroupByValue_. Diese verarbeitet die Anfrage anschließend.

# Parameter bei Anfrage

Folgende Daten müssen an die Cloudfunction übergeben:

- "value" [string]: Der Sharecode oder der JoinLink
- "memberID" [string]: Die UserId des Client Nutzers
- "version" [number]: Die Client-Version, welche GroupJoin Features unterstützt werden. Aktuell verfügbar {1, 2}
- "courseList" [List<string>]: Eine Liste mit courseIds, für das Beitreten einer Klasse. Dieser Parameter ist nur in version 2 verfügbar.

# Response der Anfrage

Als Ergebnis der Anfrage gibt es folgende Responses:

- SuccessfullJoinResult
- RequireCourseSelectionsJoinResult (ab Version 2)
- ErrorJoinResult

# Details zu ErrorJoinResult

Es kann verschiedene Fehler geben, welche zu einem gescheiterten Join Versuch führen:

- NotFound: Der Sharecode/Joinlink ist fehlerhaft und wurde nicht gefunden
- AlreadyMember: Der Nutzer ist bereits Mitglied dieser Gruppe
- NotPublic: Ein Admin der Gruppe hat das Beitreten deaktiviert
- Unknown: Beschreibt einen Unbekannten Fehler in der CloudFunction
- NoInternet: Keine Internetverbindung, diese Fehlermeldung wird auf dem *client* verarbeitet
- NoInternet: Keine Internetverbindung, diese Fehlermeldung wird auf dem _client_ verarbeitet

# Details zu RequireCourseSelectionsJoinResult

Um Wahlkurse in Klassen besser zu unterstützen, kann man bei zukünftigen Beitritsversuchen direkt Auswählen, welchen Kursen man beitreten möchte. Ältere Clients treten automatisch allen Kursen der Klasse bei. Der Ablauf ist dabei folgender:

1. Nutzer schickt Joinanfrage mittels Sharecode/JoinLink
2. Als Response gibt es ein **RequireCourseSelectionsJoinResult**. Dieses beinhaltet als Information eine Map mit Informationen über verfügbare Kurse.
3. Der Nutzer wählt beim sich öffnenden Dialog die gewünschten Kurse aus und schickt erneut eine Anfrage, dieses mal fügt er die gewünschten Kurse als Liste hinzu.
4. Der Client wirft ein **SuccessfullJoinResult** zurück.

# Edge-Cases

- *Was passiert, wenn während des JoinVersuchs ein neuer Kurs hinzugefügt wird?*
Aktuell wird der Nutzer dann diesem Kurs nicht hinzugefügt, wenn er eine eigene Auswahl erledigt hat. Stattdessen tritt er nur den Kursen seiner Auswahl bei. Alternative Ideen siehe: https://gitlab.com/codingbrain/sharezone/sharezone-app/-/merge_requests/377#note_383244137
- _Was passiert, wenn während des JoinVersuchs ein neuer Kurs hinzugefügt wird?_
Aktuell wird der Nutzer dann diesem Kurs nicht hinzugefügt, wenn er eine eigene Auswahl erledigt hat. Stattdessen tritt er nur den Kursen seiner Auswahl bei. Alternative Ideen siehe: https://gitlab.com/codingbrain/sharezone/sharezone-app/-/merge_requests/377#note_383244137
9 changes: 5 additions & 4 deletions app/lib/sharezone_plus/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Sharezone Plus

In our app users can subscribe to a paid tier called "Sharezone Plus". With this
subscription features can be unlocked that are only accessible to paid users.
subscription features can be unlocked that are only accessible to paid users.

Sharezone Plus is available for the different user types under the same name but
technically as different subscriptions (i.e. `sharezone_plus_teacher`,
Expand All @@ -23,10 +23,11 @@ for the case that the user switches account types and has a subscription for the
old account type that is still active or that the user activates another
subscription from "outside" (e.g. via the Play Store).

For now
* we will warn the user if they switch account types that they should cancel
For now

- we will warn the user if they switch account types that they should cancel
their old subscription
* only consider the last subscription that was activated as the active
- only consider the last subscription that was activated as the active
subscription inside Firestore/`AppUser`.

If this leads to confusion we may need to change this behavior.
2 changes: 2 additions & 0 deletions bin/source_of_truth/commands_source_of_truth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ check_license_headers: addlicense -check -c "Sharezone UG (haftungsbeschränkt)"
add_license_headers: addlicense -c "Sharezone UG (haftungsbeschränkt)" -f header_template.txt -ignore "**/GeneratedPluginRegistrant.swift" -ignore "**/**.g.dart" -ignore "**/**.mocks.dart"
format_action_files: prettier ".github/workflows/" --write
check_format_action_files: prettier ".github/workflows/" --check
format_markdown_files: prettier "**/*.md" --write
check_format_markdown_files: prettier "**/*.md" --check
Loading
Loading