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: disable copy link to block feature (#6472)

Lucase1bbcc415f86
diff --git a/frontend/appflowy_flutter/integration_test/desktop/cloud/document/document_option_actions_test.dart b/frontend/appflowy_flutter/integration_test/desktop/cloud/document/document_option_actions_test.dart
index 80bab31a9d..31580c330a 100644
--- a/frontend/appflowy_flutter/integration_test/desktop/cloud/document/document_option_actions_test.dart
+++ b/frontend/appflowy_flutter/integration_test/desktop/cloud/document/document_option_actions_test.dart
@@ -4,7 +4,6 @@ import 'package:appflowy/plugins/document/presentation/editor_plugins/actions/dr
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
@@ -69,36 +68,37 @@ void main() {
expect(afterMoveBlock.delta, beforeMoveBlock.delta);
});
- testWidgets('copy block link', (tester) async {
- await tester.initializeAppFlowy(
- cloudType: AuthenticatorType.appflowyCloudSelfHost,
- );
- await tester.tapGoogleLoginInButton();
- await tester.expectToSeeHomePageWithGetStartedPage();
-
- // open getting started page
- await tester.openPage(Constants.gettingStartedPageName);
-
- // hover and click on the option menu button beside the block component.
- await tester.editor.hoverAndClickOptionMenuButton([0]);
-
- // click the copy link to block option
- await tester.tap(
- find.findTextInFlowyText(
- LocaleKeys.document_plugins_optionAction_copyLinkToBlock.tr(),
- ),
- );
- await tester.pumpAndSettle(Durations.short1);
-
- // check the clipboard
- final content = await Clipboard.getData(Clipboard.kTextPlain);
- expect(
- content?.text,
- matches(
- r'^https:\/\/appflowy\.com\/app\/[a-f0-9-]{36}\/[a-f0-9-]{36}\?blockId=[A-Za-z0-9_-]+$',
- ),
- );
- });
+ // Copy link to block feature is disable temporarily, enable this test when the feature is ready.
+ // testWidgets('copy block link', (tester) async {
+ // await tester.initializeAppFlowy(
+ // cloudType: AuthenticatorType.appflowyCloudSelfHost,
+ // );
+ // await tester.tapGoogleLoginInButton();
+ // await tester.expectToSeeHomePageWithGetStartedPage();
+
+ // // open getting started page
+ // await tester.openPage(Constants.gettingStartedPageName);
+
+ // // hover and click on the option menu button beside the block component.
+ // await tester.editor.hoverAndClickOptionMenuButton([0]);
+
+ // // click the copy link to block option
+ // await tester.tap(
+ // find.findTextInFlowyText(
+ // LocaleKeys.document_plugins_optionAction_copyLinkToBlock.tr(),
+ // ),
+ // );
+ // await tester.pumpAndSettle(Durations.short1);
+
+ // // check the clipboard
+ // final content = await Clipboard.getData(Clipboard.kTextPlain);
+ // expect(
+ // content?.text,
+ // matches(
+ // r'^https:\/\/appflowy\.com\/app\/[a-f0-9-]{36}\/[a-f0-9-]{36}\?blockId=[A-Za-z0-9_-]+$',
+ // ),
+ // );
+ // });
testWidgets('hover on the block and delete it', (tester) async {
await tester.initializeAppFlowy(
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_configuration.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_configuration.dart
index 8828d51d8f..eaa8878c38 100644
--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_configuration.dart
+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_configuration.dart
@@ -31,9 +31,10 @@ Map<String, BlockComponentBuilder> getEditorBuilderMap({
final standardActions = [
OptionAction.delete,
OptionAction.duplicate,
+ // Copy link to block feature is disable temporarily, enable this test when the feature is ready.
// filter out the copy link to block option if in local mode
- if (context.read<DocumentBloc?>()?.isLocalMode != true)
- OptionAction.copyLinkToBlock,
+ // if (context.read<DocumentBloc?>()?.isLocalMode != true)
+ // OptionAction.copyLinkToBlock,
];
final calloutBGColor = AFThemeExtension.of(context).calloutBGColor;