Skip to content
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

Merged
merged 1 commit into from Sep 8, 2023

Conversation

gokaysatir
Copy link
Contributor

Change-Id: I7476aa13ad5d77cbc888339fb0ccd2d485b8f274

  • Resolves: #
  • Target version: master

Summary

TODO

  • ...

Checklist

  • Code is properly formatted
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

@gokaysatir gokaysatir marked this pull request as draft September 1, 2023 13:44
@gokaysatir gokaysatir force-pushed the private/gokay/comment-replies branch 2 times, most recently from b4cb748 to 3b36bb2 Compare September 6, 2023 11:02
@gokaysatir gokaysatir changed the title temp. Writer: Set parent / child relationship in UI. Sep 6, 2023
@gokaysatir gokaysatir marked this pull request as ready for review September 6, 2023 11:03
return false;
lastChild = this.getIndexOf(this.sectionProperties.commentList[lastChild].sectionProperties.data.parent);
else if (comment.sectionProperties.children.length > 0) {
Copy link
Contributor

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') {
Copy link
Contributor

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...

Copy link
Contributor

@eszkadev eszkadev left a 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.

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
@gokaysatir gokaysatir merged commit d4dcc9e into master Sep 8, 2023
11 of 12 checks passed
@gokaysatir gokaysatir deleted the private/gokay/comment-replies branch September 8, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants