[PR #2413] [MERGED] feat: checkbox block #5221

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/2413
Author: @qinluhe
Created: 5/1/2023
Status: Merged
Merged: 5/3/2023
Merged by: @qinluhe

Base: developHead: feat/checkbox-block


📝 Commits (1)

📊 Changes

23 files changed (+365 additions, -92 deletions)

View changed files

frontend/appflowy_tauri/src/appflowy_app/components/document/Node/NodeChildren.tsx (+14 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/Node/index.tsx (+4 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/TextBlock.hooks.ts (+3 -3)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/index.tsx (+6 -9)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/useMarkDown.hooks.ts (+25 -3)
frontend/appflowy_tauri/src/appflowy_app/components/document/TodoListBlock/TodoListBlock.hooks.ts (+38 -0)
frontend/appflowy_tauri/src/appflowy_app/components/document/TodoListBlock/index.tsx (+42 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/constants/document/config.ts (+6 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/interfaces/document.ts (+7 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/heading.ts (+19 -30)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/backspace.ts (+1 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/index.ts (+18 -25)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/split.ts (+6 -2)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/update.ts (+27 -1)
frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/todo_list.ts (+31 -0)
frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/turn_to.ts (+46 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/utils/document/blocks/common.ts (+14 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/utils/document/blocks/heading.ts (+4 -0)
frontend/appflowy_tauri/src/appflowy_app/utils/document/blocks/todo_list.ts (+21 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/utils/document/slate/markdown.ts (+18 -6)

...and 3 more files

📄 Description

Feature Preview

  • Support convert both -[] and [] to checkbox and unchecked, -[x] and [x] to checkbox and checked.
  • Support cmd(macOS) or ctrl(windows or Linux) + enter to toggle the checkbox status.
image

PR Checklist

  • My code adheres to the AppFlowy Style Guide
  • 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/2413 **Author:** [@qinluhe](https://github.com/qinluhe) **Created:** 5/1/2023 **Status:** ✅ Merged **Merged:** 5/3/2023 **Merged by:** [@qinluhe](https://github.com/qinluhe) **Base:** `develop` ← **Head:** `feat/checkbox-block` --- ### 📝 Commits (1) - [`cb3dae1`](https://github.com/AppFlowy-IO/AppFlowy/commit/cb3dae15929bc852f10ab3e27d8e6696911bbf71) feat: checkbox block ### 📊 Changes **23 files changed** (+365 additions, -92 deletions) <details> <summary>View changed files</summary> ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/Node/NodeChildren.tsx` (+14 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/Node/index.tsx` (+4 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/TextBlock.hooks.ts` (+3 -3) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/index.tsx` (+6 -9) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/useMarkDown.hooks.ts` (+25 -3) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/TodoListBlock/TodoListBlock.hooks.ts` (+38 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/TodoListBlock/index.tsx` (+42 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/constants/document/config.ts` (+6 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/interfaces/document.ts` (+7 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/heading.ts` (+19 -30) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/backspace.ts` (+1 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/index.ts` (+18 -25) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/split.ts` (+6 -2) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/update.ts` (+27 -1) ➕ `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/todo_list.ts` (+31 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/turn_to.ts` (+46 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/utils/document/blocks/common.ts` (+14 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/utils/document/blocks/heading.ts` (+4 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/utils/document/blocks/todo_list.ts` (+21 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/utils/document/slate/markdown.ts` (+18 -6) _...and 3 more files_ </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ### Feature Preview - [x] Support convert both `-[] ` and `[] `to checkbox and unchecked, `-[x] ` and `[x] `to checkbox and checked. - [x] Support cmd(macOS) or ctrl(windows or Linux) + enter to toggle the checkbox status. <img width="401" alt="image" src="https://user-images.githubusercontent.com/108015703/235602045-82a53719-1d47-4360-879e-70b4844f809e.png"> <!--- 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 the [AppFlowy Style Guide](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/style-guides) - [ ] 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 22:17:47 +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#5221
No description provided.