Skip to content

Commit

Permalink
Merge pull request #359 from BrawlerXull/tour
Browse files Browse the repository at this point in the history
Provide Detailed Tour for the entire Application for new users
  • Loading branch information
Pavel401 authored Aug 30, 2024
2 parents 4967f74 + 7109c4b commit 1e505f6
Show file tree
Hide file tree
Showing 65 changed files with 656 additions and 156 deletions.
2 changes: 1 addition & 1 deletion lib/app/modules/about/views/about_page_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:url_launcher/url_launcher.dart';

import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class AboutPageBody extends StatelessWidget {
final AboutController aboutController;
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/about/views/about_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:taskwarrior/app/modules/about/views/about_page_body.dart';

import '../controllers/about_controller.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class AboutView extends GetView<AboutController> {
const AboutView({super.key});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
// ignore_for_file: depend_on_referenced_packages

import 'package:built_collection/built_collection.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart';
import 'package:taskwarrior/app/tour/details_page_tour.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/taskfunctions/modify.dart';
import 'package:taskwarrior/app/utils/taskfunctions/urgency.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';
import 'package:tutorial_coach_mark/tutorial_coach_mark.dart';

class DetailRouteController extends GetxController {
late String uuid;
Expand Down Expand Up @@ -87,4 +92,49 @@ class DetailRouteController extends GetxController {
tagsValue?.value = modify.draft.tags;
urgencyValue.value = urgency(modify.draft);
}

late TutorialCoachMark tutorialCoachMark;

final GlobalKey dueKey = GlobalKey();
final GlobalKey untilKey = GlobalKey();

final GlobalKey waitKey = GlobalKey();
final GlobalKey priorityKey = GlobalKey();

void initDetailsPageTour() {
tutorialCoachMark = TutorialCoachMark(
targets: addDetailsPage(
dueKey: dueKey,
waitKey: waitKey,
untilKey: untilKey,
priorityKey: priorityKey,
),
colorShadow: TaskWarriorColors.black,
paddingFocus: 10,
opacityShadow: 1.00,
hideSkip: true,
onFinish: () {
SaveTourStatus.saveDetailsTourStatus(true);
},
);
}

void showDetailsPageTour(BuildContext context) {
Future.delayed(
const Duration(milliseconds: 500),
() {
SaveTourStatus.getDetailsTourStatus().then((value) => {
if (value == false)
{
tutorialCoachMark.show(context: context),
}
else
{
// ignore: avoid_print
print('User has seen this page'),
}
});
},
);
}
}
5 changes: 4 additions & 1 deletion lib/app/modules/detailRoute/views/dateTimePicker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,27 @@ import 'package:intl/intl.dart';

import 'package:taskwarrior/app/utils/constants/constants.dart';
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class DateTimeWidget extends StatelessWidget {
const DateTimeWidget({
super.key,
required this.name,
required this.value,
required this.callback,
required this.globalKey,
});

final String name;

final dynamic value;
final void Function(dynamic) callback;
final GlobalKey globalKey;

@override
Widget build(BuildContext context) {
return Card(
key: globalKey,
color: AppSettings.isDarkMode
? const Color.fromARGB(255, 57, 57, 57)
: Colors.white,
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/detailRoute/views/description_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:loggy/loggy.dart';
import 'package:taskwarrior/app/utils/constants/constants.dart';
import 'package:taskwarrior/app/utils/constants/utilites.dart';
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class DescriptionWidget extends StatelessWidget {
const DescriptionWidget(
Expand Down
20 changes: 19 additions & 1 deletion lib/app/modules/detailRoute/views/detail_route_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ import 'package:taskwarrior/app/modules/detailRoute/views/tags_widget.dart';
import 'package:taskwarrior/app/utils/constants/constants.dart';
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';
import 'package:taskwarrior/app/utils/language/sentence_manager.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class DetailRouteView extends GetView<DetailRouteController> {
const DetailRouteView({super.key});

@override
Widget build(BuildContext context) {
controller.initDetailsPageTour();
controller.showDetailsPageTour(context);
return WillPopScope(
onWillPop: () async {
if (!controller.onEdit.value) {
Expand Down Expand Up @@ -135,6 +137,10 @@ class DetailRouteView extends GetView<DetailRouteController> {
value: entry.value,
callback: (newValue) =>
controller.setAttribute(entry.key, newValue),
waitKey: controller.waitKey,
dueKey: controller.dueKey,
untilKey: controller.untilKey,
priorityKey: controller.priorityKey,
),
],
),
Expand Down Expand Up @@ -225,12 +231,20 @@ class AttributeWidget extends StatelessWidget {
required this.name,
required this.value,
required this.callback,
required this.waitKey,
required this.dueKey,
required this.priorityKey,
required this.untilKey,
super.key,
});

final String name;
final dynamic value;
final void Function(dynamic) callback;
final GlobalKey waitKey;
final GlobalKey dueKey;
final GlobalKey untilKey;
final GlobalKey priorityKey;

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -262,24 +276,28 @@ class AttributeWidget extends StatelessWidget {
name: name,
value: localValue,
callback: callback,
globalKey: dueKey,
);
case 'wait':
return DateTimeWidget(
name: name,
value: localValue,
callback: callback,
globalKey: waitKey,
);
case 'until':
return DateTimeWidget(
name: name,
value: localValue,
callback: callback,
globalKey: untilKey,
);
case 'priority':
return PriorityWidget(
name: name,
value: localValue,
callback: callback,
globalKey: priorityKey,
);
case 'project':
return ProjectWidget(
Expand Down
5 changes: 4 additions & 1 deletion lib/app/modules/detailRoute/views/priority_widget.dart
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:taskwarrior/app/utils/constants/constants.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class PriorityWidget extends StatelessWidget {
const PriorityWidget(
{required this.name,
required this.value,
required this.callback,
required this.globalKey,
super.key});

final String name;
final dynamic value;
final void Function(dynamic) callback;
final GlobalKey globalKey;

@override
Widget build(BuildContext context) {
return Card(
key: globalKey,
color: AppSettings.isDarkMode
? const Color.fromARGB(255, 57, 57, 57)
: Colors.white,
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/detailRoute/views/status_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:taskwarrior/app/utils/constants/constants.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';


class StatusWidget extends StatelessWidget {
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/detailRoute/views/tags_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart';
import 'package:taskwarrior/app/utils/constants/constants.dart';
import 'package:taskwarrior/app/utils/constants/utilites.dart';
import 'package:taskwarrior/app/utils/taskfunctions/validate.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class TagsWidget extends StatelessWidget {
const TagsWidget({
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/home/controllers/home_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import 'package:taskwarrior/app/utils/taskfunctions/comparator.dart';
import 'package:taskwarrior/app/utils/taskfunctions/projects.dart';
import 'package:taskwarrior/app/utils/taskfunctions/query.dart';
import 'package:taskwarrior/app/utils/taskfunctions/tags.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';
import 'package:tutorial_coach_mark/tutorial_coach_mark.dart';

class HomeController extends GetxController {
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/home/views/add_task_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';
import 'package:taskwarrior/app/utils/language/sentence_manager.dart';
import 'package:taskwarrior/app/utils/taskfunctions/taskparser.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class AddTaskBottomSheet extends StatelessWidget {
final HomeController homeController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import 'package:taskwarrior/api_service.dart';
import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';

import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class AddTaskToTaskcBottomSheet extends StatelessWidget {
final HomeController homeController;
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/home/views/filter_drawer_home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';
import 'package:taskwarrior/app/utils/language/sentence_manager.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class FilterDrawer extends StatelessWidget {
final Filters filters;
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/home/views/home_page_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:taskwarrior/app/utils/language/sentence_manager.dart';
import 'package:taskwarrior/app/utils/taskchampion/credentials_storage.dart';
import 'package:taskwarrior/app/utils/taskchampion/taskchampion.dart';
import 'package:taskwarrior/app/utils/taskserver/taskserver.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

import '../controllers/home_controller.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/home/views/home_page_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:taskwarrior/app/modules/home/views/show_tasks.dart';
import 'package:taskwarrior/app/modules/home/views/tasks_builder.dart';
import 'package:taskwarrior/app/utils/constants/palette.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

import '../controllers/home_controller.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:taskwarrior/app/modules/home/views/add_task_bottom_sheet.dart';
import 'package:taskwarrior/app/modules/home/views/add_task_to_taskc_bottom_sheet.dart';

import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

import '../controllers/home_controller.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/home/views/nav_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';
import 'package:taskwarrior/app/modules/home/controllers/home_controller.dart';
import 'package:taskwarrior/app/modules/home/views/home_page_nav_drawer_menu_item.dart';
import 'package:taskwarrior/app/modules/home/views/theme_clipper.dart';
Expand All @@ -12,7 +13,6 @@ import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';
import 'package:taskwarrior/app/utils/constants/utilites.dart';
import 'package:taskwarrior/app/utils/language/sentence_manager.dart';
import 'package:taskwarrior/app/utils/taskchampion/taskchampion.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';

class NavDrawer extends StatelessWidget {
final HomeController homeController;
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/home/views/project_column_home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';
import 'package:taskwarrior/app/utils/taskfunctions/projects.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class ProjectsColumn extends StatelessWidget {
const ProjectsColumn({
Expand Down
3 changes: 2 additions & 1 deletion lib/app/modules/home/views/project_column_taskc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import 'package:flutter/material.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';
import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart'; // Import your necessary dependencies

import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class ProjectColumnTaskc extends StatelessWidget {
const ProjectColumnTaskc({
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/home/views/show_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:intl/intl.dart';
import 'package:taskwarrior/api_service.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/utilites.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class TaskDetails extends StatefulWidget {
final Tasks task;
Expand Down
3 changes: 2 additions & 1 deletion lib/app/modules/home/views/show_tasks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import 'package:taskwarrior/app/modules/home/views/show_details.dart';
import 'package:taskwarrior/app/utils/constants/palette.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_colors.dart';
import 'package:taskwarrior/app/utils/constants/taskwarrior_fonts.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';

import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class TaskViewBuilder extends StatelessWidget {
const TaskViewBuilder({
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/home/views/tas_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:taskwarrior/app/utils/language/supported_language.dart';
import 'package:taskwarrior/app/utils/taskfunctions/datetime_differences.dart';
import 'package:taskwarrior/app/utils/taskfunctions/modify.dart';
import 'package:taskwarrior/app/utils/taskfunctions/urgency.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class TaskListItem extends StatelessWidget {
const TaskListItem(
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/home/views/tasks_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import 'package:taskwarrior/app/utils/gen/fonts.gen.dart';
import 'package:taskwarrior/app/utils/language/sentence_manager.dart';
import 'package:taskwarrior/app/utils/language/supported_language.dart';
import 'package:taskwarrior/app/utils/taskfunctions/modify.dart';
import 'package:taskwarrior/app/utils/theme/app_settings.dart';
import 'package:taskwarrior/app/utils/app_settings/app_settings.dart';

class TasksBuilder extends StatelessWidget {
const TasksBuilder({
Expand Down
Loading

0 comments on commit 1e505f6

Please sign in to comment.