Skip to content

Commit

Permalink
Merge branch 'main' into add-feedback-to-console
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsreichardt authored Mar 14, 2024
2 parents 76d7b21 + e5f2623 commit 84356f8
Show file tree
Hide file tree
Showing 114 changed files with 2,382 additions and 260 deletions.
6 changes: 6 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,12 @@
- "**/qr_code_scanner/**"
- "**/**qr_code_scanner**"

"feature: grades":
- changed-files:
- any-glob-to-any-file:
- "**/grades/**"
- "**/**grade**"

"user: parent":
- changed-files:
- any-glob-to-any-file:
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
| <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 use the following features together as a class:

- 📚 Homework diary
- 🕒 Timetable
- 📅 Calendar
- 💬 Information sheets
- 📁 Files

Sharezone is currently only available in German.
We might expand to more languages and regions in the future 🌍🚀
Expand All @@ -20,13 +26,12 @@ We might expand to more languages and regions in the future 🌍🚀
Used to publish alpha, beta, and stable versions to Google Play Store (Android), App Store (iOS, macOS), TestFlight (iOS, macOS), and Firebase Hosting (Web).

- 📱 **app/**: The main "Sharezone" app, created with [Flutter](https://flutter.dev).

- 📚 **lib/**: A place for our internal Dart/Flutter packages. Used to modularize and share code between app, website and admin console.

- 📖 **docs/**: Our end user documentation [docs.sharezone.net](https://docs.sharezone.net), built with [Nextra](https://nextra.site/).
Is currently pretty sparse, but we are working on improving it.

- 🌐 **website/**: Our [sharezone.net](https://sharezone.net) website (not the web app) built with Flutter.
- 🌐 **website/**: Our [sharezone.net](https://sharezone.net) website (not the web app) built with Flutter.

- 🔧 **console/**: Our admin console used by the Sharezone team for support / administrative tasks. Also built with Flutter.

Expand Down
36 changes: 14 additions & 22 deletions app/integration_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,24 +111,9 @@ For more information about running Android Device Testing for Flutter integratio

### Web

_Note: The integration tests are not working for the web at the moment because we need to migrate our app to null safety. Otherwise, the build will fail because of this message:_

```
org-dartlang-app:/app_test.dart:27:11: Error: Non-nullable variable 'dependencies' must be assigned before it can be used.
await dependencies.blocDependencies.auth.signOut();
^^^^^^^^^^^^
org-dartlang-app:/app_test.dart:34:30: Error: Non-nullable variable 'dependencies' must be assigned before it can be used.
beitrittsversuche: dependencies.beitrittsversuche,
^^^^^^^^^^^^
org-dartlang-app:/app_test.dart:35:29: Error: Non-nullable variable 'dependencies' must be assigned before it can be used.
blocDependencies: dependencies.blocDependencies,
^^^^^^^^^^^^
org-dartlang-app:/app_test.dart:36:28: Error: Non-nullable variable 'dependencies' must be assigned before it can be used.
dynamicLinkBloc: dependencies.dynamicLinkBloc,
^^^^^^^^^^^^
```

To get started testing in a web browser, download [ChromeDriver](https://chromedriver.chromium.org/downloads).
To get started testing in a web browser, download
[ChromeDriver](https://chromedriver.chromium.org/downloads). You need have the
same version of ChromeDriver as the version of Chrome you have installed.

Launch WebDriver, for example:

Expand All @@ -139,8 +124,15 @@ chromedriver --port=4444
And then run the following command in a different process:

```sh
fvm flutter test \
integration_test
--flavor dev
-d web-server
fvm flutter drive \
--driver=test_driver/integration_test.dart \
--target=integration_test/integration_test_old.dart \
--flavor dev \
--dart-define=USER_1_EMAIL=$USER_1_EMAIL \
--dart-define=USER_1_PASSWORD=$USER_1_PASSWORD \
-d chrome
```

For more information about running Flutter integration tests on the web, check
out the official Flutter repository documentation:
https://github.com/flutter/flutter/wiki/Running-Flutter-Driver-tests-with-Web
14 changes: 14 additions & 0 deletions app/lib/activation_code/src/bloc/enter_activation_code_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import 'package:crash_analytics/crash_analytics.dart';
import 'package:flutter/material.dart';
import 'package:key_value_store/key_value_store.dart';
import 'package:rxdart/rxdart.dart';
import 'package:sharezone/grades/grades_flag.dart';
import 'package:sharezone/sharezone_plus/subscription_service/subscription_flag.dart';
import 'package:helper_functions/helper_functions.dart';

Expand All @@ -27,6 +28,7 @@ class EnterActivationCodeBloc extends BlocBase {
final _enterActivationCodeSubject =
BehaviorSubject<EnterActivationCodeResult>();
final SubscriptionEnabledFlag subscriptionEnabledFlag;
final GradesEnabledFlag gradesEnabledFlag;
final KeyValueStore keyValueStore;

String? _lastEnteredValue;
Expand All @@ -36,6 +38,7 @@ class EnterActivationCodeBloc extends BlocBase {
this.crashAnalytics,
this.appFunctions,
this.subscriptionEnabledFlag,
this.gradesEnabledFlag,
this.keyValueStore,
) {
_changeEnterActivationCodeResult(NoDataEnterActivationCodeResult());
Expand Down Expand Up @@ -89,6 +92,17 @@ class EnterActivationCodeBloc extends BlocBase {
return;
}

if (_lastEnteredValue?.trim().toLowerCase() == 'grades') {
gradesEnabledFlag.toggle();
_changeEnterActivationCodeResult(
SuccessfulEnterActivationCodeResult(
'Grades',
'"Grades"-Prototyp ${gradesEnabledFlag.isEnabled ? 'aktiviert' : 'deaktiviert'}.',
),
);
return;
}

if (_lastEnteredValue?.trim().toLowerCase() == 'clearcache') {
await _clearCache(context);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import 'package:bloc_base/bloc_base.dart';
import 'package:crash_analytics/crash_analytics.dart';
import 'package:key_value_store/key_value_store.dart';
import 'package:sharezone/activation_code/src/bloc/enter_activation_code_bloc.dart';
import 'package:sharezone/grades/grades_flag.dart';

import '../../../sharezone_plus/subscription_service/subscription_flag.dart';

Expand All @@ -20,6 +21,7 @@ class EnterActivationCodeBlocFactory extends BlocBase {
final Analytics analytics;
final SharezoneAppFunctions appFunctions;
final SubscriptionEnabledFlag subscriptionEnabledFlag;
final GradesEnabledFlag gradesEnabledFlag;
final KeyValueStore keyValueStore;

EnterActivationCodeBlocFactory({
Expand All @@ -28,6 +30,7 @@ class EnterActivationCodeBlocFactory extends BlocBase {
required this.appFunctions,
required this.subscriptionEnabledFlag,
required this.keyValueStore,
required this.gradesEnabledFlag,
});

EnterActivationCodeBloc createBloc() {
Expand All @@ -36,6 +39,7 @@ class EnterActivationCodeBlocFactory extends BlocBase {
crashAnalytics,
appFunctions,
subscriptionEnabledFlag,
gradesEnabledFlag,
keyValueStore,
);
}
Expand Down
Loading

0 comments on commit 84356f8

Please sign in to comment.