[PR #2419] [MERGED] Support block config #5227

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/2419
Author: @qinluhe
Created: 5/2/2023
Status: Merged
Merged: 5/4/2023
Merged by: @qinluhe

Base: developHead: feat/block-config


📝 Commits (2)

  • bc500f6 fix: refactor block config
  • cb9d29f feat: add eslint rule about react-hooks

📊 Changes

35 files changed (+512 additions, -580 deletions)

View changed files

📝 frontend/appflowy_tauri/.eslintrc.cjs (+3 -1)
📝 frontend/appflowy_tauri/package.json (+1 -0)
📝 frontend/appflowy_tauri/pnpm-lock.yaml (+11 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/TextBlock.hooks.ts (+2 -201)
frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/events/Actions.hooks.ts (+75 -0)
frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/events/Events.hooks.ts (+113 -0)
frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/events/TurnIntoEvents.hooks.ts (+67 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/index.tsx (+0 -1)
frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/useMarkDown.hooks.ts (+0 -86)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/TextInput.hooks.ts (+15 -21)
📝 frontend/appflowy_tauri/src/appflowy_app/constants/document/config.ts (+71 -13)
📝 frontend/appflowy_tauri/src/appflowy_app/interfaces/document.ts (+2 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/effects/document/document_controller.ts (+3 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/effects/document/document_observer.ts (+0 -3)
frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/heading.ts (+0 -31)
frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/index.ts (+1 -0)
frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/quote.ts (+0 -31)
📝 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/indent.ts (+4 -3)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/index.ts (+8 -32)

...and 15 more files

📄 Description

This PR is based on https://github.com/AppFlowy-IO/AppFlowy/pull/2415 and needs to be merged with https://github.com/AppFlowy-IO/AppFlowy/pull/2415 first

Feature Preview

  • Refactor block config
  • Modify the split operation to move child nodes to new nodes when splitting
  • Fixed repeat notifications when reload page

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/2419 **Author:** [@qinluhe](https://github.com/qinluhe) **Created:** 5/2/2023 **Status:** ✅ Merged **Merged:** 5/4/2023 **Merged by:** [@qinluhe](https://github.com/qinluhe) **Base:** `develop` ← **Head:** `feat/block-config` --- ### 📝 Commits (2) - [`bc500f6`](https://github.com/AppFlowy-IO/AppFlowy/commit/bc500f647463d3c40a3f3d7b1eaa6ce60a852894) fix: refactor block config - [`cb9d29f`](https://github.com/AppFlowy-IO/AppFlowy/commit/cb9d29f94bda63057815f66cf42220af4d07916b) feat: add eslint rule about react-hooks ### 📊 Changes **35 files changed** (+512 additions, -580 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_tauri/.eslintrc.cjs` (+3 -1) 📝 `frontend/appflowy_tauri/package.json` (+1 -0) 📝 `frontend/appflowy_tauri/pnpm-lock.yaml` (+11 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/TextBlock.hooks.ts` (+2 -201) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/events/Actions.hooks.ts` (+75 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/events/Events.hooks.ts` (+113 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/events/TurnIntoEvents.hooks.ts` (+67 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/index.tsx` (+0 -1) ➖ `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/useMarkDown.hooks.ts` (+0 -86) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/TextInput.hooks.ts` (+15 -21) 📝 `frontend/appflowy_tauri/src/appflowy_app/constants/document/config.ts` (+71 -13) 📝 `frontend/appflowy_tauri/src/appflowy_app/interfaces/document.ts` (+2 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/effects/document/document_controller.ts` (+3 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/effects/document/document_observer.ts` (+0 -3) ➖ `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/heading.ts` (+0 -31) ➕ `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/index.ts` (+1 -0) ➖ `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/quote.ts` (+0 -31) 📝 `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/indent.ts` (+4 -3) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/index.ts` (+8 -32) _...and 15 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). --> This PR is based on https://github.com/AppFlowy-IO/AppFlowy/pull/2415 and needs to be merged with https://github.com/AppFlowy-IO/AppFlowy/pull/2415 first <!--- 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] Refactor block config - [x] Modify the split operation to move child nodes to new nodes when splitting - [x] Fixed repeat notifications when reload page <!--- 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:48 +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#5227
No description provided.