Skip to content

Commit

Permalink
Refactor Talawa URL to Hamburger menu. (#2227)
Browse files Browse the repository at this point in the history
* fetchmore bug fix in organizationlist widget

* fetchmore result typecast

* Refactor talawa conneciton url to hamburger menu

* minor changes

* minor fixes

* minor fixes

* minor fixes

* added comments to the files mentioned in the failing test case.

* added comments

* minor fixes

* ran build runner

* fixed fail test

* Bug fix: Edited tag does not get updated immediately (#2224)

* Fixing bug to join or switch to any joined org (#2216)

* Fixing bug to join or switch to any joined org

* fixing linting errors

* fixing

* fixing coverage

* fixing overflow error

* fixing overflow error

* Fixes Snackbar clipping by adding an auto scroll and duration based on length of message (#2231)

* fix: Snackbar clipping by adding an auto scroll based on length of message

* changes to tests and added documentation

* minor changes to documentation

* Navigation Services Test Written (#2230)

* Navigation Services Test Written

* Null Check Error Fixed

* Update pull_request_template.md

* Revert "Navigation Services Test Written (#2230)" (#2234)

This reverts commit 23c2a74.

* Refactor talawa conneciton url to hamburger menu

* Bug fix: Edited tag does not get updated immediately (#2224)

* Refactor talawa conneciton url to hamburger menu

* Bug fix: Edited tag does not get updated immediately (#2224)

* add some tests

* added some tests

* added tests to userConfig Service

* fixed failing tests

* fixed failing tests

* added tests for explore_events_demo page

* added comments for event_card widget

* made add_post_page 100% code covered.

* Refactor talawa conneciton url to hamburger menu

* Navigation Services Test Written (#2230)

* Navigation Services Test Written

* Null Check Error Fixed

* add tests to mainscreenviewModel

* resolve conflicts

* fixed failing test

* added tests to apptour file

---------

Co-authored-by: Bhav Khurana <96694482+bhav-khurana@users.noreply.github.com>
Co-authored-by: Parag Gupta <103507835+Dante291@users.noreply.github.com>
Co-authored-by: Hemanth Krishnakumar <72601105+Wreck-X@users.noreply.github.com>
Co-authored-by: Manik Mehta <mehtamanik96@gmail.com>
Co-authored-by: Peter Harrison <16875803+palisadoes@users.noreply.github.com>
  • Loading branch information
6 people authored Dec 17, 2023
1 parent 074859d commit 40b35df
Show file tree
Hide file tree
Showing 65 changed files with 4,532 additions and 1,140 deletions.
4 changes: 3 additions & 1 deletion lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Select": "Auswählen",
"Selected Organization": "Ausgewählte Organisation",
"Continue": "Weitermachen",
"Enter Organization URL": "Organisations-URL eingeben",
"Enter Community URL": "Geben Sie die Community-URL ein",
"Verify": "Verifizieren",
"Sign Up": "Anmeldung",
"Change language": "Sprache ändern",
Expand Down Expand Up @@ -160,5 +160,7 @@
"Dismiss": "afwijzen",
"No organizations found Please contact your admin": "Geen organisaties gevonden! Neem contact op met uw beheerder",
"Notification Feature is not installed": "Meddelelsesfunktionen er ikke installeret",
"For complete access, please": "Für vollständigen Zugriff bitte",
" join an organization.": " einer Organisation beitreten.",
"JOIN":"BEITRETEN"
}
4 changes: 3 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"Select": "Select",
"Selected Organization": "Selected Organization",
"Continue": "Continue",
"Enter Organization URL": "Enter Organization URL",
"Enter Community URL": "Enter Community URL",
"Verify": "Verify",
"Sign Up": "Sign Up",
"Change language": "Change language",
Expand Down Expand Up @@ -166,5 +166,7 @@
"Settings": "Settings",
"Dark Theme": "Dark Theme",
"No organizations found Please contact your admin": "No organizations found ! Please contact your admin",
"For complete access, please": "For complete access, please",
" join an organization.": " join an organization.",
"JOIN":"JOIN"
}
4 changes: 3 additions & 1 deletion lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"Select": "Seleccione",
"Selected Organization": "Organización seleccionada",
"Continue": "Continuar",
"Enter Organization URL": "Ingrese la URL de la organización",
"Enter Community URL": "Ingrese la URL de la comunidad",
"Verify": "Verificarlo",
"Sign Up": "Inscribirse",
"Change language": "Cambiar idioma",
Expand Down Expand Up @@ -161,5 +161,7 @@
"No account registered with this email": "El servidor no se está ejecutando/url",
"Dismiss": "despedir",
"No organizations found Please contact your admin": "Neniuj organizoj trovitaj! Bonvolu kontakti vian administranton",
"For complete access, please": "Para acceso completo, por favor",
" join an organization.": " unirse a una organización.",
"JOIN":"UNIRSE"
}
4 changes: 3 additions & 1 deletion lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"Select": "Sélectionner",
"Selected Organization": "Organisation sélectionnée",
"Continue": "Continuer",
"Enter Organization URL": "Saisissez l'URL de l'organisation",
"Enter Community URL": "Entrez l'URL de la communauté",
"Verify": "Vérifier",
"Sign Up": "S'inscrire",
"Change language": "Changer de langue",
Expand Down Expand Up @@ -163,5 +163,7 @@
"Settings": "Paramètres",
"Dark Theme": "Thème sombre",
"No organizations found Please contact your admin": "Aucune organisation trouvée ! Veuillez contacter votre administrateur",
"For complete access, please": "Pour un accès complet, veuillez",
" join an organization.": " rejoindre une organisation.",
"JOIN":"REJOINDRE"
}
4 changes: 3 additions & 1 deletion lang/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Notification Feature is not installed": "अधिसूचना सुविधा स्थापित नहीं है",
"Selected Organization": "चयनित संगठन",
"Continue": "जारी रखें",
"Enter Organization URL": "संगठन URL दर्ज करें",
"Enter Community URL": "समुदाय URL दर्ज करें",
"Verify": "सत्यापित करें",
"Sign Up": "साइन अप करें",
"Change language": "भाषा बदलें",
Expand Down Expand Up @@ -159,5 +159,7 @@
"No account registered with this email": "सर्वर नहीं चल रहा/गलत url",
"Dismiss": "नकार",
"No organizations found Please contact your admin": "कोई संगठन नहीं मिला! कृपया अपने व्यवस्थापक से संपर्क करें",
"For complete access, please": "पूर्ण पहुंच के लिए, कृपया",
" join an organization.": " किसी संगठन से जुड़ें.",
"JOIN":"जोड़ना"
}
4 changes: 3 additions & 1 deletion lang/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"Select": "選択する",
"Selected Organization": "選択した組織",
"Continue": "継続する",
"Enter Organization URL": "組織のURLを入力してください",
"Enter Community URL": "コミュニティの URL を入力してください",
"Verify": "確認",
"Sign Up": "サインアップ",
"Change language": "言語を変更",
Expand Down Expand Up @@ -162,5 +162,7 @@
"No account registered with this email": "サーバーが実行されていない/間違った URL",
"Dismiss": "解散",
"No organizations found Please contact your admin": "組織が見つかりません!管理者に連絡してください",
"For complete access, please": "完全にアクセスするには、",
" join an organization.": " 組織に参加します。",
"JOIN": "参加する"
}
8 changes: 5 additions & 3 deletions lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"Select": "Selecione",
"Selected Organization": "Organização Selecionada",
"Continue": "Prosseguir",
"Enter Organization URL": "Insira o URL da organização",
"Enter Community URL": "Insira o URL da sua comunidade",
"Verify": "Verificar",
"Sign Up": "Inscrever-se",
"Change language": "Mudar idioma",
Expand Down Expand Up @@ -160,6 +160,8 @@
"Information": "Informação",
"No account registered with this email": "Servidor não está em execução/url errado",
"Dismiss": "liberar",
"JOIN":"ENTRAR",
"No organizations found Please contact your admin": "Neniuj organizoj trovitaj! Bonvolu kontakti vian administranton"
"No organizations found Please contact your admin": "Neniuj organizoj trovitaj! Bonvolu kontakti vian administranton",
"For complete access, please": "Para acesso completo, por favor",
" join an organization.": " ingressar em uma organização.",
"JOIN":"ENTRAR"
}
4 changes: 3 additions & 1 deletion lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"Select": "选择",
"Selected Organization": "选定组织",
"Continue": "继续",
"Enter Organization URL": "输入组织 URL",
"Enter Community URL": "输入您的社区网址",
"Verify": "验证一下",
"Sign Up": "报名",
"Change language": "改变语言",
Expand Down Expand Up @@ -160,5 +160,7 @@
"No account registered with this email": "服务器未运行/网址错误",
"Dismiss": "解雇",
"No organizations found Please contact your admin": "Neniuj organizoj trovitaj! Bonvolu kontakti vian administranton",
"For complete access, please": "如需完整访问,请",
" join an organization.": " 加入一个组织。",
"JOIN":"加入"
}
9 changes: 9 additions & 0 deletions lib/constants/routing_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ class Routes {
/// static variables.
static const String homeScreen = "/homeScreen";

/// static variables.
static const String demoHomeScreen = "/demoHomeScreen";

/// static variables.
static const String mainScreen = "/mainScreen";

Expand All @@ -49,6 +52,9 @@ class Routes {
/// static variables.
static const String exploreEventsScreen = "/exploreEvents";

/// static variables.
static const String demoExploreEventsScreen = "/demoExploreEvents";

/// static variables.
static const String eventInfoPage = "/eventInfo";

Expand All @@ -58,6 +64,9 @@ class Routes {
/// static variables.
static const String profilePage = "/profilePage";

/// static variables.
static const String demoProfilePage = "/demoProfilePage";

/// static variables.
static const String editProfilePage = "/editProfilePage";

Expand Down
187 changes: 187 additions & 0 deletions lib/models/app_tour.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
import 'package:flutter/material.dart';
import 'package:talawa/locator.dart';
import 'package:talawa/services/size_config.dart';
import 'package:talawa/view_model/main_screen_view_model.dart';
import 'package:tutorial_coach_mark/tutorial_coach_mark.dart';

/// Class that handles all the apptour routines.
class AppTour {
AppTour({
required this.model,
});

///instance of mainscreenviewmodel.
MainScreenViewModel model;

///instance of tutorialCoachMark.
late TutorialCoachMark tutorialCoachMark;

/// This function show tutorial to user.
///
/// **params**:
/// * `onClickTarget`: Its a function which is required to run desired tasks on click.
/// * `onFinish`: Its a function which is required to run desired tasks on finish
///
///
/// **returns**:
/// None
void showTutorial({
required Function(TargetFocus) onClickTarget,
required dynamic Function() onFinish,
required List<FocusTarget> targets,
}) {
tutorialCoachMark = TutorialCoachMark(
targets: targets.map((target) => target.focusWidget).toList(),
colorShadow: Theme.of(model.context).colorScheme.secondaryContainer,
textSkip: "SKIP",
textStyleSkip: TextStyle(
color: Theme.of(model.context).colorScheme.background,
fontSize: 20,
),
paddingFocus: 10,
opacityShadow: 1.0,
onFinish: onFinish,
onClickTarget: onClickTarget,
onSkip: () {
if (MainScreenViewModel.scaffoldKey.currentState!.isDrawerOpen) {
navigationService.pop();
}
model.tourSkipped = true;
model.onTabTapped(0);
return true;
},
onClickOverlay: (target) {
onClickTarget(target);
},
);
if (!model.testMode) tutorialCoachMark.show(context: model.context);
}
}

/// Class that represents FocusTarget.
class FocusTarget {
/// This returns a widget for a step in a tutorial.
///
/// **params**:
/// * `key`: key of type GlobalKey.
/// * `keyName`: key where the widget shows.
/// * `description`: description of the step.
/// * `isCircle`: bool to specify if circle
/// * `align`: align of type ContentAlign to align button.
/// * `crossAlign`: Cross align axes
/// * `skipAlignment`: to give alignment of skip option
/// * `next`: Function` type, this show the next step or `key` to show the tour of.
/// * `nextCrossAlign`: nextCrossAlign to give alignment of next option
/// * `isEnd`: true if last step of the tour.
/// * `tutorialCoachMark`: instance of tutorialCoachMark to which this focusTarget is linked.
FocusTarget({
required this.key,
required this.keyName,
required this.description,
required this.appTour,
this.isCircle = false,
this.align = ContentAlign.bottom,
this.crossAlign = CrossAxisAlignment.start,
this.skipAlignment = Alignment.topRight,
this.next,
this.nextCrossAlign = CrossAxisAlignment.end,
this.isEnd = false,
}) {
this.focusWidget = TargetFocus(
enableOverlayTab: true,
color: Colors.transparent,
identify: keyName,
keyTarget: key,
alignSkip: skipAlignment,
shape: isCircle ? ShapeLightFocus.Circle : ShapeLightFocus.RRect,
contents: [
TargetContent(
align: align,
builder: (context, controller) {
return Container(
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: crossAlign,
children: <Widget>[
Text(
description,
style: TextStyle(
color: Theme.of(context).colorScheme.secondary,
fontSize: 20,
),
),
],
),
);
},
),
TargetContent(
align: ContentAlign.custom,
customPosition: CustomTargetContentPosition(
bottom: SizeConfig.screenHeight! * 0.025,
),
builder: (context, controller) {
return GestureDetector(
onTap: () {
// ignore: avoid_dynamic_calls
next?.call();

appTour.tutorialCoachMark.next();
},
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: nextCrossAlign,
children: <Widget>[
Text(
isEnd ? 'COMPLETE' : 'NEXT',
style: TextStyle(
color: Theme.of(context).colorScheme.secondary,
fontSize: 20,
),
),
],
),
);
},
),
],
);
}

/// represents the key of the target that is intended to be focused.
GlobalKey key;

/// keyName of the target in mainScreenViewModel.
String keyName;

/// description of the target.
String description;

/// true if focusing shape is circle.
bool isCircle;

/// alignment of description text.
ContentAlign align;

/// crossAxisAlignment.
CrossAxisAlignment crossAlign;

/// skip alignment configuration.
Alignment skipAlignment;

/// instance of AppTour.
AppTour appTour;

/// next callback that is executed on pressing this target.
Function? next;

/// next target's crossAxisAlignment.
CrossAxisAlignment nextCrossAlign;

/// true current target ends ths appTour.
bool isEnd;

/// Target focus widget with all above properties.
late TargetFocus focusWidget;
}
Loading

0 comments on commit 40b35df

Please sign in to comment.