Commit graph

65 commits

Author SHA1 Message Date
TLSM
6fde14a92c Use reddit-style notifs without context
The notifications schema is already set up for reddit-style
chronological notifications. We simply have to remove the logic that
builds the context and patch up a few places in the frontend that
were expecting full reply trees.

`Comment.header_msg` previously expected the user's own comment to
be top-level in comment replies. Logic is revised to expect the actual
reply.

`files.routes.front.notifications_main` now has reduced query volume
because we aren't expiring the session when marking notifications read.
This also allows us to remove the unused `comms` variable, which is a
makeshift "pattern" of storing duplicate database replies across a
commit so the templates don't requery (thus losing data attached to
the runtime object, like `c.unread` / `c.notif_utc`).

We move the `is_notification_page` flag to the route callers rather
than templates checking `request.path`.

Minor UI style: "Clear all notifications" -> "Mark All Read", since
this was a persistent point of user confusion upstream, with people
expecting their inbox to empty out. Also less margin between notifs
to be consistent with tighter comment display elsewhere and removed
need to separate groups of comments vs single comments.
2023-07-12 00:24:50 -05:00
TLSM
695e6b6dbd Split notification routes, hard wrap, sort order
Change the notifications subpages to be distinct route handlers with
actual paths rather than query parameters. They already were a massive
conditional chain with almost no common logic.

Hard wrap some of the more egregious query lines. Use less duplicated
code for shadowban exclusion.

Only major functionality change which is somewhat related to #476 is
to sort subtrees by Comment.id DESC. Otherwise, upstream is
substantially the same as TheMotte. Given that upstream didn't
experience #476, I think the issue may have been resolved by prior
changes to filtering / comment visibility & moderation.
2023-07-12 00:24:50 -05:00
TLSM
edafe22024 Remove unused reddit mentions notifications
In the distant past, the codebase would check pushshift for keyword
mentions and generate notifications to admins about them. I can't
find where we removed it, but I don't think it was ever operative.

Since these notifications don't get generated, we don't need a
notifications page for them.
2023-07-12 00:24:50 -05:00
justcool393
688cd91e83 perms: consistently use >= for admin levels
places that use the PERMS constant do it and this way makes it clearer
what admin level is required to perform an action.
2023-04-06 07:36:19 -06:00
Michael House
2e7f34608c Replaced pseudo-input field on frontpage with a button for creating a post 2022-06-05 16:44:56 -05: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
Aevann1
73ece47aba dfs 2022-04-24 23:19:01 +02:00
Aevann1
6f2e547b73 fds 2022-04-10 20:05:46 +02:00
Aevann1
0bf2190404 fsd 2022-04-06 23:53:14 +02:00
Aevann1
e928afef9b dfs 2022-04-04 22:19:39 +02:00
Aevann1
267ebb9aeb sfd 2022-04-03 20:08:59 +02:00
Aevann1
728cd3bd10 fh 2022-04-03 20:04:30 +02:00
Aevann1
fab9e4a036 sfd 2022-04-03 20:04:01 +02:00
Aevann1
a8a70671b7 sfd 2022-04-03 20:03:19 +02:00
Aevann1
3a592df14b fsd 2022-04-03 19:37:20 +02:00
Aevann1
292402ad3b gdf 2022-03-28 19:40:10 +02:00
Aevann1
e410bc879c big big chungus big chungus big chungus 2022-02-13 03:08:12 +02:00
Aevann1
cffc44bc9f big chungus commit 2022-02-12 01:32:14 +02:00
Aevann1
587e945d6e vcx 2022-01-28 22:55:59 +02:00
Aevann1
5a012ea3e8 vcx 2022-01-28 08:55:05 +02:00
Aevann1
44883cf757 fds 2022-01-28 08:52:39 +02:00
Aevann1
c0af25c916 sf 2022-01-28 08:51:23 +02:00
Aevann1
b54ec11009 fds 2022-01-28 08:48:59 +02:00
Aevann1
bd339a8caa xvc 2022-01-28 08:39:15 +02:00
Aevann1
1ebf61cc33 xvc 2022-01-28 08:39:03 +02:00
Aevann1
135d7454fc vcx 2022-01-28 08:37:57 +02:00
Aevann1
35d071590c 100000000k 2022-01-19 08:20:05 +02:00
Aevann1
4905409280 bb 2022-01-11 19:42:56 +02:00
Aevann1
262c212dfa bb 2022-01-11 19:38:26 +02:00
Aevann1
128d6324a2 bb 2022-01-11 19:38:07 +02:00
Aevann1
9f989e912e dfs 2021-12-30 07:27:22 +02:00
Aevann1
2ad04b7a1c fds 2021-12-29 18:01:01 +02:00
Aevann1
e74e4a9c82 fds 2021-12-29 17:58:41 +02:00
Aevann1
b172cf8350 fdsfsd 2021-12-21 01:51:04 +02:00
Aevann1
88d574e166 fsdfds 2021-12-21 01:50:02 +02:00
Aevann1
ab660900c5 i pray 2021-12-15 00:48:37 +02:00
kek7198
aa0c9e4c7d fix 2021-12-06 22:39:53 -06:00
kek7198
58753dadd8 fix 2021-12-06 13:24:50 -06:00
kek7198
808f4e9d61 fix 2021-12-04 13:13:12 -06:00
kek7198
52414e000c fix 2021-12-02 21:49:54 -06:00
kek7198
2de0214e5a fix 2021-12-02 21:48:36 -06:00
kek7198
078291001c fix 2021-12-01 21:32:20 -06:00
kek7198
a74599eb06 fix 2021-12-01 14:35:27 -06:00
kek7198
928ebfbe77 fix 2021-11-29 01:10:41 -06:00
kek7198
88f14f747d fix 2021-11-28 11:28:12 -06:00
kek7198
c77ac65ea8 fix 2021-11-25 11:35:22 -06:00
kek7198
b64fecf091 fix 2021-11-24 10:53:40 -06:00
Aevann1
0f1cd9dc64 sfdfsd 2021-11-16 00:19:59 +02:00
Aevann1
ef0b875ebd gffg 2021-11-16 00:13:29 +02:00