-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TinyMCE Comments Plugin #473
base: master
Are you sure you want to change the base?
TinyMCE Comments Plugin #473
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your patch! I've added a few notes - let me know if you're still interested in working on this.
ghostwriter/static/js/tinymce/plugins/ghostwriter-comments/plugin.min.js
Outdated
Show resolved
Hide resolved
ghostwriter/static/js/tinymce/plugins/ghostwriter-comments/plugin.min.js
Outdated
Show resolved
Hide resolved
ghostwriter/static/js/tinymce/plugins/ghostwriter-comments/plugin.min.js
Outdated
Show resolved
Hide resolved
ghostwriter/static/js/tinymce/plugins/ghostwriter-comments/plugin.min.js
Outdated
Show resolved
Hide resolved
Thanks @ColonelThirtyTwo I have made the requested changes. And added a border around each individual comment, moved the avatar to the top left of the comment. I am still interested in working on this however I am still trying to think of a way to solve the notification problem. After your report has been QA'd (and comments have been left) it might be time consuming for the author to go back through each individual finding and check if all comments have been addressed in the report. |
Thinking about it I don't think the notifications should be part of this plugin as I did have it sending websocket messages once a comment had been added but if the user didn't submit the form the comment wouldn't save therefore notifications should probably be done server side once the form is submitted. Something like this: If the updated form contains any rich text fields with 1 or more Marking this as ready for review now. |
ghostwriter/static/js/tinymce/plugins/ghostwriter-comments/plugin.min.js
Outdated
Show resolved
Hide resolved
ghostwriter/static/js/tinymce/plugins/ghostwriter-comments/plugin.min.js
Outdated
Show resolved
Hide resolved
ghostwriter/static/js/tinymce/plugins/ghostwriter-comments/plugin.min.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to support nested comments (which I think we should), I think this this may need to be split up into a "View Existing Comment" button and a "Create New Comment" button. View would traverse up the node tree and open the editor for an existing comment if found and replace that span specifically when edited, whereas Create would create a comment for the highlighted span. This would also allow one to edit the content of a commented span, which is impossible with the current design.
This would mean you could comment on an entire paragraph while also being able to comment on individual words or sentences.
Styling may be a pain though to indicate nested comments... you'd have to have .comment { color: onecolor; }
and .comment .comment { color: anothercolor; }
and so on.
ghostwriter/static/js/tinymce/plugins/ghostwriter-comments/plugin.min.js
Outdated
Show resolved
Hide resolved
ghostwriter/static/js/tinymce/plugins/ghostwriter-comments/plugin.min.js
Outdated
Show resolved
Hide resolved
ghostwriter/static/js/tinymce/plugins/ghostwriter-comments/plugin.min.js
Show resolved
Hide resolved
Hi @ColonelThirtyTwo, I have reworked the comment plugin to allow for nested comments, There is now a "Comments" submenu in the context menu, which allows you to "Create comment" and "View comments". "Create" is a simple dialog to create a brand new comment (Which can be nested (There is CSS to support up to three levels of comment nesting)) and "View" opens a dialog displaying the existing comments. |
Draft PR for a comments plugin mentioned in #425
Added a new tinymce plugin to the folder called
ghostwriter-comments
Comment
context menu item to all wysiwyg editorsThe comment thread currently appears with the commenters username avatar and then their comment.
The comments dont currently transfer over to the docx but Im not sure they should, the reportwriter is currently just adding the paragraph element into the docx correctly without the comment so we might not want to change that