Previously, the autocompleting tag input would only actually submit the
tags that had been converted to "chips". This meant that if the user had
a "leftover" tag that they had typed in but not actually converted to a
chip (by typing a comma or using the autocomplete dropdown), it would be
lost when they submitted the form.
This appends it to the tags before submitting, so that it's not lost.
A user with JS disabled can submit new topics, but the autocomplete
behavior was making it so that their tags were lost, because the "real"
tags input was a hidden one that was only updated by JS.
This starts the original (visible) input out as the tags one, and has
the JS move it over to the hidden one, so it will only happen if they
have JS enabled.
This applies the new stored/updated lists of common tags for each group
to the topic-tagging form, both for new submissions as well as editing
the tags on an existing one.
This sets up a cronjob that will run every hour to select the most
common tags used in a group (up to 100), and store them in a new column
in the groups table. This will be used to populate the list of tags to
use for autocompletion.
eeldam is smarter than me and realized that there's a way easier way to
select the same comments without needing to chain all those :not()s - we
can just select all comments with a single reply that are nested inside
one with a minimum depth.
This commit changes the selector to use that new simplified method, as
well as moving the whole mess into a mixin, which can be re-used when we
want to start applying this at different depths on different screen
sizes.
In topic listings, when a link topic is from YouTube or Twitter, this
will now display more info about the "source" instead of just the
domain. For YouTube, the channel name is displayed, and for Twitter, the
author of the tweet is displayed.
In (very rare) cases where a topic's excerpt is made up of a long string
that doesn't wrap, it could end up pushing the topic voting button to
the right and making it inaccessible. This should fix those cases.
Lately there have been multiple "exemplary fights", where people are
using the Exemplary label to highlight and boost comments that they
especially agree with, even if the comments themselves aren't especially
good.
I think the prominence of the Exemplary badge and the count of how many
Exemplary labels a comment has received are contributing to this. This
was only made visible somewhat recently (9b64d22d), so I'm going to try
removing it again now. There should probably be a page added to Docs
explaining the different "stripe" colors, since the Exemplary stripe is
now unexplained and not obvious.
This was mostly motivated by a hope that this will help with the
mysterious iOS 12 bug that's causing topic listings to behave strangely
when the user tries to tap on the comments link (space gets added and
the link moves down).
The main change here is to add a new .topic-with-excerpt class, and only
add the "content" area to the CSS grid when that class is present,
instead of always adding it and just leaving it empty if the topic has
no excerpt.
In addition, this switches to using grid-gap to space out the rows
instead of margins, and center-aligns the row contents vertically on
mobile, where we want them spaced out a little to help avoid misclicks.
For some reason, when a topic in a listing can't be voted on (either
your own topics or the viewer is logged-out), CSS grid was adding some
space for the "content" area where the excerpt is shown, even when there
is no excerpt.
This switches to using minmax() to allow that row's height to shrink
down to zero, which fixes the spacing.
mypy version 0.700 includes some stubs for the bleach library, but
they're not correct and cause errors when run on the Tildes codebase.
I've left a comment on the typeshed repo here, so hopefully it will be
resolved before long:
https://github.com/python/typeshed/pull/2709#issuecomment-483120729
I'll pin mypy's version to the previous version of 0.670 for now to
avoid this, but if the stubs aren't fixed for a while I may need to do
it differently.
The UPDATE query that marks notifications read due to interaction was
causing a flush, so if the user repeated an interaction (such as trying
to vote again on a comment they had already voted on), the autoflush
would cause an IntegrityError when it tried to re-insert the vote.
This moves the UPDATE into a block with autoflush disabled, and also
just moves the interaction-marking into its own function instead of
having so many duplications of its logic.
A few minor interface improvements for topic tag filters - mostly just
changing to the settings page defining them in a textarea, with one per
line. Previously this was just a text input with the tags
comma-separated, which got unwieldy very quickly.
This reduces the size and spacing of some of the elements of a topic in
topic listings on small screens, and should make information display
better overall.
These buttons were basically icons, and it's better to have them with
text labels like this. Their left border was also disappearing at
smaller screen sizes due to re-using the .btn-comment-collapse style, so
it's better to do a separate style for "light buttons" like this, and
keep that behavior specifically to the actual comment collapse buttons.
When someone posts a new topic, this will automatically remove any tag
that matches the group name. So for example, if the topic is being
posted in ~music, a tag of "music" will be removed.
If there turns out to be some edge case where this is important, it can
be re-added through the tag editing interface, since this only applies
when posting a new topic.
When a user interacts with a comment (by voting, replying, labeling, or
bookmarking), any unread notifications they have from that comment will
now be marked as read.
This behavior is on by default, but can be disabled in Settings if the
user would rather mark all notifications read manually.
Unfortunately, right now Chrome only supports "pixelated", and Firefox
only supports "crisp-edges", so this should give the best result across
browsers.
This updates the clean_private_data script to delete more data
associated with users that deleted their accounts at least 30 days ago,
including all of their votes, subscriptions, bookmarks, and
notifications.
Due to hiding the overflow on topic sources to deal with longer domain
names, descenders (in 'y', 'g', 'j', etc.) were being hidden if they
went outside of the box. This increases the line-height and removes the
top margin - the result should be almost exactly the same, but won't cut
off the descenders.
This increases the touch size of the nav links, gives them a bit more
spacing on desktop, and center-aligns the header items vertically, which
looks better when they wrap (but that's still pretty bad overall).
This looked a bit off because the comment always has its own left
border, so the border was 1px thicker next to the button (and sometimes
a different color).