Removes dependency of ExtComment(List)Component on option api. Comments are now completely separate from options, and option functions are called on comments externally. Also removes the requirement of the option value to be truthy in order for processComment to run, instead passing the current value to the function.
Separates out functions to create the reply/edit/delete buttons. Perhaps more controversially, removes the connectCommentEditor and enableCommentReply functions. While this does lead to a bit more redundancy, the nested callback structure and numerous params seem to cost more clarity than they're worth. I'd also argue that while replying to a comment and creating a top level comment happen to do similar things, they're not an inherent logical grouping.
Instead, some of the redundant functionality, like hiding and showing elements and removing the edit box, has been moved to the CommentEditorComponent class.
Improves separation of options and comments.
Removes dependency of
ExtComment(List)Component
on option api. Comments are now completely separate from options, and option functions are called on comments externally. Also removes the requirement of the option value to be truthy in order forprocessComment
to run, instead passing the current value to the function.Separates out functions to create the reply/edit/delete buttons. Perhaps more controversially, removes the
connectCommentEditor
andenableCommentReply
functions. While this does lead to a bit more redundancy, the nested callback structure and numerous params seem to cost more clarity than they're worth. I'd also argue that while replying to a comment and creating a top level comment happen to do similar things, they're not an inherent logical grouping.Instead, some of the redundant functionality, like hiding and showing elements and removing the edit box, has been moved to the
CommentEditorComponent
class.