Commit Graph

41126 Commits

Author SHA1 Message Date
2d686191b5 FIX: Bookmark topics were not being updated when the post moved (#12542)
Because bookmarks have both topic and post ID, when the post was moved into another topic the bookmark was still attached to the post but did not show in the UI. This PR makes it so the all topic IDs for bookmarks attached to a post are updated when a post is moved.

Also included is a migration to fix affected records (e.g. on Meta there are 20 affected records).

See: https://meta.discourse.org/t/improved-bookmarks-with-reminders/144542/203
2021-03-29 11:25:48 +10:00
d5e44fdd46 Build(deps): Bump mini_mime from 1.0.2 to 1.0.3 (#12540)
Bumps [mini_mime](https://github.com/discourse/mini_mime) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/discourse/mini_mime/releases)
- [Changelog](https://github.com/discourse/mini_mime/blob/master/CHANGELOG)
- [Commits](https://github.com/discourse/mini_mime/compare/v1.0.2...v1.0.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-29 00:00:49 +02:00
924639578e Build(deps-dev): Bump webmock from 3.12.1 to 3.12.2 (#12541)
Bumps [webmock](https://github.com/bblimke/webmock) from 3.12.1 to 3.12.2.
- [Release notes](https://github.com/bblimke/webmock/releases)
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bblimke/webmock/compare/v3.12.1...v3.12.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-28 23:58:09 +02:00
e8cad4bbf3 PERF: improve category moderators query (#12538)
In the about page, we list a certain number of category moderators.

This rewrites the SQL query used to retrieve the most recent category moderators in order
to perform better with a large number of users/categories/category moderators.

TIL: you can ORDER BY inside an ARRAY_AGG in postgres
TIL: you can slide ARRAYS in postgres
2021-03-28 10:25:30 +02:00
db7be947df FIX: Allow dismissing Discard Drafts modal via ESC (#12532) 2021-03-26 13:07:19 -04:00
edc0f61920 UX: Emoji popup layout adjustments (#12533) 2021-03-26 13:07:04 -04:00
5096920500 FEATURE: Implement nonces for Google Tag Manager integration (#12531) 2021-03-26 11:19:31 -04:00
d858c7680a Build(deps-dev): Bump fabrication from 2.21.1 to 2.22.0 (#12529)
Bumps [fabrication](https://github.com/paulelliott/fabrication) from 2.21.1 to 2.22.0.
- [Release notes](https://github.com/paulelliott/fabrication/releases)
- [Changelog](https://github.com/paulelliott/fabrication/blob/master/Changelog.markdown)
- [Commits](https://github.com/paulelliott/fabrication/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-26 09:03:08 -04:00
ccff062cd8 Build(deps-dev): Bump parallel_tests from 3.5.2 to 3.6.0 (#12528)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from 3.5.2 to 3.6.0.
- [Release notes](https://github.com/grosser/parallel_tests/releases)
- [Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
- [Commits](https://github.com/grosser/parallel_tests/compare/v3.5.2...v3.6.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-26 09:02:45 -04:00
8de07181a8 FEATURE: Add new :topic_tags_changed DiscourseEvent (#12530)
This is called in DiscourseTagging.tag_topic_by_names only after
all the validations etc. have been passed, and after topic.tags = X
has been called (because this is when the associations are created/
destroyed). The event has the topic, then a second param with the
old and new tag names in arrays for easy inspection.
2021-03-26 13:53:47 +10:00
3bd482c6bd IMPR: improved topic timer component's code structure (#12519)
This PR improves the code structure of the topic-timer-info component while retaining all the functionality and making it extensible for theme/plugin devs.
2021-03-26 09:12:16 +10:00
eb25d3a954 FIX: add all the keys that should be allowed in user_notifications (#12526) 2021-03-25 14:00:05 -04:00
dffc3a2f8e DEV: Add tests for invite system (#12524) 2021-03-25 18:26:22 +02:00
013b4f353b FIX: Replace 'Chromebook' with 'Chrome OS' (#12508)
There are many Chrome OS devices and no way to determine the exact device.
2021-03-25 17:09:32 +02:00
4505951d32 UX: Display a tooltip when trying to delete an automatic group. (#12493) 2021-03-25 11:07:38 -03:00
50c23304ac DEV: Move incorrectly placed topic tests (#12513)
The diff is confusing but the gist is that there are some topic acceptance tests that were incorrectly placed in "Topic featured links" group. This moves them into "Topic".

Moved tests:
* Converting to a public topic
* Unpinning unlisted topic
* selecting posts
* select below
* View Hidden Replies
* Quoting a quote keeps the original poster name
* Quoting a quote of a different topic keeps the original topic title
* Quoting a quote with the Reply button keeps the original poster name
* Quoting a quote with replyAsNewTopic keeps the original poster name
* Quoting by selecting text can mark the quote as full
2021-03-25 15:04:51 +01:00
c028745468 FIX: Allow pasting invitees in invite modal (#12520)
Meta topic: https://meta.discourse.org/t/pasting-email-in-share-a-thread-box-stopped-working/180919?u=osama.
2021-03-25 16:24:40 +03:00
f74785f758 FIX: Composer save button should be ✏ Save Edit when editing a PM post (#12521)
Meta topic: https://meta.discourse.org/t/edits-on-private-messages-should-generate-a-notification/182370/4?u=osama.
2021-03-25 16:24:22 +03:00
f637bf1b58 DEV: Deprecate message parameter in auth provider plugin API (#12523)
This has been unused since d2bceff133ac152678a1407d45fea260a0fe8536
2021-03-25 13:23:48 +00:00
edcb5f77da FIX: remove @discobot likes feature on public topics (#12522)
https://meta.discourse.org/t/discobot-is-breaking-the-meaning-of-likes-on-my-community/183804/8?u=techapj
2021-03-25 18:23:55 +05:30
acc73f2989 FIX: uploads:fix_missing_s3 rake task used wrong SHA1 (#12495) 2021-03-25 11:35:29 +01:00
c03c85e661 FIX: delete orphan post revisions (#12502)
I was adding specs to ensure that post actions and uploads are removed for permanently deleted posts.

I noticed that post revisions were not permanently destroyed. I added a migration to fix old data.
2021-03-25 12:34:53 +11:00
ea6f9af08b FIX: Add topic_diff to PostRevisor (#12518)
The instance of the PostRevisor is passed to the post_edited
event. It is useful to know what has happened to the topic in
this event (we already pass a boolean for topic_changed? but that
is not so helpful by itself).
2021-03-25 10:24:50 +10:00
9eb7c37098 FIX: Make mobile back/forward keybinds work for anons (#12512)
You don't need to be logged in to browse a forum in Discourse Hub 😃
2021-03-24 23:51:51 +01:00
e4f3a04d53 DEV: Move color definition functions to mixins (#12511) 2021-03-24 18:35:52 -04:00
fa9b9be01f Build(deps): Bump rubocop from 1.11.0 to 1.12.0 (#12515)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.11.0...v1.12.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-24 22:55:37 +01:00
76c9bb6e60 Build(deps): Bump uniform_notifier from 1.14.1 to 1.14.2 (#12516)
Bumps [uniform_notifier](https://github.com/flyerhzm/uniform_notifier) from 1.14.1 to 1.14.2.
- [Release notes](https://github.com/flyerhzm/uniform_notifier/releases)
- [Changelog](https://github.com/flyerhzm/uniform_notifier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/uniform_notifier/compare/v1.14.1...v1.14.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-24 22:54:11 +01:00
ca4bc9b8c7 FIX: error overriding user notification string with valid keys (#12510)
When overriding the translation for i18n keys used in user notifications
like user_notifications.reply_by_email, errors were returned for
valid interpolation keys. Keys like topic_title_url_encoded are
supported, so no error should be raised.

https://meta.discourse.org/t/-/50305/7
2021-03-24 15:58:24 -04:00
b8822c7a87 DEV: Skip composer duplicate link test (#12509) 2021-03-24 15:25:31 -04:00
9dca7fe9a3 DEV: Replace Rails ends_with? with Ruby end_with? (#12507) 2021-03-24 19:51:21 +02:00
26e1ae17c4 DEV: Change flakey posts controller spec (#12506) 2021-03-24 11:20:38 -05:00
371afc45e0 DEV: API for plugins to add post update params and handlers (#12505) 2021-03-24 10:22:16 -05:00
e7fb45cc29 FEATURE: Treat emoji or similar characters as one (#12482)
Long messages consisting only of emojis, dots or commas used to be
valid because character-wise they were over the limit.
2021-03-24 16:47:35 +02:00
c449bf77b3 FIX: new-topic route with sub-category and tags were broken (#12503)
https://meta.discourse.org/t/complex-url-for-creating-new-topics-results-in-server-side-error/184067/4?u=techapj
2021-03-24 19:54:29 +05:30
ee17ca9dc6 FIX: 404 error when editing an expanded reply (#12504) 2021-03-24 10:22:27 -04:00
16073a22a1 DEV: Add Ember CLI tests workflow (#12474) 2021-03-24 14:41:37 +01:00
cfd73cc84c Build(deps-dev): Bump listen from 3.4.1 to 3.5.0 (#12500)
Bumps [listen](https://github.com/guard/listen) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/guard/listen/releases)
- [Commits](https://github.com/guard/listen/compare/v3.4.1...v3.5.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-24 09:09:22 +01:00
5ff2912502 Build(deps): Bump debug_inspector from 1.0.0 to 1.1.0 (#12499)
Bumps [debug_inspector](https://github.com/banister/debug_inspector) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/banister/debug_inspector/releases)
- [Commits](https://github.com/banister/debug_inspector/compare/v1.0.0...v1.1.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-24 09:08:53 +01:00
Sam
dc6b547ed8 FIX: rake db:validate_indexes was broken (#12463)
A file was moved, but zeitwerk can not find it due to custom inflection.

Renamed so it can be properly found.
2021-03-24 08:53:01 +11:00
Sam
c47f403dd9 FIX: correct mailing list migration (#12501)
Migration mistakenly enabled mailing list mode after it was disabled explicitly
2021-03-24 08:49:27 +11:00
Sam
5a1318e3c3 DEV: upgrade mini_sql (#12465)
* DEV: upgrade mini_sql

Even though we are not planning on using this quite yet, mini_sql now supports
prepared statements.

Would like this upgrade merged so we can do some benchmarking.

Note, this will not work with pg_bouncer, but sites that are not using it
may benefit from the feature.

* implement multisite friendly prepared statements
2021-03-24 08:48:04 +11:00
f3eab6a86a FIX: Perform better email validation (#12497)
Using UserEmail for validation is not sufficient because it checks the
emails of staged users too.
2021-03-24 08:44:51 +11:00
be5ed73f08 UI: Make sure staff logs don't break the layout (#12494)
Prevents accidental layout stretching in `/admin/logs/staff_action_logs`
2021-03-23 22:08:28 +01:00
6ff888bd2c DEV: Retry-after header values should be strings (#12475)
Fixes `Rack::Lint::LintError: a header value must be a String, but the value of 'Retry-After' is a Integer`. (see: 14a236b4f0/lib/rack/lint.rb (L676))

I found it when I got flooded by those warning a while back in a test-related accident 😉 (ember CLI tests were hitting a local rails server at a fast rate)
2021-03-23 20:32:36 +01:00
2a4ddc621d FIX: Add migration to set correct redemption_count (#12491)
Redeeming email invites did not increase the redemption_count which let
those invites in a weird state were they were both pending and redeemed.
2021-03-23 18:57:39 +02:00
066c59d0e3 FIX: Regression in colors used by non-default theme (#12492)
eb7f0ec caused this regression, where a non-default theme set to use
the base color scheme was resolving to the default theme's color scheme.
2021-03-23 12:46:25 -04:00
dc73aadbff FIX: bulk "archive" and "move to inbox" for group messages was broken (#12488) 2021-03-23 21:34:47 +05:30
e477a9a47d Update translations (#12490) 2021-03-23 16:12:04 +01:00
d7bd62d9cf FIX: Replace censored watched word consistently (#12486)
Applying oneboxes and replacing censored watched words does not happen
in a strict order which often lead to inconsistencies. This commit
fixes the behavior and will never censor oneboxes.

To make it always censor oneboxes implies significant changes to the
PrettyText pipeline.
2021-03-23 13:09:24 +02:00
deb9e3cd22 Fix CSS for collapsed table cells when showing insertion in Raw mode (#12489) 2021-03-23 10:43:25 +01:00