Required a minor change to how mypy is handling enums now. I'm not a big
fan of the result and think it's somewhat incorrect, but the type
annotations in that file are a disaster anyway.
There's no need to show the domain separately on the comments page since
it's being displayed in the link itself just above. This also adds
handling for when there's no info to show, so we won't get the header
and an empty list in those cases.
Very basic version - should probably exclude some of the fields (like
domain) and do some other changes in addition to this, but it's a
reasonable start.
There's still someone trying to use the Tildes donation page to check
stolen credit cards occasionally. The new version of Checkout seems to
be blocking them all successfully, but I might as well not make it easy
on them.
This moves some of the site-specific logic that was previously embedded
in Topic for YouTube and Twitter links into a more general class named
SiteInfo. This should be expanded more in the future, but will help for
defining site names, ways of displaying their content creators, ability
to define a content type on a per-site basis, and so on.
Fixes some minor formatting issues that can come up with code blocks,
since they were previously being treated as inline-block. For example,
this caused list items containing a code block to have a mis-positioned
list item marker.
This makes it so that posts (both topics and comments) can no longer be
voted on after they're over 30 days old. An hourly cronjob makes this
"official" by updating a flag on the post indicating that voting is
closed. The daily clean_private_data script then deletes all individual
vote records for posts with closed voting, and the triggers on the
voting tables have been updated to not decrement the vote totals when
these deletions happen.
The net result of this is that Tildes only stores users' votes for a
maximum of 30 days, removing a lot of sensitive/private data that builds
up over the long term.
Creates an effect of some "extra bar" (in the same color as Exemplary
labels) expanding on the right end of the donation goal meter when it's
above 100%.
On small screens, when the bottom row with a topic's comments, source,
and age starts wrapping, there was some weird behavior. This improves it
so that:
* The number(s) for comments won't wrap separately
* If the row gets taller due to wrapping, text will align to the bottom
The way I was doing this before had the colon as part of the metadata,
which meant that it could wrap onto the next line in thin windows,
giving a result like:
Article
: 1500 words
This changes it so that it's added with CSS after the content type when
needed, so it won't wrap separately.
Previously, the content metadata displayed next to a topic's content
type (like "Article: 1800 words") was fairly generic and could result in
strange data being displayed if a scraper fetched it for an
inappropriate type (for example, displaying word count for videos).
This creates an enum to hold all the different content metadata fields,
and moves some logic into that class to handle deciding which fields to
show for different types, and the formatting logic for values.
Previously, the warning would only ever say "over a week old", even when
the topic/comment was much older than that. This adds a new function to
create a vague timedelta description for longer periods, and also
enables the Javascript to use it as well through adding the description
as a data attr on the reply button when a warning is needed, instead of
duplicating the logic in JS.
This is just a small reduction to help compensate for having the list
pushed down by the donation goal. This list isn't intended to stay here
forever anyway.
This uses the data in the financials table to generate a donation goal
meter at the top of the home page's sidebar. It uses the new-ish HTML
<meter> element, which will automatically change colors as it hits
different thresholds.
This enables (manually, so far) setting "important tags" for individual
groups. Topics in the group with any of these tags will have them shown
in listings next to the group name (similar to how spoiler and nsfw work
globally).
This didn't get updated when boussole was split out to its own
virtualenv, and was still being linked to the pip installs from the
application succeeding.
Previously, the virtualenvs were owned by root and the pip installs were
done as root as well. This worked fine, but it meant that I can't use
pip-tools' pip-sync function without sudo. This makes it simpler by
giving ownership to the app user (tildes in prod, vagrant in dev).