[wp-meta] [Making WordPress.org] #1649: User Contributed Notes voting UX can be improved for DevHub

Making WordPress.org noreply at wordpress.org
Wed Jun 1 15:56:38 UTC 2016


#1649: User Contributed Notes voting UX can be improved for DevHub
---------------------------+------------------
 Reporter:  DrewAPicture   |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:
Component:  Developer Hub  |  Resolution:
 Keywords:  ux-feedback    |
---------------------------+------------------

Comment (by DrewAPicture):

 Replying to [comment:4 keesiemeijer]:
 > I think we should only allow logged in users to vote to get the best
 results. Prompting a user to log in should resolve that.
 >
 > The upvotes and downvotes are stored as an array in comment meta. This
 means we can't use them to order the comments. Before we can order the
 comments we must store the total score for a comment in `comment_karma` or
 as comment meta when a vote is submitted. This means we need to update all
 old comments with the total score also (plugin?).

 I'm not sure we actually ''need'' to store the vote score to sort it. In
 fact, we're currently using `wp_list_comments()` with a callback which
 skips basically 90% of what `wp_list_comments()` is used for for regular
 post comments.

 The upsides of how Notes are currently ''intended'' to be implemented are:

 1) We don't need to worry about nesting notes because while it's
 technically supported for display when replying from the admin, there's no
 UI for replying to notes: thus, 1 level of notes.

 2) As far as I know, there's no plans to paginate notes, so we can simply
 list them all out at once.

 3) We could probably skip `wp_list_comments()` altogether and query for
 and sort them ourselves. Having played around with it a little bit,
 sorting by vote score could easily happen in a `usort()` callback,
 calculate the score and sort for each then output the list with our
 existing callback.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/1649#comment:5>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list