[PR #5775] [MERGED] Lexical: August 2025 fixes #6565

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

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/5775
Author: @ssddanbrown
Created: 8/26/2025
Status: Merged
Merged: 8/28/2025
Merged by: @ssddanbrown

Base: developmentHead: lexical_aug25


📝 Commits (4)

  • 849bc4d Lexical: Improved nested details interaction
  • 519acaf Lexical: Added better selection display for collapisble blocks
  • 46613f7 Lexical: Added backspace handling for details
  • f5da310 Lexical: Fixed details tests

📊 Changes

12 files changed (+214 additions, -54 deletions)

View changed files

📝 resources/js/wysiwyg/index.ts (+3 -1)
📝 resources/js/wysiwyg/lexical/core/LexicalNode.ts (+8 -0)
📝 resources/js/wysiwyg/lexical/core/LexicalSelection.ts (+3 -3)
📝 resources/js/wysiwyg/lexical/core/nodes/LexicalElementNode.ts (+31 -3)
📝 resources/js/wysiwyg/lexical/rich-text/LexicalDetailsNode.ts (+18 -1)
📝 resources/js/wysiwyg/lexical/rich-text/__tests__/unit/LexicalDetailsNode.test.ts (+18 -23)
📝 resources/js/wysiwyg/services/keyboard-handling.ts (+32 -2)
📝 resources/js/wysiwyg/services/mouse-handling.ts (+25 -16)
resources/js/wysiwyg/services/selection-handling.ts (+49 -0)
📝 resources/js/wysiwyg/ui/defaults/buttons/objects.ts (+4 -5)
resources/js/wysiwyg/utils/details.ts (+9 -0)
📝 resources/sass/_editor.scss (+14 -0)

📄 Description

Focusing on collapsible/details blocks.

For #5631

  • Updated details blocks to be open by default on insert.
  • Updated details block selection handling not to always fully cascade to lowest editable child on selection, so parents can be reliably selected.
  • Updated mouse handling to treat details panes like the root element, allowing easier insert for hard-to escape blocks within details blocks.

Remaining Actions

  • Improve details block selection feedback
  • Fix backspace within nested details removing the entire stack.
  • Update/fix tests

🔄 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/5775 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 8/26/2025 **Status:** ✅ Merged **Merged:** 8/28/2025 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `lexical_aug25` --- ### 📝 Commits (4) - [`849bc4d`](https://github.com/BookStackApp/BookStack/commit/849bc4d6c3b1fbeb09035a0099509a00c2684b93) Lexical: Improved nested details interaction - [`519acaf`](https://github.com/BookStackApp/BookStack/commit/519acaf324f5ce806f6e819683756ba175690ea1) Lexical: Added better selection display for collapisble blocks - [`46613f7`](https://github.com/BookStackApp/BookStack/commit/46613f76f61902db4dca5f54c308b8dadf02a14c) Lexical: Added backspace handling for details - [`f5da310`](https://github.com/BookStackApp/BookStack/commit/f5da31037d79a5701610ef8f619ab3c2b38b5fa6) Lexical: Fixed details tests ### 📊 Changes **12 files changed** (+214 additions, -54 deletions) <details> <summary>View changed files</summary> 📝 `resources/js/wysiwyg/index.ts` (+3 -1) 📝 `resources/js/wysiwyg/lexical/core/LexicalNode.ts` (+8 -0) 📝 `resources/js/wysiwyg/lexical/core/LexicalSelection.ts` (+3 -3) 📝 `resources/js/wysiwyg/lexical/core/nodes/LexicalElementNode.ts` (+31 -3) 📝 `resources/js/wysiwyg/lexical/rich-text/LexicalDetailsNode.ts` (+18 -1) 📝 `resources/js/wysiwyg/lexical/rich-text/__tests__/unit/LexicalDetailsNode.test.ts` (+18 -23) 📝 `resources/js/wysiwyg/services/keyboard-handling.ts` (+32 -2) 📝 `resources/js/wysiwyg/services/mouse-handling.ts` (+25 -16) ➕ `resources/js/wysiwyg/services/selection-handling.ts` (+49 -0) 📝 `resources/js/wysiwyg/ui/defaults/buttons/objects.ts` (+4 -5) ➕ `resources/js/wysiwyg/utils/details.ts` (+9 -0) 📝 `resources/sass/_editor.scss` (+14 -0) </details> ### 📄 Description Focusing on collapsible/details blocks. For #5631 - Updated details blocks to be open by default on insert. - Updated details block selection handling not to always fully cascade to lowest editable child on selection, so parents can be reliably selected. - Updated mouse handling to treat details panes like the root element, allowing easier insert for hard-to escape blocks within details blocks. ### Remaining Actions - [x] Improve details block selection feedback - [x] Fix backspace within nested details removing the entire stack. - [x] Update/fix tests --- <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:35:40 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6565