-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Comment Template block: Handle nested comments #36065
Comment Template block: Handle nested comments #36065
Conversation
newmovie.movI wonder what the best UX here should be. Like I mention in the video, if this setting is set: we cannot easily fetch the X top level comments AND it's replies. I think it would be pragmatic to (for now) ignore the "Break comments into X pages with top level comments per page..." setting and just provide a default number of comments per page in |
In my opinion, we can land all the improvements that are ready, and work on the rest of the follow-up PRs. I don't mind if you leave the one that seems the more complex for the end. I don't think we must provide all the same functionalities if they don't make too much sense in the block-based world. |
I agree that if the settings are still available from the block it isn't a big deal to not follow the global setting from the beginning. Maybe we can create a follow-up issue for future reference. |
c0dcc4f
to
cc92c87
Compare
af4a3d9
to
6b91b87
Compare
172628b
to
b3b00c0
Compare
@michalczaplinski, that's a complex case to support those nested comments. I think it's on track. Really good work sorting out all the complexity comment threads bring. I left some initial comments mostly around code guidelines that are important for blocks because those PHP files get copied unmodified to the WordPress core once moved out of the experimental stage. |
3afc014
to
d3a0183
Compare
Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
Replace the custom convert_to_tree with calls to ::get_children()
ccd8529
to
802e379
Compare
I'm following the progress on #36431 where @andrewserong is trying to resolve similar issues for the Query Loop block. I don't know if those are the same exact cases, but given that we use nearly the same code we might have a solution quite soon. Let's file an issue for now and watch the progress on the linked PR. I addressed some of my nitpicks that don't impact the functionality. Let's land this PR and continue in follow-up PRs. I will open issues for the things discovered during testing. |
Description
This is a follow-up PR to #35231 which adds handling of nested comments.
How has this been tested?
Comments Query Loop
block .Screenshots
admin
frontend
Types of changes
This is still a pretty barebones implementation of comment nesting.
Styling is very basic and will be tackled in another PR. For now, I've just included enough so that you can visually discern the nested comments by their indentation.
Also:
ol
instead oful
element because comments are an ordered list