Added tooltip when hovering over No-Data (#3612)

* Added tooltip when hovering over NO-Data

* chore: i18n for tooltip

* fix: wrong token

* chore: use flowytooltip

---------

Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
This commit is contained in:
Nikhil Raj 2023-10-28 19:41:32 +05:30 committed by GitHub
parent 197da5f425
commit 8a735799c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View File

@ -14,6 +14,7 @@ import 'package:flowy_infra/size.dart';
import 'package:flowy_infra/theme_extension.dart'; import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
@ -375,9 +376,13 @@ class _UnscheduledEventsButtonState extends State<UnscheduledEventsButton> {
_popoverController.show(); _popoverController.show();
} }
}, },
child: FlowyText.regular( child: FlowyTooltip(
"${LocaleKeys.calendar_settings_noDateTitle.tr()} (${state.unscheduleEvents.length})", message: LocaleKeys.calendar_settings_noDateHint
fontSize: 10, .plural(state.unscheduleEvents.length),
child: FlowyText.regular(
"${LocaleKeys.calendar_settings_noDateTitle.tr()} (${state.unscheduleEvents.length})",
fontSize: 10,
),
), ),
), ),
popupBuilder: (context) { popupBuilder: (context) {

View File

@ -771,7 +771,11 @@
"firstDayOfWeek": "Start week on", "firstDayOfWeek": "Start week on",
"layoutDateField": "Layout calendar by", "layoutDateField": "Layout calendar by",
"noDateTitle": "No Date", "noDateTitle": "No Date",
"noDateHint": "Unscheduled events will show up here", "noDateHint": {
"zero": "Unscheduled events will show up here",
"one": "{} unscheduled event",
"other": "{} unscheduled events"
},
"clickToAdd": "Click to add to the calendar", "clickToAdd": "Click to add to the calendar",
"name": "Calendar layout" "name": "Calendar layout"
}, },