fix: launch review reminder (#4514)

* fix: dismiss menu on enter on no result

* fix: add drag handle to mobile reminder dialog

* fix: show reminder icon  in date cell in grid

* fix: auto select day when selecting reminder

* fix: increase height of notification hub

* fix: let some reminder options require time and show time

* fix: handling of non-time reminder options

* test: fix edit date time cell test

* fix: close popover when pressing child again

* fix: add time of now when setting include time

* fix: clean logic

* fix: tests

* fix: add test and include time in notification hub

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
This commit is contained in:
Mathias Mogensen
2024-01-31 14:17:36 +01:00
committed by GitHub
parent d27e2179cc
commit 247405ff51
17 changed files with 411 additions and 123 deletions

View File

@ -1,3 +1,6 @@
import 'package:flutter/material.dart';
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/mobile/presentation/bottom_sheet/show_mobile_bottom_sheet.dart';
import 'package:appflowy/mobile/presentation/database/date_picker/mobile_date_picker_screen.dart';
import 'package:appflowy/plugins/database/widgets/cell/editable_cell_skeleton/date.dart';
@ -5,7 +8,6 @@ import 'package:appflowy/plugins/database/widgets/row/cells/cell_container.dart'
import 'package:appflowy/plugins/database/application/cell/bloc/date_cell_bloc.dart';
import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart';
class MobileGridDateCellSkin extends IEditableDateCellSkin {
@override
@ -25,9 +27,17 @@ class MobileGridDateCellSkin extends IEditableDateCellSkin {
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
child: FlowyText(
state.dateStr,
fontSize: 15,
child: Row(
children: [
if (state.data?.reminderId.isNotEmpty ?? false) ...[
const FlowySvg(FlowySvgs.clock_alarm_s),
const HSpace(6),
],
FlowyText(
state.dateStr,
fontSize: 15,
),
],
),
),
),

View File

@ -67,8 +67,12 @@ class _DateCellEditor extends State<DateCellEditor> {
parseEndTimeError: state.parseEndTimeError,
parseTimeError: state.parseTimeError,
popoverMutex: popoverMutex,
onReminderSelected: (option) => dateCellBloc
.add(DateCellEditorEvent.setReminderOption(option: option)),
onReminderSelected: (option) => dateCellBloc.add(
DateCellEditorEvent.setReminderOption(
option: option,
selectedDay: state.dateTime == null ? DateTime.now() : null,
),
),
selectedReminderOption: state.reminderOption,
options: [
OptionGroup(