Opened 6 months ago

Last modified 4 weeks ago

#2036 new enhancement

Hierarchical replies

Reported by: jmdodd Owned by: jmdodd
Priority: normal Milestone: 2.4
Component: Replies Version: 2.1
Severity: normal 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 (6)

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

Download all attachments as: .zip

Change History (28)

  • Cc jmdodd@… added

plugin territory I think.

  • Cc alexvornoffice@… added

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

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

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.

  • Cc stephen@… added
  • 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.

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.

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

  • Cc wordpress@… added
  • Owner set to jmdodd

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

jmdodd5 months ago

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

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

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.

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.

jmdodd4 months ago

CSS fixes, better handling of actions.

jmdodd4 months ago

One setting instead of two for threading.

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

jmdodd2 months ago

Refresh of 2036.4.diff

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

  • Cc nashwan.doaqan@… added
  • Cc info@… added

jmdodd4 weeks ago

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

Note: See TracTickets for help on using tickets.