[PR #4815] [MERGED] Comment WYSIWYG Inputs #6412

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

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/4815
Author: @ssddanbrown
Created: 1/30/2024
Status: Merged
Merged: 1/31/2024
Merged by: @ssddanbrown

Base: developmentHead: comment_wysiwyg


📝 Commits (6)

  • 5c92b72 Comments: Added input wysiwyg for creating/updating comments
  • adf0bae Comments: Added back-end HTML support, fixed editor focus
  • e9a19d5 Comments: Added wysiwyg link selector, updated tests, removed command
  • 06901b8 Comments: Added HTML filter on load, tinymce elem filtering
  • fee9045 Comments: Removed remaining uses of redundant 'text' field
  • 47f082c Comments: Added HTML filter test, fixed placeholder in dark mode

📊 Changes

19 files changed (+225 additions, -175 deletions)

View changed files

📝 app/Activity/CommentRepo.php (+5 -21)
📝 app/Activity/Controllers/CommentController.php (+10 -7)
📝 app/Activity/Models/Comment.php (+8 -2)
📝 app/Activity/Tools/CommentTree.php (+11 -0)
app/Console/Commands/RegenerateCommentContentCommand.php (+0 -49)
📝 database/factories/Activity/Models/CommentFactory.php (+1 -1)
📝 resources/js/components/page-comment.js (+27 -4)
📝 resources/js/components/page-comments.js (+38 -5)
📝 resources/js/components/wysiwyg-input.js (+2 -5)
📝 resources/js/wysiwyg/config.js (+1 -0)
📝 resources/sass/_tinymce.scss (+7 -0)
📝 resources/views/comments/comment.blade.php (+7 -2)
📝 resources/views/comments/comments.blade.php (+12 -1)
📝 resources/views/comments/create.blade.php (+1 -1)
📝 resources/views/layouts/base.blade.php (+3 -0)
📝 tests/Activity/WatchTest.php (+5 -5)
tests/Commands/RegenerateCommentContentCommandTest.php (+0 -31)
📝 tests/Entity/CommentTest.php (+85 -35)
📝 tests/Permissions/RolePermissionsTest.php (+2 -6)

📄 Description

This PR aims to bring the recently added simple book/chapter/shelf description WYSIWYG inputs to comments.

Todo

  • Added WYSWIYG loading and UI for comments.
  • Add back-end changes for submission/saving.
  • Add link selector support.
  • Load in WYSWIYG content gracefully where possible.
  • Remove old redundant comment regen command.
  • Add HTML cleaning on comment show/usage?
  • Set issue to drop old text (markdown) comment column in a future update?
  • Testing
    • RTL
    • Dark mode
    • Update tests not to use Comment->text property.
    • Test editor loads if cannot comment all, but can edit existing comment.
    • Test display of comments
    • Test updating of comments with HTML
    • Test HTML content filtering on submit

Doc Updates

  • Update advisory about limited compatibility with old markdown content.
  • Update advisory on removal of the comment regen command.
  • Remove docs content for comment regen command.

🔄 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/4815 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 1/30/2024 **Status:** ✅ Merged **Merged:** 1/31/2024 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `comment_wysiwyg` --- ### 📝 Commits (6) - [`5c92b72`](https://github.com/BookStackApp/BookStack/commit/5c92b72fdd419ccb6f77bfdf0a1cb1358c51a9d8) Comments: Added input wysiwyg for creating/updating comments - [`adf0bae`](https://github.com/BookStackApp/BookStack/commit/adf0baebb9ffc61cc944c0572ec6dbb12a5b41a0) Comments: Added back-end HTML support, fixed editor focus - [`e9a19d5`](https://github.com/BookStackApp/BookStack/commit/e9a19d587857ba5afcaa411718af61b62aaff1ac) Comments: Added wysiwyg link selector, updated tests, removed command - [`06901b8`](https://github.com/BookStackApp/BookStack/commit/06901b878f2c8057a6f9b7d2e0adfda425c68dee) Comments: Added HTML filter on load, tinymce elem filtering - [`fee9045`](https://github.com/BookStackApp/BookStack/commit/fee9045dacd5deca3ae88b17a22b3fff60c01195) Comments: Removed remaining uses of redundant 'text' field - [`47f082c`](https://github.com/BookStackApp/BookStack/commit/47f082c085ab8440b294f701b57289f101ddd1f4) Comments: Added HTML filter test, fixed placeholder in dark mode ### 📊 Changes **19 files changed** (+225 additions, -175 deletions) <details> <summary>View changed files</summary> 📝 `app/Activity/CommentRepo.php` (+5 -21) 📝 `app/Activity/Controllers/CommentController.php` (+10 -7) 📝 `app/Activity/Models/Comment.php` (+8 -2) 📝 `app/Activity/Tools/CommentTree.php` (+11 -0) ➖ `app/Console/Commands/RegenerateCommentContentCommand.php` (+0 -49) 📝 `database/factories/Activity/Models/CommentFactory.php` (+1 -1) 📝 `resources/js/components/page-comment.js` (+27 -4) 📝 `resources/js/components/page-comments.js` (+38 -5) 📝 `resources/js/components/wysiwyg-input.js` (+2 -5) 📝 `resources/js/wysiwyg/config.js` (+1 -0) 📝 `resources/sass/_tinymce.scss` (+7 -0) 📝 `resources/views/comments/comment.blade.php` (+7 -2) 📝 `resources/views/comments/comments.blade.php` (+12 -1) 📝 `resources/views/comments/create.blade.php` (+1 -1) 📝 `resources/views/layouts/base.blade.php` (+3 -0) 📝 `tests/Activity/WatchTest.php` (+5 -5) ➖ `tests/Commands/RegenerateCommentContentCommandTest.php` (+0 -31) 📝 `tests/Entity/CommentTest.php` (+85 -35) 📝 `tests/Permissions/RolePermissionsTest.php` (+2 -6) </details> ### 📄 Description This PR aims to bring the recently added simple book/chapter/shelf description WYSIWYG inputs to comments. ### Todo - [x] Added WYSWIYG loading and UI for comments. - [x] Add back-end changes for submission/saving. - [x] Add link selector support. - [x] Load in WYSWIYG content gracefully where possible. - [x] Remove old redundant comment regen command. - [x] Add HTML cleaning on comment show/usage? - [x] Set issue to drop old `text` (markdown) comment column in a future update? - Keep for a few releases to allow potentially recovery of content missing by accidental downgrade. - Open in #4821 - Testing - [x] RTL - [x] Dark mode - [x] Update tests not to use Comment->text property. - [x] Test editor loads if cannot comment all, but can edit existing comment. - [x] Test display of comments - [x] Test updating of comments with HTML - [x] Test HTML content filtering on submit ### Doc Updates - Update advisory about limited compatibility with old markdown content. - Update advisory on removal of the comment regen command. - Remove docs content for comment regen command. --- <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:31:37 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6412