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
Writer: Set parent / child relationship in UI. #7200
Conversation
b4cb748
to
3b36bb2
Compare
3b36bb2
to
399b8a9
Compare
return false; | ||
lastChild = this.getIndexOf(this.sectionProperties.commentList[lastChild].sectionProperties.data.parent); | ||
else if (comment.sectionProperties.children.length > 0) { |
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.
this is repeated code as few lines up, it would be good to move itinto separate method - code will be more readable
for (var i = 0; i < this.sectionProperties.commentList.length; i++) { | ||
var comment = this.sectionProperties.commentList[i]; | ||
|
||
if (comment.sectionProperties.data.parent === '0') { |
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.
this is repeated many times (check if parent is '0'), this has some special meaning I guess.
Would be good to create separate function for that which will name that check - will be easier to understand the code.
like isRootComment(comment)
- or what does that mean...
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.
I confirm, comments at the same position are separated now.
399b8a9
to
8901139
Compare
Add new property to commentSection (children). Update commentListSection for Writer comments. Now the comments at the same position are separated. The parent / child relations are set by "parent" attribute. Signed-off-by: Gökay Şatır <gokaysatir@gmail.com> Change-Id: I0a8ab060c133a51f4d09e71777cc6233b78a6efa
8901139
to
e56206a
Compare
Change-Id: I7476aa13ad5d77cbc888339fb0ccd2d485b8f274
Summary
TODO
Checklist
make check
make run
and manually verified that everything looks okay