[PR #5349] [MERGED] Lexical: Merge of custom nodes & re-organisation of codebase #6481

Closed
opened 2026-02-05 10:33:26 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/5349
Author: @ssddanbrown
Created: 12/3/2024
Status: Merged
Merged: 12/4/2024
Merged by: @ssddanbrown

Base: developmentHead: lexical_reorg


📝 Commits (6)

  • f3fa63a Lexical: Merged custom paragraph node, removed old format/indent refs
  • 36a4d79 Lexical: Extracted & merged heading & quote nodes
  • ebd4604 Lexical: Merged list nodes
  • 57d8449 Lexical: Merged custom table node code
  • 9fdd100 Lexical: Reorganised custom node code into lexical codebase
  • d00cf6e Lexical: Updated tests for node changes

📊 Changes

92 files changed (+1319 additions, -2894 deletions)

View changed files

📝 resources/js/wysiwyg/index.ts (+1 -1)
📝 resources/js/wysiwyg/lexical/core/LexicalEvents.ts (+0 -3)
📝 resources/js/wysiwyg/lexical/core/LexicalMutations.ts (+0 -10)
📝 resources/js/wysiwyg/lexical/core/LexicalReconciler.ts (+6 -73)
📝 resources/js/wysiwyg/lexical/core/__tests__/unit/HTMLCopyAndPaste.test.ts (+2 -2)
📝 resources/js/wysiwyg/lexical/core/__tests__/unit/LexicalEditor.test.ts (+7 -12)
📝 resources/js/wysiwyg/lexical/core/__tests__/unit/LexicalEditorState.test.ts (+4 -8)
📝 resources/js/wysiwyg/lexical/core/__tests__/unit/LexicalSerialization.test.ts (+4 -3)
📝 resources/js/wysiwyg/lexical/core/__tests__/utils/index.ts (+2 -9)
resources/js/wysiwyg/lexical/core/nodes/CommonBlockNode.ts (+61 -0)
📝 resources/js/wysiwyg/lexical/core/nodes/LexicalElementNode.ts (+2 -43)
📝 resources/js/wysiwyg/lexical/core/nodes/LexicalParagraphNode.ts (+16 -53)
📝 resources/js/wysiwyg/lexical/core/nodes/LexicalRootNode.ts (+0 -4)
📝 resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalElementNode.test.ts (+0 -2)
📝 resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalParagraphNode.test.ts (+18 -3)
📝 resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalRootNode.test.ts (+0 -2)
📝 resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalTabNode.test.ts (+1 -8)
📝 resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalTextNode.test.ts (+0 -2)
📝 resources/js/wysiwyg/lexical/core/nodes/common.ts (+3 -10)
📝 resources/js/wysiwyg/lexical/headless/__tests__/unit/LexicalHeadlessEditor.test.ts (+1 -1)

...and 72 more files

📄 Description

Start of work to merge custom nodes into lexical, removing old unused format/indent core logic while extending common block elements where possible.

Continuation to merge and integrate custom & original lexical code for simpler/cleaner result.

Todo

  • Merge custom nodes, updating base nodes to use common block node where possible:
    • Heading
    • List
    • List item
    • Quote
    • Table
    • Table cell
    • Table row
  • Reorganise/cleanup old custom common node code
  • Reorganise existing nodes to new location
  • Update testing

🔄 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/BookStackApp/BookStack/pull/5349 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 12/3/2024 **Status:** ✅ Merged **Merged:** 12/4/2024 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `lexical_reorg` --- ### 📝 Commits (6) - [`f3fa63a`](https://github.com/BookStackApp/BookStack/commit/f3fa63a5ae5d671d10c9313965723683608ddc4e) Lexical: Merged custom paragraph node, removed old format/indent refs - [`36a4d79`](https://github.com/BookStackApp/BookStack/commit/36a4d791205f824ce6d7d487ab4578ae736c78c0) Lexical: Extracted & merged heading & quote nodes - [`ebd4604`](https://github.com/BookStackApp/BookStack/commit/ebd4604f21060cd5414fda5d2d79ed41e79e9b62) Lexical: Merged list nodes - [`57d8449`](https://github.com/BookStackApp/BookStack/commit/57d8449660e2cf5acd9bfaa6c951b3dfd040bf42) Lexical: Merged custom table node code - [`9fdd100`](https://github.com/BookStackApp/BookStack/commit/9fdd100f2d989ddc30d9cbad4dadb1b98096edaf) Lexical: Reorganised custom node code into lexical codebase - [`d00cf6e`](https://github.com/BookStackApp/BookStack/commit/d00cf6e1bac6165354f3b8a3a440f948941fe011) Lexical: Updated tests for node changes ### 📊 Changes **92 files changed** (+1319 additions, -2894 deletions) <details> <summary>View changed files</summary> 📝 `resources/js/wysiwyg/index.ts` (+1 -1) 📝 `resources/js/wysiwyg/lexical/core/LexicalEvents.ts` (+0 -3) 📝 `resources/js/wysiwyg/lexical/core/LexicalMutations.ts` (+0 -10) 📝 `resources/js/wysiwyg/lexical/core/LexicalReconciler.ts` (+6 -73) 📝 `resources/js/wysiwyg/lexical/core/__tests__/unit/HTMLCopyAndPaste.test.ts` (+2 -2) 📝 `resources/js/wysiwyg/lexical/core/__tests__/unit/LexicalEditor.test.ts` (+7 -12) 📝 `resources/js/wysiwyg/lexical/core/__tests__/unit/LexicalEditorState.test.ts` (+4 -8) 📝 `resources/js/wysiwyg/lexical/core/__tests__/unit/LexicalSerialization.test.ts` (+4 -3) 📝 `resources/js/wysiwyg/lexical/core/__tests__/utils/index.ts` (+2 -9) ➕ `resources/js/wysiwyg/lexical/core/nodes/CommonBlockNode.ts` (+61 -0) 📝 `resources/js/wysiwyg/lexical/core/nodes/LexicalElementNode.ts` (+2 -43) 📝 `resources/js/wysiwyg/lexical/core/nodes/LexicalParagraphNode.ts` (+16 -53) 📝 `resources/js/wysiwyg/lexical/core/nodes/LexicalRootNode.ts` (+0 -4) 📝 `resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalElementNode.test.ts` (+0 -2) 📝 `resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalParagraphNode.test.ts` (+18 -3) 📝 `resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalRootNode.test.ts` (+0 -2) 📝 `resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalTabNode.test.ts` (+1 -8) 📝 `resources/js/wysiwyg/lexical/core/nodes/__tests__/unit/LexicalTextNode.test.ts` (+0 -2) 📝 `resources/js/wysiwyg/lexical/core/nodes/common.ts` (+3 -10) 📝 `resources/js/wysiwyg/lexical/headless/__tests__/unit/LexicalHeadlessEditor.test.ts` (+1 -1) _...and 72 more files_ </details> ### 📄 Description Start of work to merge custom nodes into lexical, removing old unused format/indent core logic while extending common block elements where possible. Continuation to merge and integrate custom & original lexical code for simpler/cleaner result. ## Todo - [x] Merge custom nodes, updating base nodes to use common block node where possible: - [x] Heading - [x] List - [x] List item - [x] Quote - [x] Table - [x] Table cell - [x] Table row - [x] Reorganise/cleanup old custom common node code - [x] Reorganise existing nodes to new location - [x] Update testing --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:33:26 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6481