[PR #3848] [MERGED] feat: support convert external data to nested json #5910

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/3848
Author: @qinluhe
Created: 10/31/2023
Status: Merged
Merged: 11/2/2023
Merged by: @appflowy

Base: mainHead: feat/convert-data-to-nested-block


📝 Commits (10+)

  • f2a34a0 feat: support convert external data to nested json
  • 08a5fde fix: add some comment
  • deec894 fix: code review
  • d9062ea fix: code review
  • 0fcd7e7 fix: code view
  • af645a2 fix: code view
  • b0472e3 fix: update tauri cargo lock file
  • bb0d3e5 fix: remove reduant function
  • 8fb9280 fix: parse dir attribute in element
  • e89b419 fix: add comment about parse dir

📊 Changes

33 files changed (+2529 additions, -338 deletions)

View changed files

📝 frontend/appflowy_tauri/src-tauri/Cargo.lock (+19 -1)
📝 frontend/rust-lib/Cargo.lock (+19 -1)
📝 frontend/rust-lib/event-integration/src/document/document_event.rs (+16 -1)
📝 frontend/rust-lib/event-integration/tests/document/local_test/test.rs (+55 -3)
📝 frontend/rust-lib/flowy-document2/Cargo.toml (+2 -1)
📝 frontend/rust-lib/flowy-document2/src/entities.rs (+2 -0)
📝 frontend/rust-lib/flowy-document2/src/event_handler.rs (+76 -15)
📝 frontend/rust-lib/flowy-document2/src/event_map.rs (+13 -41)
📝 frontend/rust-lib/flowy-document2/src/parser/constant.rs (+87 -1)
📝 frontend/rust-lib/flowy-document2/src/parser/document_data_parser.rs (+73 -102)
frontend/rust-lib/flowy-document2/src/parser/external/mod.rs (+2 -0)
frontend/rust-lib/flowy-document2/src/parser/external/parser.rs (+40 -0)
frontend/rust-lib/flowy-document2/src/parser/external/utils.rs (+559 -0)
📝 frontend/rust-lib/flowy-document2/src/parser/mod.rs (+1 -0)
📝 frontend/rust-lib/flowy-document2/src/parser/parser_entities.rs (+155 -99)
📝 frontend/rust-lib/flowy-document2/src/parser/utils.rs (+24 -65)
📝 frontend/rust-lib/flowy-document2/tests/assets/html/bulleted_list.html (+1 -1)
📝 frontend/rust-lib/flowy-document2/tests/assets/html/callout.html (+2 -2)
frontend/rust-lib/flowy-document2/tests/assets/html/google_docs.html (+1 -0)
frontend/rust-lib/flowy-document2/tests/assets/html/notion.html (+34 -0)

...and 13 more files

📄 Description

Feature Preview

Refactor the algorithm for converting document data to JSON, optimizing time complexity, and supporting the conversion of HTML from both Notion and Google Docs into nested JSON structures.


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/3848 **Author:** [@qinluhe](https://github.com/qinluhe) **Created:** 10/31/2023 **Status:** ✅ Merged **Merged:** 11/2/2023 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `feat/convert-data-to-nested-block` --- ### 📝 Commits (10+) - [`f2a34a0`](https://github.com/AppFlowy-IO/AppFlowy/commit/f2a34a02acf004ef841eb863917e243ac9271a1e) feat: support convert external data to nested json - [`08a5fde`](https://github.com/AppFlowy-IO/AppFlowy/commit/08a5fde37d788fc2c7955a10f7b863a1ea50c0cd) fix: add some comment - [`deec894`](https://github.com/AppFlowy-IO/AppFlowy/commit/deec894f3a3b4fc7af8fc43194521d452d01c3a9) fix: code review - [`d9062ea`](https://github.com/AppFlowy-IO/AppFlowy/commit/d9062ea5fd445925df5c218c8d0a0ecf9cbd3531) fix: code review - [`0fcd7e7`](https://github.com/AppFlowy-IO/AppFlowy/commit/0fcd7e7fc70cc119c4145e67d8af047f2baedb36) fix: code view - [`af645a2`](https://github.com/AppFlowy-IO/AppFlowy/commit/af645a2cf572e1f071ed5d22f6ef857602a44a19) fix: code view - [`b0472e3`](https://github.com/AppFlowy-IO/AppFlowy/commit/b0472e3bf24f351c921e1b2900bbcaf0d7fdafc7) fix: update tauri cargo lock file - [`bb0d3e5`](https://github.com/AppFlowy-IO/AppFlowy/commit/bb0d3e5353748571e4c3257f2dbbf99a1dd3f44d) fix: remove reduant function - [`8fb9280`](https://github.com/AppFlowy-IO/AppFlowy/commit/8fb928051cdc524d71d4af5e0188a98b0867f72d) fix: parse dir attribute in element - [`e89b419`](https://github.com/AppFlowy-IO/AppFlowy/commit/e89b41964e43a47638eb17d324e8207ba9a2c392) fix: add comment about parse dir ### 📊 Changes **33 files changed** (+2529 additions, -338 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_tauri/src-tauri/Cargo.lock` (+19 -1) 📝 `frontend/rust-lib/Cargo.lock` (+19 -1) 📝 `frontend/rust-lib/event-integration/src/document/document_event.rs` (+16 -1) 📝 `frontend/rust-lib/event-integration/tests/document/local_test/test.rs` (+55 -3) 📝 `frontend/rust-lib/flowy-document2/Cargo.toml` (+2 -1) 📝 `frontend/rust-lib/flowy-document2/src/entities.rs` (+2 -0) 📝 `frontend/rust-lib/flowy-document2/src/event_handler.rs` (+76 -15) 📝 `frontend/rust-lib/flowy-document2/src/event_map.rs` (+13 -41) 📝 `frontend/rust-lib/flowy-document2/src/parser/constant.rs` (+87 -1) 📝 `frontend/rust-lib/flowy-document2/src/parser/document_data_parser.rs` (+73 -102) ➕ `frontend/rust-lib/flowy-document2/src/parser/external/mod.rs` (+2 -0) ➕ `frontend/rust-lib/flowy-document2/src/parser/external/parser.rs` (+40 -0) ➕ `frontend/rust-lib/flowy-document2/src/parser/external/utils.rs` (+559 -0) 📝 `frontend/rust-lib/flowy-document2/src/parser/mod.rs` (+1 -0) 📝 `frontend/rust-lib/flowy-document2/src/parser/parser_entities.rs` (+155 -99) 📝 `frontend/rust-lib/flowy-document2/src/parser/utils.rs` (+24 -65) 📝 `frontend/rust-lib/flowy-document2/tests/assets/html/bulleted_list.html` (+1 -1) 📝 `frontend/rust-lib/flowy-document2/tests/assets/html/callout.html` (+2 -2) ➕ `frontend/rust-lib/flowy-document2/tests/assets/html/google_docs.html` (+1 -0) ➕ `frontend/rust-lib/flowy-document2/tests/assets/html/notion.html` (+34 -0) _...and 13 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 Refactor the algorithm for converting document data to JSON, optimizing time complexity, and supporting the conversion of HTML from both Notion and Google Docs into nested JSON structures. <!--- 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 22:20:52 +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#5910
No description provided.