Commit Graph

987 Commits

Author SHA1 Message Date
Deimos
b729bf1d98 Change "new replies" to "new comments"
With username mentions implemented, calling comment notifications
"replies" isn't very accurate any more.
2018-08-06 13:35:02 -06:00
Celeo
420ea5a15b Add notifications for users being mentioned
This detects mentions of users in comments using the same pattern as the
markdown parsing uses to generate user links. Mentioned users are sent a
notification, and mentions are added/deleted if needed on comment edits.

As part of this, setup was done to generate rabbitmq messages for
comment creation and edits, and the mentions are handled by an async
consumer of these messages.
2018-08-05 23:25:54 -06:00
Deimos
34a933e6d3 Refactor text topic excerpt display into a macro 2018-08-05 15:30:21 -06:00
Ivan Fonseca
35ea0f43b4 Hide topic text excerpt for spoilers 2018-08-05 15:04:01 -06:00
Ivan Fonseca
dba7ace0d4 Highlight special topic tags (nsfw, spoiler) 2018-08-05 15:03:59 -06:00
Deimos
b6c5be0593 Fix excessive margin on <ol> at end of block
The bottom margin on <ol> was causing some weird spacing when it's the
last element inside a block. This is most noticeable on a blockquote
where the background color extends further down than it should.
2018-08-03 17:06:01 -06:00
Deimos
2de03d719e PaginatedResults: use id36s for before/after
This was previously using regular integer IDs, but it should have been
ID36s.
2018-08-03 14:06:34 -06:00
Deimos
7276b15e39 Add paginated topics/comments pages to own profile
This needs some more work still to clean up a few things, but it should
be good enough for now. This allows users to see (only on their own user
page), separate "tabs" for Topics and Comments, and those separate
listings are paginated.
2018-08-03 13:58:32 -06:00
Deimos
f95a504ca4 PaginatedQuery: set a default for _sort_column
Previously, _sort_column wasn't set by default and needed to be set by
the query, but some of the other methods would fail if it hadn't been
set. This just defaults it to use the created_time column as the default
sort, which should always be present on models being queried by this
class (for now, at least).
2018-08-03 00:05:10 -06:00
Deimos
03f5450414 PaginatedResults: add props for before/after IDs
This adds two new properties to PaginatedResults - .next_page_after_id
and .prev_page_before_id. These can be used when creating the links to
the before/after pages, instead of needing to access the right
element/property "manually".

This will be most useful in listings that contain items of multiple
types (such as comments and topics), since we won't necessarily know
which type the first/last elements are.
2018-08-02 23:58:30 -06:00
Josh Holland
147c22d071 Consistently refer to Markdown with a capital 2018-08-01 18:12:12 -06:00
Deimos
268d98e3de Increase edit "grace period" to 5 minutes 2018-08-01 16:59:51 -06:00
Deimos
f3cd4f805e User profile: fix ordering of "initial comments"
When you're posting a new topic and you fill out both the link and text
fields, it posts as a link topic with the text posted as the first
comment. Because this is done in the same database transaction, the link
and comment get exactly the same `created_time` value. Previously, the
comment was being sorted "before" the topic, which was a bit confusing
when viewing a user's profile - it would show the comment as being
posted before the topic it was posted on.

This just reverses the order that the two lists are joined in to fix
this slight oddity.
2018-07-30 23:40:06 -06:00
Ivan Fonseca
3d4b963096 Open in new tabs: Add support for links in text
Adds a new sub-option to the "Open links in new tabs" setting which uses
javascript to find external links in the text of topics, comments, and
messages and sets them to open in new tabs.
2018-07-30 17:18:24 -06:00
Deimos
52db30cdad Remove handling of None in some query methods
The previous setup was a bit unusual and confusing - various functions
that restricted the query somehow were accepting None as an argument and
simply doing nothing if it was passed. This made calling them a little
simpler, but overall didn't make a lot of sense - if you don't want to
apply the restriction, you shouldn't call the function in the first
place.
2018-07-25 19:02:08 -06:00
Deimos
de9c86bc1b Set default period to "all time" inside groups
Currently, the default sort+period combination is "by activity, last 3
days". This works fairly well on the home page, but isn't working well
inside individual groups because there usually aren't many posts made
yet in a specific group in the last 3 days. Because of this, going into
an individual group looks quite empty by default.

This commit changes the default *only* when inside a group to be "by
activity, all time". This will still be overridden if the user has set
up custom defaults.
2018-07-25 16:53:44 -06:00
Deimos
68e2e0ea33 Tests: don't load Redis ReBloom module
This module is only being used by the breached-passwords Redis server,
which is separate. It's not relevant to any of the tests, so there's no
reason to load it.
2018-07-25 16:03:14 -06:00
Deimos
d1fccfd153 Data cleanup script: exclude previously-cleaned
The cleanup of old deleted comments and topics was repeatedly hitting
the same items even though they had already been cleaned up on previous
runs. This just explicitly excludes all the ones that have already had
their user_id info removed, so it will only hit ones that actually need
it.
2018-07-25 13:31:35 -06:00
Shane Moore
b0d2be5eeb Invite page: Move codes below button and sort
The codes weren't in any defined order previously, so this sorts them to
put the newest ones at the top, and also moves the button above.
2018-07-24 19:57:14 -06:00
Ivan Fonseca
6d8b3c2d3a Add user menu sidebar to all user pages
Previously, the user menu sidebar was only available on the "base" user
page, but disappeared if you went into any of the individual pages. This
adds it to all of the pages, including highlighting the current page in
the menu.

Behavior of the "invite count" was changed slightly to save needing to
do an extra query on every page - it now only includes the number of
"un-generated" invite codes, not the number that have already been
generated but are sitting unused.
2018-07-23 18:27:54 -06:00
Deimos
4772891522 CONTRIBUTING.md: Clarify inbound=outbound license 2018-07-22 17:20:40 -06:00
Ivan Fonseca
f19bf61740 Add user settings for opening links in new tabs
Adds two separate user settings. One only affects "external" links (the
actual links for link topics), while the other will also affect links to
comments pages (including text topics).
2018-07-21 18:09:07 -06:00
Deimos
d4d50a801f README: Update copyright statement slightly
Just changes "Tildes" to "Tildes contributors" and adds an email
address, as recommended.
2018-07-20 17:33:24 -06:00
TrashMacNugget
e1dddc203e Add license notice to README 2018-07-20 17:26:23 -06:00
Andrew Shu
053e63291e Fix pluralization of "votes" on own comments 2018-07-20 14:18:57 -07:00
Deimos
71ce2f1cdd Notifications badge: remove box-shadow 2018-07-20 01:04:37 -06:00
Deimos
0493ca64e0 Add notification count badge to sidebar button
When on mobile, it wasn't previously possible to tell whether you had
any notifications/messages or not without opening the sidebar to check.
This adds a small "badge" to the sidebar button when the user has
notifications, showing them how many unread items they have.
2018-07-20 00:52:21 -06:00
Deimos
13a3eff340 Prevent adding a TopicLog entry if tags unchanged
Previously, an entry would be added to the topic log even if someone
didn't actually change the topic's tags at all. This commit fixes that,
as well as moving the the template fragment that renders the list into a
separate file in includes/ that can be used both for the initial render
as well as by intercooler when it updates that section of the page.
2018-07-19 18:50:32 -06:00
Deimos
9347389676 Remove dashed border on topic-voting buttons
This was a bit confusing with the topic icons using a dashed blue border
for "missing icon". Now that the "already used" buttons are far more
distinct, this isn't necessary any more anyway.
2018-07-19 16:39:30 -06:00
Deimos
3ce6d451a0 Move .btn-used changes into .topic-voting
These were inadvertently also affecting the buttons on the /groups page,
so this moves them to specifically apply only to the topic voting
button.
2018-07-19 16:37:46 -06:00
Bauke
d5a6e6cb3a Change btn-used default and hovered colors for clarity 2018-07-19 15:56:07 -06:00
Bauke
991a458900 Remove margin-right from last tab-item anchor 2018-07-19 15:55:03 -06:00
Bauke
23880b7ca2 Add comment:target border-left to indicate linked comment from URL 2018-07-19 15:54:58 -06:00
Deimos
9e265a57d4 Add explanatory comment to details box-sizing fix 2018-07-18 18:26:21 -06:00
Bauke
42e969875b Add explicit box-sizing: border-box to details 2018-07-18 18:25:08 -06:00
Deimos
ed57004950 Footer: add links to source code, issues, roadmap 2018-07-18 18:05:08 -06:00
Deimos
e980ab3bda Initial open-source release 2018-07-17 13:39:29 -06:00