[PR #4843] [MERGED] fix: focus traversal in checklist popover #6487

Closed
opened 2026-03-23 22:23:26 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/4843
Author: @Xazin
Created: 3/7/2024
Status: Merged
Merged: 3/7/2024
Merged by: @richardshiue

Base: mainHead: fix/focus-traversal-checklist


📝 Commits (4)

  • c7a5aed fix: focus traversal in checklist popover
  • 5c6fce0 fix: dont trim input
  • 03a472e chore: remove redundant state var
  • 6a907af chore: remove late from controller

📊 Changes

5 files changed (+48 additions, -26 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/database/widgets/cell/desktop_grid/desktop_grid_checklist_cell.dart (+5 -3)
📝 frontend/appflowy_flutter/lib/plugins/database/widgets/cell_editor/checklist_cell_editor.dart (+21 -21)
📝 frontend/appflowy_flutter/packages/appflowy_popover/lib/src/popover.dart (+9 -1)
📝 frontend/appflowy_flutter/packages/flowy_infra_ui/lib/src/flowy_overlay/appflowy_popover.dart (+6 -0)
📝 frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/button.dart (+7 -1)

📄 Description

This PR fixes the traversal issue in the checlist editor.

  • Disabled button receiving focus if the onPressed is null (Default behavior for Flutter, onPressed == null means disabled)
  • Added skipTraversal to the Popover itself so it doesn't get included in the traversal order
  • Only clear the new item text field if a new item was actually created
  • Disable create button when it doesn't do anything. If you only added spaces you could click on the button, but it would only clear the text field, not create a new item

Feature Preview

https://github.com/AppFlowy-IO/AppFlowy/assets/42929161/1b7adff0-9f11-419a-abdd-2e910b775aa9

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/4843 **Author:** [@Xazin](https://github.com/Xazin) **Created:** 3/7/2024 **Status:** ✅ Merged **Merged:** 3/7/2024 **Merged by:** [@richardshiue](https://github.com/richardshiue) **Base:** `main` ← **Head:** `fix/focus-traversal-checklist` --- ### 📝 Commits (4) - [`c7a5aed`](https://github.com/AppFlowy-IO/AppFlowy/commit/c7a5aeddc148d014a0d22ff0e58dd1842b301254) fix: focus traversal in checklist popover - [`5c6fce0`](https://github.com/AppFlowy-IO/AppFlowy/commit/5c6fce08b56afb75de2080dd4807335e3763c5f9) fix: dont trim input - [`03a472e`](https://github.com/AppFlowy-IO/AppFlowy/commit/03a472e4b4140149aae717bc90ec125467691c41) chore: remove redundant state var - [`6a907af`](https://github.com/AppFlowy-IO/AppFlowy/commit/6a907afaa355a28a7a4eff52daa8dbf3769b9919) chore: remove late from controller ### 📊 Changes **5 files changed** (+48 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/database/widgets/cell/desktop_grid/desktop_grid_checklist_cell.dart` (+5 -3) 📝 `frontend/appflowy_flutter/lib/plugins/database/widgets/cell_editor/checklist_cell_editor.dart` (+21 -21) 📝 `frontend/appflowy_flutter/packages/appflowy_popover/lib/src/popover.dart` (+9 -1) 📝 `frontend/appflowy_flutter/packages/flowy_infra_ui/lib/src/flowy_overlay/appflowy_popover.dart` (+6 -0) 📝 `frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/button.dart` (+7 -1) </details> ### 📄 Description This PR fixes the traversal issue in the checlist editor. - Disabled button receiving focus if the onPressed is null _(Default behavior for Flutter, onPressed == null means disabled)_ - Added skipTraversal to the Popover itself so it doesn't get included in the traversal order - Only clear the new item text field if a new item was actually created - Disable create button when it doesn't do anything. If you only added spaces you could click on the button, but it would only clear the text field, not create a new item ### Feature Preview https://github.com/AppFlowy-IO/AppFlowy/assets/42929161/1b7adff0-9f11-419a-abdd-2e910b775aa9 #### PR Checklist - [x] 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. - [x] 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 22:23:26 +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#6487
No description provided.