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

feat(#263): multiple comment fields in one page #266

Closed
wants to merge 3 commits into from
Closed

feat(#263): multiple comment fields in one page #266

wants to merge 3 commits into from

Conversation

ChathuraGH
Copy link

@ChathuraGH ChathuraGH commented Dec 15, 2023

#263 feat
adding code for getting form's parent '#comments' for supporting multiple comment fields in one page.
at >

  1. submitDeleteCommentForm
  2. submitCommentCreateForm

if we use jquery this is possible with one line.
$form.parents("section#comments").replaceWith(data);
It can be used in old versions that uses jquery. It is working 100%.

without this code when you try to post or delete comment while having more than one comment fields in one page, the posting comments(parent comments) from all the comment fiels get add to frist comment field, When deleting all the deleted fields get updated to first field.

adding code for getting form's parent '#comments' for supporting multiple comment fields in one page.
at > 
1) submitDeleteCommentForm
2) submitCommentCreateForm
@ChathuraGH
Copy link
Author

Test the code before merging. I am not 100% sure it works. Even though it work on my pc.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0d600b9) 99.89% compared to head (5fcbe70) 99.79%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #266      +/-   ##
===========================================
- Coverage    99.89%   99.79%   -0.11%     
===========================================
  Files           56       56              
  Lines         1994     1994              
  Branches       162      162              
===========================================
- Hits          1992     1990       -2     
- Misses           1        2       +1     
- Partials         1        2       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ChathuraGH ChathuraGH closed this Dec 20, 2023
@ChathuraGH
Copy link
Author

ChathuraGH commented Dec 20, 2023

Pull request is incomplete. Because these changes are not enough to support multiple comment fields in one page.

Because, Pagination doesn't work. If one pagination link is clicked, all the comments fields in all the post objects are paginated. Not only clicked pagination comment field.

Expected behaviour >

Only clicked (pagination link) comment field should be loaded with corresponding comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants