[PR #6661] [MERGED] fix(flutter_desktop): glitchy kanban card editing #7511

Closed
opened 2026-03-23 23:19:57 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/6661
Author: @richardshiue
Created: 10/29/2024
Status: Merged
Merged: 10/29/2024
Merged by: @richardshiue

Base: mainHead: fix/kanban-card


📝 Commits (2)

  • 7573a22 test: add test
  • 6ce0142 fix(flutter_desktop): editing kanban card is glitchy

📊 Changes

2 files changed (+28 additions, -7 deletions)

View changed files

📝 frontend/appflowy_flutter/integration_test/desktop/board/board_row_test.dart (+26 -0)
📝 frontend/appflowy_flutter/lib/plugins/database/widgets/cell/card_cell_skeleton/text_card_cell.dart (+2 -7)

📄 Description

taking the most stripped-down steps to reproduce:

  1. user types in 'a'
  2. onChanged callback starts a 300ms debounce timer to update the cell in the backend with 'a'
  3. immediately after 300ms and before the backend notifies the frontend of the cell change, user types in 'b'. The text controller's value is now 'ab'
  4. cell controller gets the cell-did-update notification from backend, data is 'a'
  5. cell controller updates the text controller's value with 'a'
  6. The user observes that b disppears

I had previously checked whether the cell has focus in step 5, which fixed this issue. The problem is that if another user edits the same cell, those changes don't get reflected.

Solution now is don't listen to onChanged callbacks, only when the user finishes ediiting it.

Feature Preview


PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/6661 **Author:** [@richardshiue](https://github.com/richardshiue) **Created:** 10/29/2024 **Status:** ✅ Merged **Merged:** 10/29/2024 **Merged by:** [@richardshiue](https://github.com/richardshiue) **Base:** `main` ← **Head:** `fix/kanban-card` --- ### 📝 Commits (2) - [`7573a22`](https://github.com/AppFlowy-IO/AppFlowy/commit/7573a222d6f39a93cf4d87051642dc25647ae935) test: add test - [`6ce0142`](https://github.com/AppFlowy-IO/AppFlowy/commit/6ce0142d46f9d5269390246b9ace6bc566f99bd6) fix(flutter_desktop): editing kanban card is glitchy ### 📊 Changes **2 files changed** (+28 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/integration_test/desktop/board/board_row_test.dart` (+26 -0) 📝 `frontend/appflowy_flutter/lib/plugins/database/widgets/cell/card_cell_skeleton/text_card_cell.dart` (+2 -7) </details> ### 📄 Description taking the most stripped-down steps to reproduce: 1. user types in 'a' 2. onChanged callback starts a 300ms debounce timer to update the cell in the backend with 'a' 3. immediately after 300ms and before the backend notifies the frontend of the cell change, user types in 'b'. The text controller's value is now 'ab' 4. cell controller gets the cell-did-update notification from backend, data is 'a' 5. cell controller updates the text controller's value with 'a' 6. The user observes that b disppears I had previously checked whether the cell has focus in step 5, which fixed this issue. The problem is that if another user edits the same cell, those changes don't get reflected. Solution now is don't listen to onChanged callbacks, only when the user finishes ediiting it. ### Feature Preview <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [ ] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [ ] I've listed at least one issue that this PR fixes in the description above. - [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [ ] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:19:57 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#7511
No description provided.