Pamasich / kbin-kes

Add-on manager and scripting framework for kbin
MIT License
0 stars 0 forks source link

Fix comment depth #70

Open Pamasich opened 6 months ago

Pamasich commented 6 months ago

Comments only get properly threaded until level 10. Any reply to a level 10 depth comment is treated as a reply to the same level 9 depth comment.

Like, in the following example:

comment1
   comment2
      comment3
         comment4
            comment5
               comment6
                  comment7
                     comment8
                        comment9
                           comment10
                           comment11
                           comment12

In this example, comment11 is a direct reply to comment10, but displayed as if it were a reply to comment9. Also, comment11 is a reply to comment10 and has the same issue happening to it.

The HTML contains which is the correct parent comment. The data attribute data-subject-parent-value contains the parent's id, which matches the id attribute which comes in the format: entry-comment-{id}. So this should be relatively easy to identify.

The issue exists in base kbin, not just the collapsible comments addon. So a general fix should be developed first, and maybe that fixes the problem in collapsible comments too.

The comment depth is defined with the class comment-level--{depth}, which seems to not go higher than 10. It might be worth adding more levels manually, maybe dynamically so. Alternatively, provide some other means of indicating relationships between the comments. Maybe go with Reddit's or 4chan's solution. The former only displays up to a specific depth, but then lets you switch to a page that treats the deepest visible comment as level 1 and thus has more levels to display deeper nested replies. The latter adds the ids of comments to both the parent and child, allowing to jump between. Maybe highlight the parent when hovering over a child?

Either way, I think this should be fixed for clarity. It's hard to follow deeply nested conversations when they're all on the same depth.

Here's a thread where this issue occurs. The same happens on mbin too.

aclist commented 5 months ago

I noticed that in very deeply nested comment trees, mod recursion isn't applying correctly, or maybe those nested comments have different elements to target. For example, when Hide Reduces or Hide Favorites are enabled, but you reply deep in a comment chain, the vote buttons still appear on the newly generated comment, as though those mods aren't propagating.