Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: add tooltip when import notion file (#6557)

Nathan.foooe86d812ee66e
diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/workspace/_sidebar_workspace_menu.dart b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/workspace/_sidebar_workspace_menu.dart
index 55ccb4bd53..bb9b89b04d 100644
--- a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/workspace/_sidebar_workspace_menu.dart
+++ b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/workspace/_sidebar_workspace_menu.dart
@@ -1,3 +1,4 @@
+import 'package:appflowy/core/helpers/url_launcher.dart';
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/startup/startup.dart';
@@ -15,6 +16,7 @@ import 'package:flowy_infra/file_picker/file_picker_service.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:universal_platform/universal_platform.dart';
import '_sidebar_import_notion.dart';
@@ -88,8 +90,11 @@ class WorkspacesMenu extends StatelessWidget {
// add new workspace
const _CreateWorkspaceButton(),
const VSpace(6.0),
- const _ImportNotionButton(),
- const VSpace(6.0),
+
+ if (UniversalPlatform.isDesktop) ...[
+ const _ImportNotionButton(),
+ const VSpace(6.0),
+ ],
],
);
}
@@ -375,21 +380,40 @@ class _ImportNotionButton extends StatelessWidget {
Widget build(BuildContext context) {
return SizedBox(
height: 40,
- child: FlowyButton(
- key: importNotionButtonKey,
- onTap: () {
- _showImportNotinoDialog(context);
- },
- margin: const EdgeInsets.symmetric(horizontal: 4.0),
- text: Row(
- children: [
- _buildLeftIcon(context),
- const HSpace(8.0),
- FlowyText.regular(
- LocaleKeys.workspace_importFromNotion.tr(),
+ child: Stack(
+ alignment: Alignment.centerRight,
+ children: [
+ FlowyButton(
+ key: importNotionButtonKey,
+ onTap: () {
+ _showImportNotinoDialog(context);
+ },
+ margin: const EdgeInsets.symmetric(horizontal: 4.0),
+ text: Row(
+ children: [
+ _buildLeftIcon(context),
+ const HSpace(8.0),
+ FlowyText.regular(
+ LocaleKeys.workspace_importFromNotion.tr(),
+ ),
+ ],
),
- ],
- ),
+ ),
+ FlowyTooltip(
+ message: LocaleKeys.workspace_learnMore.tr(),
+ preferBelow: true,
+ child: FlowyIconButton(
+ icon: const FlowySvg(
+ FlowySvgs.information_s,
+ ),
+ onPressed: () {
+ afLaunchUrlString(
+ 'https://docs.appflowy.io/docs/guides/import-from-notion',
+ );
+ },
+ ),
+ ),
+ ],
),
);
}
diff --git a/frontend/resources/translations/en.json b/frontend/resources/translations/en.json
index d3d3dbe5b5..84d8c0e698 100644
--- a/frontend/resources/translations/en.json
+++ b/frontend/resources/translations/en.json
@@ -75,6 +75,7 @@
"defaultName": "My Workspace",
"create": "Create workspace",
"importFromNotion": "Import From Notion",
+ "learnMore": "Learn more",
"reset": "Reset workspace",
"renameWorkspace": "Rename workspace",
"workspaceNameCannotBeEmpty": "Workspace name cannot be empty",
@@ -2712,4 +2713,4 @@
"refreshNote": "After successful upgrade, click <refresh/> to activate your new features.",
"refresh": "here"
}
-}
+}
\ No newline at end of file