Commit graph

1222 commits

Author SHA1 Message Date
Ben Rog-Wilhelm
9939a382a3 Adjust starting color for colored comment bars 2022-09-26 03:32:51 -05:00
Julian Rota
563f3df7c5 Refactor reasons into a shared template 2022-09-26 03:07:48 -05:00
Julian Rota
0e5bf61d73 Add reasons to report screens 2022-09-26 03:07:48 -05:00
Ben Rog-Wilhelm
8cd6548620 Change bar coloring period to 8 and adjust colors. 2022-09-26 03:06:57 -05:00
Michael House
0bfbf17e45 Implemented collapse bar colorization on the server side 2022-09-23 22:11:55 -05:00
Ben Rog-Wilhelm
74cfce4c2e
Update visual theme to be cleaner and less cluttered. 2022-09-11 19:12:23 -05:00
TLSM
72b46a6888 Implement client-side collapsed comment memory.
Fixes #290. h/t Suspicious Turtle for initial implementation.
2022-09-09 19:47:26 -05:00
TLSM
48d5e92a25 Densify comment whitespace (low-hanging fruit).
Pending a more thorough comments rework, make comment listings denser:
  - Reduce margin between comments from 28px to 3.5px.
  - Reduce padding around comment text from 10px to 5px.
  - Shrink comment-actions text size by 20% to maintain visual balance.
  - Add some padding to frontpage list entries, because the size of
    voting arrows was holding the size up. Should be about the same
    as before action icons were shrinked.

Also wound up semi-unrelated fixing the comment nesting border-left
colors on TheMotte mobile, coffee, win98, dramblr, and midnight.
All changes tested most thoroughly on those themes.
2022-09-08 05:09:41 -05:00
iro84657
2767d556ca Clean up handling of "view more comments" button 2022-09-07 17:30:18 -05:00
Ben Rog-Wilhelm
20fa9ce79f Move a bunch of moderation tools to admin level 2 2022-09-06 18:51:24 -05:00
TLSM
70c8a942b6 Remove games.
Unfortunately not totally dead code paths, and special case behavior
for them complicated commenting and sorting logic in a number of
places.
2022-09-05 23:44:18 -05:00
TLSM
3e8904757a Remove coins from popovers, disable coin routes.
The last places coins were visible to non-admins were in user popovers
and, potentially, via direct access of /@<username>/coins. These have
been removed.

Additionally, there are a number of routes which, despite being removed
from the UI, were still operative and usable. These are disabled
pending possible(?) future uses of coins.
2022-09-05 23:44:18 -05:00
TLSM
e12b0eea1a Remove treasure rewards for comments.
Given that coins are not visible in many contexts, the conspicuous
appearance of treasure chests (random coin rewards on 1% of comments)
seems out of place. This removes the logic which rewards treasure,
the visible display of treasure, and drops the column containing
treasure information which has already been awarded to at least one
comment on prod.
2022-09-04 19:12:30 -05:00
TLSM
a35697e55e
Replace nearly all ?v= cachebusts with assetcache.
Using the new assetcache module, we replace (almost) all instances
of `?v=` cachebusting query parameters in Python and in Jinja templates.
The primary exceptions were: user site backgrounds, and some
infrequently changed graphics referenced literally from .js files.
2022-08-30 17:02:46 -04:00
Ben Rog-Wilhelm
210d4d3bc1 Bump cachebusters 2022-08-22 22:14:21 -05:00
Ben Rog-Wilhelm
280e7275a6 Rejigger theme pretty heavily. I apologize for this change not being neatly split apart in any way. 2022-08-22 22:02:39 -05:00
Julian Rota
f2d657811f Fix the other report button for posts on the comments page 2022-08-19 03:18:35 -05:00
painejohn
defe23ea16
Update comment reply css + clear preview as well (#158)
This basically extends the CSS changes from
https://github.com/themotte/rDrama/pull/150 to also cover comment
_replies_ and then updates the JS from
https://github.com/themotte/rDrama/pull/153 to also reset the comment
reply preview div back to default after posting the comment reply.
2022-08-10 06:04:54 -05:00
painejohn
cbcc2aac6f
139: Disabled multimedia embedding
This change disables multimedia embedding:

- In comments and comments replies.
- In new submissions.
- In comment & submission preview

And it's all toggle-able via an envvar, except for the JS bits,
but I linked those to the github issue, so should be easy to find
in the future.

The way it works is:

- removes markdown image/video syntax,
  eg. `![](https://example.org/someimage.jpg)` into ``
- changes link text into anchors, eg.
  `https://example.org/someimage.jpg` into
  `[https://example.org/someimage.jpg](https://example.org/someimage.jpg)`
- removes html img/video/audio tags, eg.
  `<img href="https://example.org/someimage.jpg" />` into ``
- when embedding gifs via the giphy modal in "new submission", it will
  insert only an anchor to the gif
- when attaching an image, it will upload the image, then add only an
  anchor to the post/comment body

I tested this manually, but not sure if I got all the test cases. What I
checked was:

- create comment w/ image/video/audio media using markdown -> success
- create comment reply w/ image/video/audio media using markdown ->
  success
- create comment w/ link to img/imgur/youtube/audio -> success
- create comment w/ attachment -> success
- create comment reply w/ attachment -> success
- create comment w/ img/video tag -> success
- create comment reply w/ image/video tag -> success
- create post submission w/ image/video/media using markdown -> success
- create post submission w/ link to img/imgur/youtube/audio -> success
- create post submission w/ attachment -> success
- create post submission w/ giphy gif -> success

Also, updated the formatting page.

Co-authored-by: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
2022-08-07 01:30:47 -05:00
painejohn
8463a9ebbe
135 - Posting a comment clears out comment textarea & preview 2022-08-07 01:17:46 -05:00
Ben Rog-Wilhelm
800ae8d2dc Split SITE_NAME into computer-readable SITE_ID and human-readable SITE_TITLE. 2022-07-31 18:53:18 -05:00
Julian Rota
96563c6d35 Add check for user existing 2022-07-31 16:58:01 -05:00
JulianRota
f495981a5e
Merge pull request #122 from zorbathut/pr_fixvote
Fix voting.
2022-07-26 23:19:33 -04:00
JulianRota
7c86c88c68
Merge pull request #121 from zorbathut/pr_hidevotes
Hide vote details from non-admins.
2022-07-26 23:16:08 -04:00
Ben Rog-Wilhelm
e28a486da9 Update annoying magic numbers. 2022-07-24 05:52:31 -05:00
Ben Rog-Wilhelm
19e9c1a20e Hide vote details from non-admins.
It is intentional that the links show up on admin level 2 but aren't usable until admin level 3; I don't know what I want right now and I want to encourage admins to pester me about it.
2022-07-23 03:04:43 -05:00
Julian Rota
bd5fd8fb21 Switch over comment reporting to use the new system 2022-07-09 06:33:41 -05:00
Julian Rota
a0488f2b23 UI to allow update of comment filter status 2022-07-09 06:33:41 -05:00
Julian Rota
f736d660b6 Filter on other pages as well 2022-07-09 06:33:41 -05:00
Julian Rota
ba9689f017 Working on hiding filtered comments 2022-07-09 06:33:41 -05:00
Julian Rota
ccc4dd485f Fix comment voting 2022-07-09 06:33:41 -05:00
Michael House
db185a9ef2
Fixed reply-twice bug on submission page. 2022-06-29 00:25:11 -05:00
Michael House
03aa2ca48e Added spoiler extension to the marked.js markdown preview 2022-06-05 15:56:11 -05:00
Michael House
bce836bf81 First stab at resolving html entities not being rendered 2022-06-05 10:37:09 -05:00
Michael House
f3f2aa3935 Made a lot of small changes in the frontend 2022-06-04 07:48:26 -05:00
Michael House
058e50add7 Added new default text and default link thumbnails, color fixes for some buttons 2022-06-03 06:36:03 -05:00
Michael House
82a18e5cad Up-merged and resolved conflicts in routes/login.p and routes/votes.py 2022-05-22 08:23:59 -05:00
FatherInire
fcba426009
Remove some gimmicky r/drama features.
Co-authored-by: Inire <>
2022-05-21 21:43:00 -05:00
Michael House
f3a479f991 Removed emoji feature from templates and deleted emoji images 2022-05-18 20:53:28 -05:00
faul_sname
e1a1277268 [#80] Split marked.js into vendor part and custom part 2022-05-17 19:00:23 -05:00
Michael House
19903cccb5
Adding usernotes. 2022-05-16 11:53:24 -05:00
Ben Rog-Wilhelm
8f973ff9c9
Add open-in-tab support for userpages.
Originally written by @faul-sname
2022-05-15 14:20:53 -05:00
Julian Rota
10d8cf037d Remove all references to Marseybux, coins, and awards from UI only 2022-05-10 23:49:45 -04:00
iro84657
b7da8b575a Add trailing LF to text files 2022-05-10 21:05:51 -04:00
Ben Rog-Wilhelm
1ee9c1bfa7
Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
iro84657
193ff08a3d Remove special cases based on request.host 2022-05-09 01:40:09 -04:00
Michael House
e9d6bb151e Removing reliance on rDrama assets 2022-05-03 22:10:41 -05:00
TLSM
bdda95a582
Partially revert self-upvote UI bug fix. (#239)
Turns out the snippet in templates/comments.html was necessary to
get proper behavior in notifications.

Might come back to debug this later, but people use notifications more
than they deal with edge case self-upvotes, so reverting for now.

The changes to prevent coin fuckery with self-upvoting appear to work
correctly in the wild, so leaving those in place.
2022-05-02 21:42:28 +02: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
709a7fc4b5 sfd 2022-05-01 23:44:38 +02:00