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.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
fix(flutter_desktop): glitchy kanban card editing (#6661)
Richard Shiue68d7211735a2
diff --git a/frontend/appflowy_flutter/integration_test/desktop/board/board_row_test.dart b/frontend/appflowy_flutter/integration_test/desktop/board/board_row_test.dartindex 068de0e279..868c27d302 100644--- a/frontend/appflowy_flutter/integration_test/desktop/board/board_row_test.dart+++ b/frontend/appflowy_flutter/integration_test/desktop/board/board_row_test.dart@@ -6,6 +6,7 @@ import 'package:easy_localization/easy_localization.dart';import 'package:flutter/services.dart';import 'package:flutter_test/flutter_test.dart';import 'package:integration_test/integration_test.dart';+import 'package:time/time.dart';import '../../shared/database_test_op.dart';import '../../shared/util.dart';@@ -14,6 +15,31 @@ void main() {IntegrationTestWidgetsFlutterBinding.ensureInitialized();group('board row test', () {+ testWidgets('edit item in ToDo card', (tester) async {+ await tester.initializeAppFlowy();+ await tester.tapAnonymousSignInButton();++ await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Board);+ const name = 'Card 1';+ final card1 = find.ancestor(+ matching: find.byType(RowCard),+ of: find.text(name),+ );+ await tester.hoverOnWidget(+ card1,+ onHover: () async {+ final editCard = find.byType(EditCardAccessory);+ await tester.tapButton(editCard);+ },+ );+ await tester.showKeyboard(card1);+ tester.testTextInput.enterText("");+ await tester.pump(300.milliseconds);+ tester.testTextInput.enterText("a");+ await tester.pump(300.milliseconds);+ expect(find.text('a'), findsOneWidget);+ });+testWidgets('delete item in ToDo card', (tester) async {await tester.initializeAppFlowy();await tester.tapAnonymousSignInButton();diff --git a/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/card_cell_skeleton/text_card_cell.dart b/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/card_cell_skeleton/text_card_cell.dartindex 9afd6a4d4c..f6552db0bd 100644--- a/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/card_cell_skeleton/text_card_cell.dart+++ b/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/card_cell_skeleton/text_card_cell.dart@@ -62,13 +62,8 @@ class _TextCellState extends State<TextCardCell> {@overridevoid initState() {super.initState();- _textEditingController = TextEditingController(text: cellBloc.state.content)- ..addListener(() {- if (_textEditingController.value.composing.isCollapsed) {- cellBloc- .add(TextCellEvent.updateText(_textEditingController.value.text));- }- });+ _textEditingController =+ TextEditingController(text: cellBloc.state.content);if (widget.editableNotifier?.isCellEditing.value ?? false) {WidgetsBinding.instance.addPostFrameCallback((_) {