Comments are going to be decoupled from node to field and AJAX framework has significant changes
This module should be ported to D8 ASAP because all underling subsystems are mostly stable
Related issue #731724: Convert comment settings into a field to make them work with CMI and non-node entities
Change notices
- Form API Ajax now handled by D8 Ajax API from #1843220-67: Convert form AJAX to new AJAX API
Poring roadmap:
1) Update to latest d7 dev
2) Convert Javascript to d8
3) Convert ajax_comments_comment_view_alter(adding classes to comment form links)
4) Implement ajax callbacks for reply/edit/delete
5) Convert Views integration
6) Port nodejs integration
7) Enable Comment Form caching
Comment | File | Size | Author |
---|---|---|---|
#26 | interdiff.txt | 1.4 KB | danmuzyka |
#26 | ajax_comments-d8_basic_ajax_post-1947898-26.patch | 25.25 KB | danmuzyka |
#22 | 1947898-port-ajax-comments-d8_basic-ajax-post.patch | 24.79 KB | danmuzyka |
Comments
Comment #1
formatC'vt CreditAttribution: formatC'vt commentedyep, i agree with you, we need a D8 version =)
Comment #2
muschpusch CreditAttribution: muschpusch commentedAt drupalcon i started working on the very basics (settings form, routing, etc.). Ajax comments is still completely broken but i will push what i have so far... :)
Comment #3
formatC'vt CreditAttribution: formatC'vt commentedThis is good. About settings form... i think we need to remove "View mode", see this issue #2330537: Semantic error in active detection
Comment #4
muschpusch CreditAttribution: muschpusch commentedI remember that i tried fixing this a while ago and failed. So yes if nobody else wants to give it a try let's remove this functionality?
Comment #5
formatC'vt CreditAttribution: formatC'vt commentedI don't know about D8, but in D7 there no way to get node view mode from hook_comment_view().
I agree with deletion and @andypost, he said about we no need so deeply config like "node type + view mode" =)
Comment #6
muschpusch CreditAttribution: muschpusch commentedTrue! You wanna remove it? Go ahead :) but we should write it in the release notes of the next release!
Comment #7
andypostAlso there's new approach could be useful #1875974: Abstract 'component type' specific code out of EntityDisplay
PS: maybe it makes sense to make initial port at github to easily colaborate?
Comment #8
muschpusch CreditAttribution: muschpusch commentedok done: https://github.com/MuschPusch/ajax_comments
Comment #9
formatC'vt CreditAttribution: formatC'vt commentedHi guys, repository on github has no commits on past 6 month.
We come back from github to drupal.org repository.
Comment #10
andypostIt's still easy to fork at github, then we can merge it to d.o
In a bunch of related issues the markup for comments would change so I will try to follow and review ongoing changes
Comment #11
andypostAnd specifically for comment links
Comment #12
formatC'vt CreditAttribution: formatC'vt commentedok, thanks @andypost
Added porting roadmap
Comment #14
formatC'vt CreditAttribution: formatC'vt commentedtwo first steps are compleate
Comment #16
formatC'vt CreditAttribution: formatC'vt commentedstep 3 done.
Comment #17
andypostI've created https://github.com/andypost/ajax_comments and start conversion, also added yours changes
Patch is an intermediate step, suppose to implement basic functionality first.
Comments can be attached to any entity so settings for allowed bundles should live on "third_party_settings" probably in CommentType config, OTOH more granular settings could be stored within comment field or maybe better in comment default formatter.
Comment #18
formatC'vt CreditAttribution: formatC'vt commentedoh, i'm already add controller too and add some changes, but yours more d8 style way, i will merge my changes with yours on this week (probably today :).
Comment #21
formatC'vt CreditAttribution: formatC'vt commentedMerged.
Step 4. WIP. AJAXed comment form links, added Content types options and etc.
Comment #22
danmuzyka CreditAttribution: danmuzyka at Phase2 for Workday, Inc. commentedI've been working on getting this module functioning with the current release of Drupal 8 core. So far, I've made updates to get the baseline ajax comment-submission functionality working, including some changes to make it work properly with core's use of the
#lazy_builder
callback for the comment form.In the next few weeks I'll be working on separate patches for the ajax callbacks for
edit
anddelete
. Work on thereply
ajax callback might come later on, I'm not sure, yet.Note that there is one ajax bug in core's Editor module that affects this patch, for which I've filed this core bug and patch: https://www.drupal.org/node/2692453 .
Patch file attached. Please let me know if you have feedback or suggested changes.
Finally, would it be possible to create an 8.x-1.x version tag on this project, so that I can create new issues with the correct version tag, as needed?
Comment #23
formatC'vt CreditAttribution: formatC'vt commentedhi, thanks
we already have 8.x-1.x branch - https://www.drupal.org/node/348630/git-instructions/8.x-1.x
Comment #24
andypostLooks really awesome!
Just minor nits, suppose it's time to make 8.x-1.x-dev release!
suppose after posting comment you should not get page again
just make assertText()
Comment #25
jhedstromRight, but there's no way to file issues against it because there is no dev release :)
Comment #26
danmuzyka CreditAttribution: danmuzyka at Phase2 for Workday, Inc. commentedHi @andypost, thanks for that feedback.
WebTestBase
does not appear to be able to simulate changes to a page's DOM like a full browser would be able to do. I've updated the test, however, to check the content of the ajax response directly. I'll refactor the test to be a bit more elegant in a future patch, likely when I work on the controller for editing comments.Let me know if this new patch works for you.
Thanks,
Dan
Comment #28
formatC'vt CreditAttribution: formatC'vt commentedcommitted & released, thanks
If I am not mistaken - still needs work
Comment #29
jhedstromThe initial port seems to be working, and since there's already an
8.x
branch, it probably makes sense to do further work in separate issues. Marking this as fixed. I've also updated the status of #2684537: [ajax_comments] AJAX Comments accordingly.Comment #30
danmuzyka CreditAttribution: danmuzyka at Phase2 for Workday, Inc. commentedI have two separate issues I've posted so far, and I'm working on a patch to get ajax comment delete functionality working, so I'll post an issue for that when I have the patch ready.
Existing issues for D8 port:
https://www.drupal.org/node/2702303
https://www.drupal.org/node/2697165