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

style: groups as cards and group images #120

Merged
merged 20 commits into from
Jan 3, 2025
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
30 changes: 14 additions & 16 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,24 @@

<uses-permission android:name="android.permission.READ_CONTACTS"/>

<!-- https://pub.dev/packages/url_launcher#android -->
<queries>
<intent>
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="mailto"/>
</intent>
</queries>

<application
android:label="GRUP"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<!-- Required by image cropper: https://pub.dev/packages/image_cropper -->
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Ucrop.CropTheme"/>

<activity
android:name=".MainActivity"
android:exported="true"
Expand All @@ -28,14 +42,6 @@
</intent-filter>

<meta-data android:name="flutter_deeplinking_enabled" android:value="true"/>
<!-- Deprecated -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="http" android:host="appfor.it"/>
<data android:scheme="https"/>
</intent-filter>

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
Expand All @@ -45,14 +51,6 @@
<data android:scheme="https"/>
</intent-filter>

<!-- Deprecated -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="appforit"/>
</intent-filter>

<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
Expand Down
46 changes: 45 additions & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,38 @@ PODS:
- GTMSessionFetcher/Core (3.5.0)
- GTMSessionFetcher/Full (3.5.0):
- GTMSessionFetcher/Core
- image_cropper (0.0.4):
- Flutter
- TOCropViewController (~> 2.7.4)
- image_picker_ios (0.0.1):
- Flutter
- in_app_review (2.0.0):
- Flutter
- integration_test (0.0.1):
- Flutter
- package_info_plus (0.4.5):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- PostHog (3.18.0)
- posthog_flutter (0.0.1):
- Flutter
- FlutterMacOS
- PostHog (~> 3.0)
- Sentry/HybridSDK (8.42.0)
- sentry_flutter (8.12.0):
- Flutter
- FlutterMacOS
- Sentry/HybridSDK (= 8.42.0)
- share_plus (0.0.1):
- Flutter
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sign_in_with_apple (0.0.1):
- Flutter
- TOCropViewController (2.7.4)
- url_launcher_ios (0.0.1):
- Flutter

Expand All @@ -53,9 +71,14 @@ DEPENDENCIES:
- flutter_contacts (from `.symlinks/plugins/flutter_contacts/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`)
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- in_app_review (from `.symlinks/plugins/in_app_review/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- posthog_flutter (from `.symlinks/plugins/posthog_flutter/ios`)
- sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`)
Expand All @@ -67,6 +90,9 @@ SPEC REPOS:
- GoogleSignIn
- GTMAppAuth
- GTMSessionFetcher
- PostHog
- Sentry
- TOCropViewController

EXTERNAL SOURCES:
app_links:
Expand All @@ -79,12 +105,22 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_native_splash/ios"
google_sign_in_ios:
:path: ".symlinks/plugins/google_sign_in_ios/darwin"
image_cropper:
:path: ".symlinks/plugins/image_cropper/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
in_app_review:
:path: ".symlinks/plugins/in_app_review/ios"
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
posthog_flutter:
:path: ".symlinks/plugins/posthog_flutter/ios"
sentry_flutter:
:path: ".symlinks/plugins/sentry_flutter/ios"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
Expand All @@ -104,14 +140,22 @@ SPEC CHECKSUMS:
GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
image_cropper: 5f162dcf988100dc1513f9c6b7eb42cd6fbf9156
image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
in_app_review: 5596fe56fab799e8edb3561c03d053363ab13457
integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
PostHog: 6ce18b57e7de83868707dec4a0c35ebbc866e88b
posthog_flutter: 37053225347313fb5385539b300a8237fae24e34
Sentry: 38ed8bf38eab5812787274bf591e528074c19e02
sentry_flutter: a72ca0eb6e78335db7c4ddcddd1b9f6c8ed5b764
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
sign_in_with_apple: c5dcc141574c8c54d5ac99dd2163c0c72ad22418
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d

PODFILE CHECKSUM: 7be2f5f74864d463a8ad433546ed1de7e0f29aef
PODFILE CHECKSUM: a57f30d18f102dd3ce366b1d62a55ecbef2158e5

COCOAPODS: 1.16.2
5 changes: 4 additions & 1 deletion ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>mailto</string>
</array>
<key>FlutterDeepLinkingEnabled</key>
<true/>
<key>ITSAppUsesNonExemptEncryption</key>
Expand Down Expand Up @@ -63,7 +67,6 @@
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.655087059227-o10vdnfsvnkl9ct8isg8db3j74s0rfur</string>
<string>appforit</string>
<string>grup</string>
</array>
</dict>
Expand Down
2 changes: 0 additions & 2 deletions ios/Runner/Runner.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:appfor.it</string>
<string>webcredentials:appfor.it</string>
<string>applinks:grup.rsvp</string>
<string>webcredentials:grup.rsvp</string>
</array>
Expand Down
2 changes: 1 addition & 1 deletion ios/ci_scripts/ci_post_clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ flutter precache --ios
flutter pub get

# Install CocoaPods using Homebrew.
HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates.
export HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates.
brew install cocoapods

# Install CocoaPods dependencies.
Expand Down
1 change: 1 addition & 0 deletions lib/actions/actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export 'auth.dart';
export 'date.dart';
export 'deeplinks.dart';
export 'default_rules.dart';
export 'feedback.dart';
export 'groups.dart';
export 'invites.dart';
export 'locale.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/actions/feedback.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// An action to indicate that the user has interacted with the feedback card
class InteractedWithFeedback {}
20 changes: 20 additions & 0 deletions lib/actions/groups.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'dart:async';

import 'package:flutter/foundation.dart';
import 'package:image_picker/image_picker.dart';
import 'package:parousia/models/models.dart';

/// Dispatched when a group is selected and the group details screen should be opened.
@immutable
Expand All @@ -25,3 +27,21 @@ class GroupRefreshAllAction {

GroupRefreshAllAction({completer}) : completer = completer ?? Completer();
}

/// Dispatched when a group is created or updated.
@immutable
class CreateGroupAction {
const CreateGroupAction({required this.group, this.image});

final Group group;
final XFile? image;
}

/// Dispatched when a group is updated.
@immutable
class UpdateGroupAction {
const UpdateGroupAction({required this.group, this.image});

final Group group;
final XFile? image;
}
62 changes: 41 additions & 21 deletions lib/epics/groups.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ import 'package:redux_entity/redux_entity.dart';
import 'package:redux_epics/redux_epics.dart';
import 'package:rxdart/rxdart.dart';
import 'package:supabase/supabase.dart';
import 'package:uuid/uuid.dart';

