1017 Commits

Author SHA1 Message Date
Andrew Shu
0a9a1669e3 Run GitLab CI on "staging" and "develop" branches 2025-03-10 23:08:30 -06:00
Bauke
d16a537059 Hide the inner <details> text from comment excerpts but include the <summary> text.
Closes tildes-community/tildes-cf#4

See merge request tildes-community/tildes-cf!13
2025-03-10 23:08:14 -06:00
talklittle
3a857108d2 Restore project APT repos which are more up-to-date than Debian repo
Closes tildes-community/tildes-cf#31

See merge request tildes-community/tildes-cf!15
2025-03-10 23:05:03 -06:00
talklittle
6e85d8fef4 Run GitLab CI pipeline on merge requests
See merge request tildes-community/tildes-cf!14
2025-03-10 23:04:39 -06:00
talklittle
ba25720681 Skip linkify escaped username reference
Closes tildes-community/tildes-cf#12

See merge request tildes-community/tildes-cf!10
2025-03-10 23:00:47 -06:00
talklittle
0f1658fe06 Disable default redis service from APT
See merge request tildes-community/tildes-cf!11
2025-03-10 22:58:56 -06:00
talklittle
65bf6af141 Install prebuilt Redis and cmark-gfm from APT
See merge request tildes-community/tildes-cf!9
2025-03-10 22:58:34 -06:00
talklittle
4210b1e3e8 Use prebuilt Python 3.11 instead of building Python 3.9
Closes tildes-community/tildes-cf#14

See merge request tildes-community/tildes-cf!8
2025-03-10 22:57:31 -06:00
talklittle
58784c4465 Reload gunicorn from cronjob, delete gunicorn_reloader
Closes tildes-community/tildes-cf#3

See merge request tildes-community/tildes-cf!6
2025-03-10 22:53:04 -06:00
Andrew Shu
b97eaed93c Use better defaults for vagrant user in Dockerfile
The adduser script is recommended over useradd in Debian.
Sets Bash as default shell instead of /bin/sh, in particular.

Closes tildes-community/tildes-cf#18

See merge request tildes-community/tildes-cf!7
2025-03-10 22:51:27 -06:00
Andrew Shu
49f2c09258 Tell user to reboot Docker container after initial provisioning
This is needed so systemd services are properly monitored
by systemctl3.py in the Docker container.

Closes tildes-community/tildes-cf#13

See merge request tildes-community/tildes-cf!4
2025-03-10 22:51:10 -06:00
Bauke
cb6c1ea43d Fix the Pyramid debug toolbar not being accessible in the Docker-based Vagrant environment.
Closes tildes-community/tildes-cf#8

See merge request tildes-community/tildes-cf!3
2025-03-10 22:50:43 -06:00
talklittle
6be3688d3c GitLab CI testing
See merge request tildes-community/tildes-cf!2
2025-03-10 22:50:22 -06:00
talklittle
49886af37e Add Docker provider for Vagrant development environment
See merge request tildes-community/tildes-cf!1
2025-03-10 22:49:00 -06:00
Deimos
51a456bcf9 ArrayOfLtree: fix handling of "null" string value
If a topic tag is set to "null", the data in the column will have double
quotes around it (to distinguish it from an actual null value). This
wasn't being handled and would cause a crash when trying to parse the
value.
2025-02-28 13:26:28 -07:00
xzi
2962f0388b Readd Nord + Black reformat topic.py 2024-03-11 14:24:45 -04:00
Deimos
f355bc6a80 robots.txt: Block OpenAI GPTBot 2024-02-17 22:46:50 -07:00
kencx
d0d6b6d3dc Require password when modifying account recovery 2023-07-17 00:26:56 -06:00
Bauke
462dbfb580 Map the content_security_policy header to the request_uri. 2023-07-17 05:24:08 +00:00
Deimos
0bfcea102b Fix groups with subgroups for logged-out viewers 2023-07-11 02:23:27 -06:00
Deimos
a6de9d4880 Order subgroups in sidebar alphabetically 2023-07-10 23:19:40 -06:00
Deimos
11370abe7d Show topics from subscribed subgroups (toggleable)
Now that we have more subgroups, it was an issue that visiting a parent
group would always show the topics from all of the subgroups, regardless
of whether you were subscribed to them or not.

