[PR #5584] [MERGED] Content Comments #6526

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

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/5584
Author: @ssddanbrown
Created: 4/18/2025
Status: Merged
Merged: 5/22/2025
Merged by: @ssddanbrown

Base: developmentHead: content_comments


📝 Commits (10+)

  • 8d159f7 Comments: Started logic for content references
  • add238f Comments & Pointer: Converted components to typescript
  • 5e3c3ad Comments: Added back-end content reference handling
  • 2e7544a Comments: Converted comment component to TS
  • 18ede9b Comments: Added inline comment marker/highlight logic
  • 5bfba28 Comments: Started inline comment display windows
  • f656a82 Comments: Styled content comments & improved interaction
  • ecda4e1 Comments: Added reference marker to comments
  • e8f4418 Comments: Split out page comment reference logic to own component
  • 8bdf948 Comments: Added archive endpoints, messages, Js actions and tests

📊 Changes

40 files changed (+1743 additions, -520 deletions)

View changed files

📝 app/Activity/CommentRepo.php (+40 -2)
📝 app/Activity/Controllers/CommentController.php (+46 -5)
📝 app/Activity/Models/Comment.php (+2 -0)
📝 app/Activity/Tools/CommentTree.php (+35 -12)
app/Activity/Tools/CommentTreeNode.php (+23 -0)
📝 database/factories/Activity/Models/CommentFactory.php (+2 -0)
database/migrations/2025_04_18_215145_add_content_refs_and_archived_to_comments.php (+30 -0)
📝 lang/en/common.php (+2 -0)
📝 lang/en/entities.php (+10 -1)
resources/icons/archive.svg (+1 -0)
resources/icons/bookmark.svg (+1 -0)
📝 resources/js/components/editor-toolbox.ts (+34 -10)
📝 resources/js/components/index.ts (+1 -0)
resources/js/components/page-comment-reference.ts (+251 -0)
resources/js/components/page-comment.js (+0 -119)
resources/js/components/page-comment.ts (+184 -0)
resources/js/components/page-comments.js (+0 -175)
resources/js/components/page-comments.ts (+260 -0)
📝 resources/js/components/pointer.ts (+83 -32)
📝 resources/js/components/tabs.ts (+22 -10)

...and 20 more files

📄 Description

Related to #1265

Todo

  • Inline comment display
    • Option for controlling display
      • Omitting this for initial implementation as we'll gather some feedback about best placement and control level.
    • Selection zone representation (on focus/click?)
    • Indicator for if the comment is outdated
  • WYSIWYG display?
  • Update reference hash to be focused on text content, otherwise too much variance (eg, when loaded in editor).
  • MD editor display?
    • The MD editor cycle is too loose to retain accurate references, so retaining editor support to the new WYSIWYG.
  • Comment archival handling
  • Test changes to pointer work across presentation variation (change of edit/comment permissions etc...)
  • Test accessible use of pointer remains, including added comment action
  • Test use in old WYSIWYG (references remain inactive but don't break anything).

🔄 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/5584 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 4/18/2025 **Status:** ✅ Merged **Merged:** 5/22/2025 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `content_comments` --- ### 📝 Commits (10+) - [`8d159f7`](https://github.com/BookStackApp/BookStack/commit/8d159f77e440a57c8fdba5afb234d378d11856f6) Comments: Started logic for content references - [`add238f`](https://github.com/BookStackApp/BookStack/commit/add238fe9fb3d3626e8acd323bd32f91edb2797e) Comments & Pointer: Converted components to typescript - [`5e3c3ad`](https://github.com/BookStackApp/BookStack/commit/5e3c3ad634cb7de4a13041292611c7aaafaa2f30) Comments: Added back-end content reference handling - [`2e7544a`](https://github.com/BookStackApp/BookStack/commit/2e7544a865a2b8ca7fdd3e32bdd86746a1a62512) Comments: Converted comment component to TS - [`18ede9b`](https://github.com/BookStackApp/BookStack/commit/18ede9bbd3bef5e7b82ae52c0dac2a26fe2c24fd) Comments: Added inline comment marker/highlight logic - [`5bfba28`](https://github.com/BookStackApp/BookStack/commit/5bfba281fc0c57556d65092013b5663efd350b3e) Comments: Started inline comment display windows - [`f656a82`](https://github.com/BookStackApp/BookStack/commit/f656a82fe7a2be253ee53c3af8d27edd35617bd2) Comments: Styled content comments & improved interaction - [`ecda4e1`](https://github.com/BookStackApp/BookStack/commit/ecda4e1d6f42108fef9c62ff4a9a73a056caa089) Comments: Added reference marker to comments - [`e8f4418`](https://github.com/BookStackApp/BookStack/commit/e8f44186a8ebfac6789800211cb5a947991bf971) Comments: Split out page comment reference logic to own component - [`8bdf948`](https://github.com/BookStackApp/BookStack/commit/8bdf948743016f0461e589759130cbb50e46ab20) Comments: Added archive endpoints, messages, Js actions and tests ### 📊 Changes **40 files changed** (+1743 additions, -520 deletions) <details> <summary>View changed files</summary> 📝 `app/Activity/CommentRepo.php` (+40 -2) 📝 `app/Activity/Controllers/CommentController.php` (+46 -5) 📝 `app/Activity/Models/Comment.php` (+2 -0) 📝 `app/Activity/Tools/CommentTree.php` (+35 -12) ➕ `app/Activity/Tools/CommentTreeNode.php` (+23 -0) 📝 `database/factories/Activity/Models/CommentFactory.php` (+2 -0) ➕ `database/migrations/2025_04_18_215145_add_content_refs_and_archived_to_comments.php` (+30 -0) 📝 `lang/en/common.php` (+2 -0) 📝 `lang/en/entities.php` (+10 -1) ➕ `resources/icons/archive.svg` (+1 -0) ➕ `resources/icons/bookmark.svg` (+1 -0) 📝 `resources/js/components/editor-toolbox.ts` (+34 -10) 📝 `resources/js/components/index.ts` (+1 -0) ➕ `resources/js/components/page-comment-reference.ts` (+251 -0) ➖ `resources/js/components/page-comment.js` (+0 -119) ➕ `resources/js/components/page-comment.ts` (+184 -0) ➖ `resources/js/components/page-comments.js` (+0 -175) ➕ `resources/js/components/page-comments.ts` (+260 -0) 📝 `resources/js/components/pointer.ts` (+83 -32) 📝 `resources/js/components/tabs.ts` (+22 -10) _...and 20 more files_ </details> ### 📄 Description Related to #1265 ## Todo - [x] Inline comment display - [ ] ~~Option for controlling display~~ - Omitting this for initial implementation as we'll gather some feedback about best placement and control level. - [x] Selection zone representation (on focus/click?) - [x] Indicator for if the comment is outdated - [x] WYSIWYG display? - [x] Update reference hash to be focused on text content, otherwise too much variance (eg, when loaded in editor). - [ ] ~~MD editor display?~~ - The MD editor cycle is too loose to retain accurate references, so retaining editor support to the new WYSIWYG. - [x] Comment archival handling - [x] Test changes to pointer work across presentation variation (change of edit/comment permissions etc...) - [x] Test accessible use of pointer remains, including added comment action - [x] Test use in old WYSIWYG (references remain inactive but don't break anything). --- <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:34:41 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6526