createGroupsEpics(GroupsRepository groups) => combineEpics<AppState>([
createGroupsEpics(GroupsRepository groups, StorageRepository storage) =>
combineEpics<AppState>([
_createRetrieveAllGroupsEpic(groups),
_createRetrieveOneGroupEpic(groups),
_createCreateOneGroupEpic(groups),
_createUpdateOneGroupEpic(groups),
_createCreateOneGroupEpic(groups, storage),
_createUpdateOneGroupEpic(groups, storage),
_createDeleteOneGroupEpic(groups),
_reloadGroupOnScheduleDateChange,
_loadGroupsOnSignInEpic,
Expand Down Expand Up @@ -103,28 +105,46 @@ Epic<AppState> _createRetrieveOneGroupEpic(GroupsRepository groups) {
}

/// Create a group
Epic<AppState> _createCreateOneGroupEpic(GroupsRepository groups) {
return (Stream<dynamic> actions, EpicStore<AppState> store) => actions
.whereType<RequestCreateOne<Group>>()
.asyncMap(
(action) => groups
.createGroup(action.entity)
.then<dynamic>((group) => SuccessCreateOne(group))
.catchError(
(error) => FailCreateOne(entity: action.entity, error: error)),
Epic<AppState> _createCreateOneGroupEpic(
GroupsRepository groups, StorageRepository storage) {
return (Stream<dynamic> actions, EpicStore<AppState> store) =>
actions.whereType<CreateGroupAction>().asyncMap(
(action) async {
final picture = action.image != null
? await storage.uploadPublicXFile(
const Uuid().v7(), action.image!)
: null;

final group = action.group.copyWith(picture: picture);

return groups
.createGroup(group)
.then<dynamic>((group) => SuccessCreateOne(group))
.catchError(
(error) => FailCreateOne(entity: group, error: error));
},
);
}

/// Update a group
Epic<AppState> _createUpdateOneGroupEpic(GroupsRepository groups) {
return (Stream<dynamic> actions, EpicStore<AppState> store) => actions
.whereType<RequestUpdateOne<Group>>()
.asyncMap(
(action) => groups
.updateGroup(action.entity)
.then<dynamic>((group) => SuccessUpdateOne(group))
.catchError(
(error) => FailUpdateOne(entity: action.entity, error: error)),
Epic<AppState> _createUpdateOneGroupEpic(
GroupsRepository groups, StorageRepository storage) {
return (Stream<dynamic> actions, EpicStore<AppState> store) =>
actions.whereType<UpdateGroupAction>().asyncMap(
(action) async {
final picture = action.image != null
? await storage.uploadPublicXFile(
const Uuid().v7(), action.image!)
: null;

final group = action.group.copyWith(picture: picture);

return groups
.updateGroup(group)
.then<dynamic>((group) => SuccessUpdateOne(group))
.catchError(
(error) => FailUpdateOne(entity: group, error: error));
},
);
}

Expand Down
6 changes: 6 additions & 0 deletions lib/l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
"eventName": "Name des Events",
"events": "Events",
"eventsEmpty": "Es ist Zeit, deiner Gruppe Leben einzuhauchen!<br/>Tippe auf die Schaltfläche <newevent/>, um deine erste Aktivität zu planen.<br/>Wähle ein Datum, setze eine Uhrzeit und füge Details hinzu, um alle begeistert zu machen, zusammenzukommen.",
"feedbackEmailSubject": "Feedback für GRUP",
"feedbackEmailBody": "Hallo GRUP-Team,\n\nIch habe ein Feedback für euch:\n\n",
"feedbackPromptTitle": "Wie machen wir uns?",
"feedbackPromptBody": "Wenn dir <title>GRUP</title> gefällt, hinterlasse uns bitte eine positive Bewertung, um mehr Menschen zu erreichen!\nWenn du Feedback hast, lass es uns wissen, damit wir uns verbessern können.",
"feedbackStoreReview": "Bewerte uns auf {store}",
"feedbackTellUs": "Sende uns eine Nachricht",
"gallery": "Galerie",
"groupDismissAdmin": "Admin entfernen",
"groupDismissAdminConfirmation": "Bist du sicher, dass du dieses Mitglied als Admin entfernen möchtest?",
Expand Down
6 changes: 6 additions & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
"eventName": "Event name",
"events": "Events",
"eventsEmpty": "Time to bring your group to life!<br/>Tap the <newevent/> button to schedule your first activity.<br/>Choose a date, set a time, and add details to get everyone excited about coming together.",
"feedbackEmailSubject": "Feedback for GRUP",
"feedbackEmailBody": "Hi GRUP team,\n\nI have some feedback for you:\n\n",
"feedbackPromptTitle": "How are we doing?",
"feedbackPromptBody": "If you like <title>GRUP</title>, please leave us a positive review to reach more people!\nIf you have any feedback, please let us know so we can improve.",
"feedbackStoreReview": "Rate us on {store}",
"feedbackTellUs": "Send us a message",
"gallery": "Gallery",
"groupDismissAdmin": "Dismiss as admin",
"groupDismissAdminConfirmation": "Are you sure you want to dismiss this member as an admin?",
Expand Down
6 changes: 6 additions & 0 deletions lib/l10n/app_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
"eventName": "Nombre del evento",
"events": "Eventos",
"eventsEmpty": "¡Es hora de dar vida a tu grupo!<br/>Toca el botón <newevent/> para programar tu primera actividad.<br/>Elige una fecha, establece una hora y añade detalles para que todos estén emocionados de reunirse.",
"feedbackEmailSubject": "Feedback para GRUP",
"feedbackEmailBody": "Hola equipo de GRUP,\n\nTengo algunos comentarios para vosotros:\n\n",
"feedbackPromptTitle": "¿Cómo lo estamos haciendo?",
"feedbackPromptBody": "Si te gusta <title>GRUP</title>, por favor déjanos una reseña positiva para llegar a más personas.\nSi tienes algún comentario, por favor háznoslo saber para que podamos mejorar.",
"feedbackStoreReview": "Déjanos una reseña en {store}",
"feedbackTellUs": "Envíanos un mensaje",
"gallery": "Galería",
"groupDismissAdmin": "Descarta como admin",
"groupDismissAdminConfirmation": "¿Seguro que quieres descartar a este miembro como admin?",
Expand Down
6 changes: 6 additions & 0 deletions lib/l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
"eventName": "Nom de l'événement",
"events": "Événements",
"eventsEmpty": "Il est temps de donner vie à ton groupe!<br/>Appuie sur le bouton <newevent/> pour planifier ta première activité.<br/>Choisis une date, définis une heure et ajoute des détails pour que tout le monde soit excité de se retrouver.",
"feedbackEmailSubject": "Feedback pour GRUP",
"feedbackEmailBody": "Salut équipe GRUP,\n\nJ'ai des commentaires pour vous:\n\n",
"feedbackPromptTitle": "Comment nous débrouillons-nous?",
"feedbackPromptBody": "Si tu aimes <title>GRUP</title>, laisse-nous un avis positif pour toucher plus de personnes!\nSi tu as des commentaires, fais-le nous savoir pour que nous puissions nous améliorer.",
"feedbackStoreReview": "Évalue-nous sur {store}",
"feedbackTellUs": "Envoie-nous un message",
"gallery": "Galerie",
"groupDismissAdmin": "Révoque l'admin",
"groupDismissAdminConfirmation": "Es-tu sûr de vouloir révoquer ce membre comme admin?",
Expand Down
6 changes: 6 additions & 0 deletions lib/l10n/app_it.arb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
"eventName": "Nome dell'evento",
"events": "Eventi",
"eventsEmpty": "È il momento di dare vita al tuo gruppo!<br/>Tocca il pulsante <newevent/> per pianificare la tua prima attività.<br/>Scegli una data, imposta un orario e aggiungi dettagli per far sì che tutti siano entusiasti di riunirsi.",
"feedbackEmailSubject": "Feedback per GRUP",
"feedbackEmailBody": "Ciao team GRUP,\n\nHo un feedback per voi:\n\n",
"feedbackPromptTitle": "Come stiamo andando?",
"feedbackPromptBody": "Se ti piace <title>GRUP</title>, lasciaci una recensione positiva per raggiungere più persone!\nSe hai qualche feedback, faccelo sapere così possiamo migliorare.",
"feedbackStoreReview": "Valutaci su {store}",
"feedbackTellUs": "Inviaci un messaggio",
"gallery": "Galleria",
"groupDismissAdmin": "Rimuovi come amministratore",
"groupDismissAdminConfirmation": "Sei sicuro di voler rimuovere questo membro come amministratore?",
Expand Down
Loading
Loading