37

I don't care, and I can only imagine it's very much [status-bydesign] to preserve some real estate (though larger numbers use a smaller font anyhow). Still, just in case it matters, especially for downvotes:

When the number of up or down votes exceeds 99, then the leading plus or minus sign is not shown in the vote split:

+99 up / -3 down     100 up / -1 down     1147 up / 107 down

The sign is also "missing" in the Ajax response. For the above images, the JSON results:

{"up":"+99","down":"-3"}

versus:

{"up":"100","down":"-1"}

and:

{"up":"1147","down":"107"}

If the JavaScript code ever relies on the minus sign (like it once seemed to do) then in theory this might be an issue.

6

2 Answers 2

18

Jeff Atwood's answer does not jibe with the data...

  1. The UI must already deal with 5-digit numbers, WITH a plus sign:
    Largest vote count so far


  2. This means the UI could easily handle a 5-digit downvote number, WITH a minus sign.
    Mockup (with page viewed at 200%):
    What the UI should be


  3. But, in fact, there are no posts with more than 400 downvotesSee meta for the worst. So, we are orders of magnitude away from what the UI must already handle.
1
-2

This is by design so the numbers fit more easily in the available space.

8
  • 16
    So why not make the JSON feed without the sign? That's one thing I absolutely hate about all JSON feeds on Stack Overflow... They depend too much on the VIEW, when in fact they should be DATA (model)... Especially the Flair JSON. Commented Apr 5, 2010 at 2:52
  • @andrew how so? +7 is a number just like -3. Commented Apr 27, 2010 at 1:22
  • 15
    +7 is a string... 7 is an integer. And if the + disappears when it is too long to display, then you are passing VIEW instead of DATA. Commented Apr 29, 2010 at 16:04
  • 7
    So if "down":"-3" is a downvote, couldn't "down":"107" be mistaken for an upvote?
    – coredump
    Commented Jun 25, 2016 at 10:27
  • 1
    @coredump The key already tells you it is a "down"-vote, there is no mistaking unless you take it out of context. And you could just use value.up - Math.abs(value.down) to compute the net vote. (And I think the JSON should return numbers instead of strings, and don't include any sign at all).
    – kennytm
    Commented Jun 26, 2016 at 9:27
  • 6
    @kennytm I agree, but that's ugly. Bugs thrive with things like this.
    – coredump
    Commented Jun 26, 2016 at 9:31
  • +7 and 7 are two representations of the number known in the English language as "seven"
    – Pac0
    Commented Mar 20, 2018 at 8:14
  • 6
    @Pac0: But -7 and 7 are not two representations of the number known in the English language as "minus seven". Commented Mar 20, 2018 at 20:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .