Skip to:
Content

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#2036 closed enhancement (fixed)

Hierarchical replies

Reported by: jmdodd Owned by: jmdodd
Milestone: 2.4 Priority: normal
Severity: normal Version: 2.1
Component: Component - Replies Keywords:
Cc: jmdodd@…, alexvornoffice@…, stephen@…, jared@…, wordpress@…, nashwan.doaqan@…, info@…

Description

bbPress does not provide hierarchical reply-to functionality (also known as threading). This ticket is for implementing threaded replies as a bbPress feature.

Based on WordPress comment threading and the bbPress Threaded Replies plugin:
http://wordpress.org/extend/plugins/bbpress-threaded-replies/

Attachments (7)

2036.1.diff (43.3 KB) - added by jmdodd 6 years ago.
First pass at hierarchical replies. (Work in progress.)
2036.2.diff (47.9 KB) - added by jmdodd 6 years ago.
CSS fixes, better handling of actions.
2036.3.diff (46.8 KB) - added by jmdodd 6 years ago.
One setting instead of two for threading.
2036.4.diff (43.2 KB) - added by johnjamesjacoby 6 years ago.
2036.5.diff (45.2 KB) - added by jmdodd 6 years ago.
Refresh of 2036.4.diff
2036.6.diff (40.0 KB) - added by jmdodd 6 years ago.
2036.7.diff (41.8 KB) - added by jmdodd 6 years ago.

Download all attachments as: .zip

Change History (31)

#1 @jmdodd
6 years ago

  • Cc jmdodd@… added

#2 @alexvorn2
6 years ago

plugin territory I think.

#3 @alexvorn2
6 years ago

  • Cc alexvornoffice@… added

#4 @jmdodd
6 years ago

I should have included more background information: JJJ requested that I work on patching this feature for 2.3.

#5 @alexvorn2
6 years ago

Let's imagine that we have a responsive design with a bbPress forum and nested replies, with padding-left to a nested reply we will have something similar to this - http://wpimpact.com/wp-content/uploads/2012/11/delete-later.png
The reply text will have very little space (for levels like 3, 4, 5...)

#6 @jmdodd
6 years ago

Site owners have the option of enabling threading or not, just as they do with comments. They can also specify a maximum level of replies. Given current CSS, three levels of threading costs about 30 pixels.

#7 @netweb
6 years ago

  • Cc stephen@… added

#8 @jaredatch
6 years ago

  • Cc jared@… added

I admit I have had one client ask about this. I was likely because he wanted his forum to function more like comments, but still could be useful.

This option coupled with plugin that replaces comments with bbPress topics has a lot of potential. I would definitely pitch it to sites that have a high volume of comments.

#9 @jmdodd
6 years ago

When I was looking for an existing plugin to handle this, I came across requests for this feature spanning at least 3 years.

The client who requested threading also wanted a post + comments to topic + replies converter to manage posts that were better off in the forum, and vice versa. (See https://github.com/jmdodd/bbpress-topic-post-converter). I ended up building thread handling into it as well so that comments stayed threaded as replies.

#10 @jaredatch
6 years ago

Wow, really nifty. At one point I could have really used that plugin. Definitely bookmarking. Nice work.

#11 @MZAWeb
6 years ago

  • Cc wordpress@… added

#12 @johnjamesjacoby
6 years ago

  • Owner set to jmdodd

#13 @alexvorn2
6 years ago

at the end I think this is a bad idea to include hierarchical replies, like here in track, messages are not hierarchical, and everything works well for everybody, so in facebook comments the same...

@jmdodd
6 years ago

First pass at hierarchical replies. (Work in progress.)

#14 @jmdodd
6 years ago

Work in progress patch uploaded; still needs:

  • page # of #### text fix
  • deal with move/merge/split actions
  • prettier CSS for the cancel reply link
  • BuddyPress compat as needed

#15 @johnjamesjacoby
6 years ago

Patch is good, and works well. Another thing is TinyMCE does't work when it switches DOM positions, so we'll want to disable it when using hierarchical replies.

#16 @johnjamesjacoby
6 years ago

I'll work on cleaning up the UI.

One thing I'd like to see for a v2 patch, is changing the settings around:

  • Remove the checkbox on/off for whether hierarchical is enabled or not.
  • Set the default to 1, and 0 or 1 will essentially turn it off. 2 through 10 will enable it.
  • Reason being, it cuts down on us having another setting.

Otherwise, this still looks like it works pretty well. I want to take a better look at the meta and what happens to the queries when you flatten them for post_parent VS _bbp_topic_id.

@jmdodd
6 years ago

CSS fixes, better handling of actions.

@jmdodd
6 years ago

One setting instead of two for threading.

#17 @johnjamesjacoby
6 years ago

Attached patch:

  • Moves "Reply To" link into the admin links area.
  • Moves "Cancel reply" link to next to "Submit" button.
  • Tweaks some random logic here and there.
  • Patch also broke the JS, which is fine for now I think.

Some other notes:

  • I think the reply link should always be around, regardless of depth or hierarchical being on or off. This will make it easier to toggle the hierarchy, and immediate inherit the correct reply depth regardless of how many levels are allowed at the time of the posting.
  • We'll need improved logic for determining the order of flattened replies. To duplicate, set the depth to 10. Reply to each reply, going deeper and deeper each time. Now set the depth to 5, and look at the topic. Looks good, right? Put the depth back to 10, and now start replying to replies out of chronological order, just replying anywhere. When you set the depth back to 5, the replies are not chronological, but rather in some other order.
  • The concept of going from hierarchical to flat is a fun one to figure out. Once we get this nailed, we're gravy.

#18 @johnjamesjacoby
6 years ago

  • Milestone changed from 2.3 to 2.4

Punting to 2.4. This is still very much a core worthy feature, but getting 2.3 out on time means testing this more and focusing on the gaps without letting the scope creep out of control.

@jmdodd
6 years ago

Refresh of 2036.4.diff

#19 @netweb
6 years ago

Nice, I will try to test this in the next few days.

#20 @alex-ye
6 years ago

  • Cc nashwan.doaqan@… added

#21 @wdfee
6 years ago

  • Cc info@… added

@jmdodd
6 years ago

#22 @jmdodd
6 years ago

In attachment:2036.6.diff, added move reply functionality, scrapped pagination.

@jmdodd
6 years ago

#23 @jmdodd
6 years ago

In attachment:2036.7.diff, refresh; added back reply.js form movement.

#24 @johnjamesjacoby
6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In 4944:

Hierarchical replies:

  • Introduce setting, option, functions, JS, CSS, and Walker class to support hierarchical replies.
  • Tweak functions where saving the additional reply_to meta data is necessary.
  • Add meta data field in dashboard to show the reply_to ID.
  • There will likely be more tweaking necessary, as we test this further and get more eyes on the code.
  • Fixes #2036.
  • Props jmdodd for this huge effort.
Note: See TracTickets for help on using tickets.