Make WordPress Core

Opened 18 years ago

Closed 17 years ago

#9023 closed enhancement (wontfix)

paged comments should use simple logic

Reported by: hailin Owned by: hailin
Priority: normal Milestone:
Component: General Version:
Severity: normal Keywords:
Cc: Focuses:

Description

When comment_order is set to "desc", I think we can just assume default_comment_page is "newest", this is what most people would expect,
and the existing plugins use this logic: http://stuffwhitepeoplelike.com/2008/06/27/104-girls-with-bangs/

Using both control var increases the complexity and users may not know the difference. I suggest we use use the simple logic instead.

Attachments (2)

9023_improve_paged_comments.diff (9.1 KB ) - added by hailin 18 years ago.
revised patch
9023_minor_change.diff (1.9 KB ) - added by hailin 18 years ago.
minor change

Download all attachments as: .zip

Change History (8)

#1 @hailin
18 years ago

And the current complex logic causes bad issues such as:

http://trac.wordpress.org/ticket/8755

My proposed logic is:

Only use comment_order, which has default value of "asc".
When it is "asc", we assume default_comment_page as "oldest";
when it is "desc", we assume default_comments_page "newest".

This is more natual, less error-prone, and easier to maintain.

@hailin
18 years ago

revised patch

#2 @hailin
18 years ago

  • Owner changed from anonymous to hailin
  • Status newassigned

With this patch, the discussion options page reads:
"Break comments into pages with 5 top level comments per page and display newer/older comments first". It's more clear to the end user.

The new logic is in line with existing widely used paged-threaded-comments plugins, which have been used for many VIP blogs successfully for a long time.

The keyword "reverse-top-level" really means "reverse-order" now, but to keep backward compatibility, I kept it the same.

Carefully tested.

#3 @hailin
18 years ago

  • Milestone 2.82.7.1
  • Type defect (bug)enhancement

#4 @ryan
18 years ago

  • Milestone 2.7.12.8

I've seen a lot of sites that specify asc and newest when using the paged comments plugin, which is a major reason why we included support for both options. That plugin supports asc|desc and newest|oldest|auto.

@hailin
18 years ago

minor change

#5 @hailin
18 years ago

That sounds good.
For WordPress.com VIP blogs,
$paged_comments->default_page = 'auto'; is always set, which is equivalent to
my proposed logic. But I guess in this case, it's ok to vote for functionality completeness.

One minor change: when reverse_top_level is set, we should really also reverse
children. It's just "reverse_order", for both parents and children. Keeping reverse_children around while not utilizing it is confusing.

#6 @ryan
17 years ago

  • Milestone 2.8
  • Resolutionwontfix
  • Status assignedclosed
Note: See TracTickets for help on using tickets.