This changes it so that, by default, only topics from subgroups the user
is subscribed to will be shown. There is also a link at the top of the
listing to toggle to the other view (all subgroups or only subscribed
subgroups).
2023-07-10 23:15:42 -06:00
Aeledfyr
991fe087f4 Add ids to settings headings to allow links to sub-sections
Fixes #638
2023-06-23 07:19:26 +00:00
Aeledfyr
5081b86140 Apply proper styling to comments that are both new and by OP
Fixes #371.

Adds `.is-comment-by-op` class even if the comment is new or by
the current user.  This fixes the bolding of the "(OP)" tag and
preserves the colors from `new` or `mine`, which have priority
over `op` due to their ordering in `_comment.scss`.
2023-06-23 07:19:26 +00:00
Aeledfyr
a2599276b2 Keep dropdown menu visible when using keyboard navigation
Part of #747, prevents the dropdown menu from hiding itself
when the user tabs to an item in the list.
2023-06-23 07:19:26 +00:00
Aeledfyr
46cef48be1 Fix theme preview colors for the Zenburn theme
No associated issue, just a minor fix to make the Zenburn theme
use the correct colors for its button in the theme preview page,
rather than the default theme colors.
2023-06-23 07:19:26 +00:00
Aeledfyr
3b20b1f83b Fix visited link coloring hiding subscribed status in groups list
Fixes #720 by making the color explicitly apply in the :visited
case.  (Other specificity hacks could fix this, but this is the
cleanest.)
2023-06-23 07:19:26 +00:00
Aeledfyr
f51e664752 Fix striped table backgrounds within blockquotes
Fixes #659 by defaulting to the primary background color for normal
table rows.  As noted in the issue, this still looks a bit weird,
but it's no longer inconsistent.
2023-06-23 07:19:26 +00:00
Kaleb Elwert
6a8d2753e0 Accept the TOTP token before and after the current 2023-06-21 06:05:29 +00:00
Andrew Shu
996d52b185 Use npm ci for Ansible task
Otherwise Ansible never creates the node_modules directory.
2023-06-20 06:52:21 +00:00
Deimos
0dbb031562 Re-add donations via Stripe
Multiple people have been asking me how they can make a one-time
donation without going through GitHub or Patreon, so I'll re-add this
for now but will need to keep an eye out for fraud and potentially
disable it again soon.
2023-06-08 16:18:07 -06:00
Deimos
b485e15963 Remove ability to accept donations via Stripe
All of the Stripe payments have been fraud for months now, it's not
worth continuing to deal with the refunds and chargebacks.
2023-05-09 00:45:14 -06:00
Deimos
436c3f24f0 Update pypi package versions (requirements.txt)
A few tiny changes needed related to a few of the libraries, but nothing
significant.
2021-07-22 02:19:51 -06:00
Deimos
d928431058 Pin versions for Pyramid and SQLAlchemy
These updates seem like they won't be trivial. I'll come back to them
soon, but I'll need to look at them more carefully and I can update
everything else in the meantime.
2021-07-22 02:18:37 -06:00
Deimos
ff5a3d82cb Update Black to 21.6b0
This found a few docstrings that I had messed up.
2021-07-14 21:34:47 -06:00
Deimos
ed38ce5790 Type annotations: use standard generics (PEP 585)
As of Python 3.9, it's no longer necessary to import things like List
and Dict from the typing module, and we can just use the built-in types
like this.
2021-07-14 21:22:52 -06:00
Deimos
31afe0a8ba Update mypy to 0.910
This also involved installing some new packages for the type stubs for a
few of the major third-party libraries.

I also had to change some of the imports in some model files in strange
ways, I'm not sure why some of these were necessary. I suspect this
might be a bug in mypy, but I'm not sure if I'll be able to build a
reproduction of it to be able to report it.
2021-07-13 22:11:14 -06:00
Deimos
9720040cb9 Use a prospector fork, update dependencies
This is kind of dirty, but the prospector tool was broken after updating
Python to 3.9, and it seems to no longer be maintained. I forked it to
my personal GitHub account, un-pinned its dependencies, fixed a bug that
came up after updating pylint, and deleted a few dependencies that I
don't use (pylint plugins for Django, Flask, and Celery).

This commit also fixes all the new complaints from the updated pylint,
which were mostly explicitly re-raising exceptions, and some places
where I could use a generator instead of an unnecessary list
comprehension.

This will work for now, but I probably don't want to leave it in this
state. I should probably just stick to using the tools like pylint
directly, since this is now the second time I've needed to replace my
"tool runner" when it stopped being maintained (the first one was
pylama).
2021-07-12 23:57:04 -06:00
Deimos
fe42c7a685 Convert all PostgreSQL integer keys to bigint
There is one special exception in here: the unread_user_ids column in
the message_conversations table had to be left as an integer array,
since the PostgreSQL intarray extension doesn't work with bigints. The
trigger that updates that column also needed a minor tweak.

This isn't good, but I don't really like how that was done anyway (it
was for the purpose of group messages that don't even exist), so it
could probably just be eliminated.
2021-07-12 00:20:22 -06:00
Deimos
240621df6a Update Python version to 3.9.5
The minimal updates here were to update pygit2 and pip-tools.

However, prospector is currently broken as well, so the full code style
checks currently will not pass. This is not trivial to fix:

  - Currently, pylint returns errors from some of the mypy annotations
  - Upgrading pylint/astroid to the newest version fixes those errors,
    but breaks prospector
  - There is no newer release of prospector

I'm not totally sure how I want to fix this, I may need to fork
prospector.
2021-07-12 00:20:21 -06:00
Deimos
22039b2f48 Update Redis version to 6.2.4 2021-07-12 00:20:21 -06:00
Deimos
3319e0a179 Update PostgreSQL version to 13 2021-07-12 00:20:20 -06:00
Deimos
4cc100ab02 Switch to Debian 10 and Ansible
This changes the site to run on Debian 10 instead of Ubuntu 16.04. It
also fully converts the previous Salt setup to use Ansible instead.

Most of this was a relatively straightforward conversion, and it should
be very close to equivalent. One notable difference is that I removed
the setup for the "monitoring" server, since I wasn't confident that the
way of setting up self-hosted Sentry and Grafana was working any more.
I'll look to re-add that at some point, but it's not urgent.
2021-06-25 00:08:58 -06:00
Ras Fincher
d91ecf910f Add query params to auto-fill new topic title/link 2021-05-27 00:32:32 -06:00
Gyrfalcon05
9f148b77fe Fix topic log link length overruns 2021-03-31 18:54:51 -05:00
Deimos
6f7618d1a1 Adjust zero-width joiner check to fix IndexError
There was the potential for an IndexError here, with a string that
started with a zero-width joiner and had at least one more character
afterwards.
2021-03-14 18:41:09 -06:00
Flashynuff
70e570b77f Handle zero width joiner unicode chars for emoji
Some emoji variants require a zero-width joiner, and they were being
broken by the current code that stripped them out.
2021-03-14 18:39:17 -06:00
Deimos
348c930133 Fix blank lines at start of Atom/RSS feeds 2021-02-28 14:51:10 -07:00
Deimos
5093fca18e Update feeds to have absolute permalinks 2021-02-27 14:15:16 -07:00
Andrew Shu
a021b96bc7 Add RSS and Atom feeds for topic listings 2021-02-27 14:14:56 -07:00