Comment Section

General suggestions or questions about the SparkFun Electronics website

Moderators: phalanx, CS Paul

Post Reply
techtony
Posts: 11
Joined: Mon Mar 03, 2014 9:46 pm

Comment Section

Post by techtony » Wed Mar 12, 2014 8:26 pm

I have been using the SF site for about a month now. One thing that is extremely frustrating is the comment ordering. Not oldest to newest or newest to oldest, it doesnt seem to have an order at all. I see a comment posted 2 years ago, but a reply from 3 years ago, how this is possible I am not sure. Then you have comments from 6 months ago above a 1 year old post, but three posts later you see 1 from 3 days ago.

For the most part the site is awesome, but honestly the comment system is lacking usability. I read about the starred comments getting preference, but web users are not used to a jumbled filter like this, they are used to seeing numbers of thumbs up or down or number of helpful stars, not comments shown out of (or lack of) order.

Maybe a hightlighted comment that has the highest number of star ratings, but still in order, ordered from newest to oldest.

motopic
Posts: 272
Joined: Thu Jun 15, 2006 11:33 am

Re: Comment Section

Post by motopic » Thu Mar 13, 2014 5:54 am

wut?

top line, see "View New Posts"

Your Rant Score: 0/10

techtony
Posts: 11
Joined: Mon Mar 03, 2014 9:46 pm

Re: Comment Section

Post by techtony » Thu Mar 13, 2014 7:03 am

I do not see anything in the comment section of the main site that says "View New Posts". Show me a screen shot.

* EDIT * I see you were thinking for some weird reason I was referring to the forums.... I am talking about the site. So your rant about rant rating - 0/10

User avatar
Ross Robotics
Support Volunteer
Posts: 2007
Joined: Thu Jun 07, 2012 9:33 pm
Contact:

Re: Comment Section

Post by Ross Robotics » Thu Mar 13, 2014 9:02 am

https://forum.sparkfun.com/viewtopic.php?f=15&t=35854

I have brought up this point before. As far as I can see, nothing has been changed. Just going to have to get used to things being out of order on the site..
------------------------------------------------------------------------------------------------------------------------------------------------------------
//codlink
Available for circuit and PCB design, just PM me!

languer
Posts: 96
Joined: Fri Apr 09, 2010 12:48 pm
Location: Arizona

Re: Comment Section

Post by languer » Thu Mar 13, 2014 9:07 am

I agree this is super confusing. But I think it is built into the software SFE is using. It does beg the question, what the heck was the person who wrote that section was thinking (or smoking) - maybe too many mushrooms.

techtony
Posts: 11
Joined: Mon Mar 03, 2014 9:46 pm

Re: Comment Section

Post by techtony » Thu Mar 13, 2014 12:36 pm

I used to build websites for a living. The scripts basically grab the comments out of the database and display them in html. The SQL Query can be modified to sort the results set as they see fit. I am betting the problem lies in priority. What is higher on their list. I understand that they are juggling a lot of projects, but holy cow it is irritating trying to match up responses and figure out who is talking to who.

Brennen@SparkFun
Site Admin
Posts: 35
Joined: Thu Feb 21, 2008 1:04 pm
Location: Boulder, CO

Re: Comment Section

Post by Brennen@SparkFun » Thu Mar 13, 2014 10:56 pm

It does beg the question, what the heck was the person who wrote that section was thinking (or smoking) - maybe too many mushrooms.
Hi there.

If anyone's looking to discuss whether mushrooms are generally smoked, Erowid is thataway. With that out of the way, comments are ordered first by number of stars, then by date descending. The code looks like this:

Code: Select all

      $filter = [
        "entity_table" => "blog_posts",
        "entity_id" => $this->req()->id,
        "visible" => true
      ];

      $sort = [
        "ratings_count" => -1,
        "ctime"         => -1
      ];

      $comments = $mongo->comments->find($filter)->sort($sort);
The theory is that this will bubble interesting (starred) stuff to the top, followed by the newest posts. Since the system is threaded, it should not usually be too confusing what people are responding to, although cross-thread chatter is to some extent inevitable.

Obviously this is all far from perfect. We have plans to feature or pin high-quality comments, expose sorting options, and add e-mail notification features for individual blog posts / products / tutorials / etc., all of which will hopefully help people make more sense of things. If you have other suggestions, we always appreciate feedback. Most "you guys should do this!" messages don't result directly in a change, but they all help inform our sense of what people are looking for.

Edit: As an addendum, there could of course be outright bugs with comment ordering. If you've got a specific place in mind where the order seems really arbitrary, hit me with a link and I'll investigate.

Post Reply