Commit graph

110 commits

Author SHA1 Message Date
Ben Rog-Wilhelm
1ee9c1bfa7
Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
TLSM
344df24148
Fix comment self-upvote removal UI bug. (#236)
Fixes minor UI bug when removing self-upvote on a comment. Previous
behavior, starting from a new comment:
    - Initial state: score 1 from self-upvote, upvote button shows
      highlighted as `color: var(--primary)`.
    - Click on upvote button to remove self-upvote → button
      unhighlights, score displays as 0.
    - [reload page]
    - Score displays as 0, but button is highlighted.
    - Click on upvote button → button unhighlights, score displays
      as -1. [If you reload the page now, state is score 0 &
      highlighted; no change in serverside votes.]
    - Click on upvote again → button highlights, score displays as 0.
    - [reload page]
    - Score displays as 1, button is highlighted.
Direct cause is `templates/comments.html @ L115-117`. I checked
`api_comment`, though, and it adds a vote on new comments, and that
state change propagates to the template's parameters before it renders,
so I believe the only time this triggers is specifically when a user
has removed their self-upvote. Bug is fixed when testing with L115-117
removed. Is there some other edge case it was meant to solve?

Secondary bugfix: Removing a self-upvote _costs_ you a coin & a
truescore point. I think this is one of the few ways to get negative
dramacoin. I chose to fix it by having self-votes and self-unvotes not
change coins/truecoins. The alternative of having new comments & posts
give the user +1 coin/truecoin would modify site behavior, and you'd
retroactively owe some powerusers thousands of DC & truescore.
2022-05-02 20:12:28 +02:00
Aevann1
0a14f96fbf fsd 2022-04-20 21:25:19 +02:00
Aevann1
c50cb5ca30 fsd 2022-03-31 16:25:49 +02:00
Aevann1
8f877e6aff fg 2022-03-29 21:34:35 +02:00
Aevann1
5c9d531900 fds 2022-03-21 02:40:15 +02:00
Aevann1
e883b0f76a g.db.commit() 2022-03-19 14:52:36 +02:00
Aevann1
200c2461b8 right 2022-03-09 03:44:53 +02:00
Aevann1
fde6526a56 fds' 2022-02-23 07:17:03 +02:00
Aevann1
f90db38c08 gf 2022-02-16 03:42:11 +02:00
Aevann1
dd39711709 g 2022-02-16 03:16:01 +02:00
Aevann1
7d223d9b87 fds 2022-02-07 14:46:28 +02:00
Aevann1
2464775210 cxv 2022-02-07 14:38:45 +02:00
Aevann1
8ef929002d xv 2022-02-07 13:39:26 +02:00
Aevann1
b3a9da6103 fds\ 2022-02-05 13:31:05 +02:00
Aevann1
53b1a2f862 sd 2022-02-04 10:59:12 +02:00
Aevann1
c2beea12ef vxc 2022-02-03 08:39:02 +02:00
Aevann1
b4dc4e1679 cxzxzc 2022-01-22 12:14:15 +02:00
Aevann1
ccd66d721a cxvxcv 2022-01-21 22:56:56 +02:00
Aevann1
694dfca0a4 fds 2022-01-19 11:07:16 +02:00
Aevann1
dc85175931 vcxcxv 2022-01-17 23:36:04 +02:00
Aevann1
1d83c1f63f fff 2022-01-17 15:15:01 +02:00
Aevann1
b85cf076f1 f 2022-01-17 15:09:11 +02:00
Aevann1
933831c422 testing 2022-01-15 08:31:17 +02:00
Aevann1
24245d95cc b 2022-01-14 14:04:34 +02:00
Aevann1
fbe6c3dd26 g 2022-01-14 01:29:15 +02:00
Aevann1
609bbfafc6 closing2 2022-01-11 23:54:41 +02:00
Aevann1
1bea9edf79 under attack 2022-01-09 17:15:02 +02:00
Aevann1
6b7e06f461 big one 2022-01-06 18:46:09 +02:00
Aevann1
d456aaa0c7 fsd 2022-01-02 02:06:46 +02:00
Aevann1
a0c4a66d59 big update 2022-01-01 01:45:27 +02:00
Aevann1
b18fa7be39 fsd 2021-12-27 03:08:06 +02:00
Aevann1
1a43b0dedc pins logic rework 2021-12-26 03:03:21 +02:00
Aevann1
bdf46e024e fds 2021-12-24 05:59:07 +02:00
Aevann1
6f28956493 fdsfsd 2021-12-23 17:37:12 +02:00
Aevann1
ea91371c04 fdssfd 2021-12-20 22:03:59 +02:00
Aevann1
d29014a3a6 fsfs 2021-12-20 02:27:25 +02:00
Aevann1
cb87196eee sfdsdf 2021-12-19 15:01:28 +02:00
Aevann1
9a8eed5e04 fdsfsd 2021-12-16 20:12:26 +02:00
Aevann1
ad37347ec1 fdsfsd 2021-12-14 00:23:33 +02:00
Aevann1
9fca111775 fsddsf 2021-12-13 22:17:39 +02:00
Aevann1
d571a22c00 sfdsdf 2021-12-12 19:37:20 +02:00
Aevann1
6f87871c63 fdsfds 2021-12-12 19:06:48 +02:00
Aevann1
449c18dcf5 fdsfds 2021-12-11 04:32:58 +02:00
Aevann1
950212e17e dfsfds 2021-12-11 04:32:21 +02:00
Aevann1
79d18747c1 dfsfsd 2021-12-11 04:27:46 +02:00
Aevann1
7b2ae3d89f fdsfds 2021-12-10 19:31:32 +02:00
Aevann1
3aae15d985 sfdsfd 2021-12-09 23:21:52 +02:00
Aevann1
ff2f5275f8 fdfd 2021-12-03 21:05:54 +02:00
Aevann1
567f8592df sfdfsd 2021-12-01 20:48:04 +02:00