Commit Graph

24415 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
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
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
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
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
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
371afc45e0 DEV: API for plugins to add post update params and handlers (#12505) 2021-03-24 10:22:16 -05: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
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
dc73aadbff FIX: bulk "archive" and "move to inbox" for group messages was broken (#12488) 2021-03-23 21:34:47 +05:30
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
2ad9b3f432 FEATURE: Add anchor links to headings (#12379) 2021-03-23 10:45:06 +02:00
e48d055232 FIX: Do not show duplicate_link notice for quotes (#12481)
Quoting a link from the topic would show a false duplicate_link notice.
2021-03-23 10:43:55 +02:00
bcd6efa98c FIX: Never display the invite show page form if DiscourseConnect enabled (#12466)
This form does not need to show if discourse connect is enabled
because generally the fields that would be filled in here are
filled in by the SSO provider. There is also an issue right now
where enable_local_logins and enable_discourse_connect can be
true at the same time which is not right.
2021-03-23 09:02:07 +10:00
437c9a554b FEATURE: Import and export watched word (#12444)
Find & Replace and Autotag watched words were not completely exported
and import did not work with these either. This commit changes the
input and output format to CSV, which allows for a secondary column.

This change is backwards compatible because a CSV file with only one
column has one value per line.
2021-03-22 22:32:18 +02:00
fb4486d5f1 FEATURE: Add CSP frame-ancestors support (#12404) 2021-03-22 16:00:25 -03:00
ccc44baa10 FEATURE: Add a typographer rule to replace (pa) with ¶. (#12478) 2021-03-22 15:04:08 -03:00
4e46732346 FEATURE: Implement browser update in crawler view (#12448)
browser-update script does not work correctly in some very old browsers
because the contents of <noscript> is not accessible in JavaScript.
For these browsers, the server can display the crawler page and add the
browser update notice.

Simply loading the browser-update script in the crawler view is not a
solution because that means all crawlers will also see it.
2021-03-22 19:41:42 +02:00
3e586ab25a FIX: Don't attempt to delete non-existent bookmark (#12473)
Could happen when using the keyboard shortcut. ("d d")
2021-03-22 18:25:34 +01:00
e4ec0da714 FIX: Anons should see the Topic slow mode notice. (#12460) 2021-03-22 13:55:45 -03:00
ec7415ff49 FEATURE: Check email availability in signup form (#12328)
* FEATURE: Check email availability on focus out

* FIX: Properly debounce username availability
2021-03-22 17:46:03 +02:00
4fb2d397a4 FIX: ensures popper's autocomplete instance is destroyed (#12476) 2021-03-22 16:19:36 +01:00
15a9a85f0a FIX: ensures invisible link is not interfering with UI/tab order (#12472) 2021-03-22 12:51:18 +01:00
b7556fca80 DEV: Add ap-east-1 S3 region (#12457)
Asia Pacific (Hong Kong) ap-east-1
2021-03-22 10:22:29 +01:00
2b5046af19 FIX: a never created listener was removed (#12469) 2021-03-22 09:58:59 +01:00
c3e76da90a DOC: document addShortcut click option (#12467) 2021-03-22 09:51:45 +01:00
4857891ecf DEV: correctly defines focusComposer shortcut as shift+c (#12468) 2021-03-22 09:46:38 +01:00
9526c1a27b FEATURE: Add admin-area class to HTML tag (#12459) 2021-03-22 11:36:26 +11:00
942ee1e218 FIX: Tests were broken in Firefox (#12456)
There are a lot of little fixes to tests here, but the biggest issue was
too much recursion because we kept replacing the helpers over and over
again. I assume Chrome has tail recursion or something to speed this up
but Firefox hated it.

Otherwise, we can't rely on the order of attributes in rendered HTML so
I simplified most of those tests to just look for key strings in the
HTML that are rendered.
2021-03-22 11:35:51 +11:00
d898e00242 FIX: Clear draft modal correctly when switching topics (#12458)
Fixes an issue where the "Keep editing" button in the discard draft
modal wouldn't work when switching to a new topic with an open composer
and clicking Reply.

Followup to d470e4f
2021-03-22 11:32:19 +11:00
49f4c548ef FEATURE: Bookmark pinning (#12431)
Users can now pin bookmarks from their bookmark list. This will anchor the bookmark to the top of the list, and show a pin icon next to it. This also applies in the nav bookmarks panel. If there are multiple pinned bookmarks they sort by last updated order.
2021-03-22 09:50:22 +10:00
e3d86c4e35 FIX: Only refresh the review count when the user can see the review queue. (#12453)
We currently make an AJAX request every time someone opens the hamburger menu, resulting in a forbidden response when a user can't see the review queue.
2021-03-19 16:20:41 -03:00
534008ba24 FIX: Improve handling when email is obfuscated (#12450)
This commit ensures that email validation is skipped when the email is
obfuscated, that the email is no longer send when it is not an invite
link and no username is suggested if the email is hidden as it may
reveal the first part of the email.

Follow up to commit 033d6b64374dce833ecb073fbf824428d3a78bcd.
2021-03-19 17:15:46 +02:00
c9923a3e3e UX: Composer actions menu header should display the icon of selected action (#12449)
See a video of the change in the PR: https://github.com/discourse/discourse/pull/12449.
2021-03-19 17:48:43 +03:00