Commit Graph

23001 Commits

Author SHA1 Message Date
fc63f0d316 FIX: page:changed was sometimes reporting the wrong URL
(This change could be considered a little risky so we should keep an eye
on it.)

The core issue here is that sometimes as far as the router was concerned
we had transitioned to a route even if a Topic model was still in the
process of loading. In this case the callback could not retrieve the
correct title yet because it had not loaded.

This fix returns a promise from `setupController` when visiting a topic,
which will have the router block until the topic is loaded. This means
that the transition never triggers until the topic title is present.

Note: adding a test for this is basically impossible - it was super hard
to reproduce even in a browser.
2020-07-28 11:48:40 -04:00
69efbd213b DEV: Refactor dark-light-diff usage in stylesheets
- Adds new `$danger-low-mid` SCSS variable
- Removes `dark-light-diff` outside variables and color transformations
2020-07-28 11:06:06 -04:00
c9485692ed FIX: Add back group redirects 2020-07-28 10:59:42 -04:00
0c7eaa57b2 FEATURE: allows to display charts by day/week/month (#10325) 2020-07-28 16:14:41 +02:00
4f8262e0d5 FIX: Cooked snippet of raw in Topic.similar_to.
If we don't cook the raw, we end up trying to match uncooked raw against
`TopicSearchData#search_data` which consists of cooked raw.
2020-07-28 15:20:18 +08:00
4b21b5aac1 FIX: Handle case where Post#raw is blank in Topic.similar_to. 2020-07-28 13:23:53 +08:00
dcfe765dac Make rubocop happy. 2020-07-28 12:06:38 +08:00
597d542c33 FIX: Improve Topic.similar_to with better Topic#title matches.
This changes PG text search to only match the given title against
lexemes that are formed from the title. Likewise, the given raw will
only be matched against lexemes that are formed from the post's raw.
2020-07-28 12:00:27 +08:00
074fa5cb18 Follow-up Safari fixes for 89f6ff1 2020-07-27 20:45:29 -04:00
7508c55a7b Remove extra whitespace between d-button icon and text 2020-07-27 18:49:57 -04:00
070a1d6e1e DEV: Remove duplicate allowedPmUsernames property
This property is already declared in the same file, so this removes the
one that isn't needed.
2020-07-27 16:10:00 -06:00
89f6ff1574 Prevent topic title from clipping some characters due to overflow 2020-07-27 17:26:48 -04:00
407bb96a22 FIX: Avoid validation error when deleting users with locked trust level 2020-07-27 17:40:10 +01:00
f32cc04ddc FIX: uses topic title for published page head title (#10312) 2020-07-27 15:09:12 +02:00
223b6d17bf DEV: Fix a function name typo 2020-07-27 11:22:57 +02:00
15e9057ec5 FIX: Reduce number of terms injected for host lexeme.
We do prefix matching in search so there is no need to inject the extra
terms.

Before:
```
"'discourse':10,11 'discourse.org':10,11 'org':10,11 'test':8A,10,11 'test.discourse.org':10,11 'titl':4A 'uncategor':9B"
```

After:
```
"'discourse.org':10,11 'org':10,11 'test':8A 'test.discourse.org':10,11 'titl':4A 'uncategor':9B"
```
2020-07-27 15:29:59 +08:00
0f53ad58c2 FIX: Improve regexp for matching version lexeme.
Follow up to b70f1084f7aa6bf3640d2ce5100f8fabdef47dae
2020-07-27 15:18:27 +08:00
de5ef5d895 DEV: add CSS class for composer action
This CSS class can be used to style specific composer actions
2020-07-27 16:51:01 +10:00
179335b5e3 DEV: correct performance hack
This code was intended to bypass iterating through tags in absence of a new
or unread topic.

Instead it always fired cause it was checking for function existence which
was clearly always true.
2020-07-27 16:51:01 +10:00
b70f1084f7 FIX: Don't inject extra terms for version lexeme. 2020-07-27 14:46:44 +08:00
f2342c2d32 FIX: reserve id for reaction notifications (#10315)
Use id 25 for reaction notifications
2020-07-27 11:39:50 +10:00
e0d9232259 FIX: use allowlist and blocklist terminology (#10209)
This is a PR of the renaming whitelist to allowlist and blacklist to the blocklist.
2020-07-27 10:23:54 +10:00
5077cf52fd REFACTOR: Remove Discourse.SiteSettings from upload.js 2020-07-24 13:39:16 -04:00
bb2460fe66 FIX: Uploads was not testing properly 2020-07-24 09:45:55 -04:00
808b5aa5ba FIX: Pass siteSettings through in more places 2020-07-24 09:45:55 -04:00
f8aa304c7d REFACTOR: Remove Discourse.SiteSettings from uploads.js
This involves passing the siteSettings around, which is somewhat error
prone so I tried to be careful.
2020-07-24 09:45:55 -04:00
8456252c21 Add deprecation for Discourse.SiteSettings in a helper 2020-07-24 09:45:55 -04:00
c4d5c0c91b REFACTOR: Remove Discourse.SiteSettings from utilities
This involves a little refactoring of how our `defaultHomepage()` works.
It previously would check the meta tag / site settings each time it was
called but now it only checks once on application boot.
2020-07-24 09:45:55 -04:00
4def5a8339 Remove old redirect rules 2020-07-24 09:45:55 -04:00
06a3fd0566 This initializer is not used anymore 2020-07-24 09:45:55 -04:00
bad083b3a3 REFACTOR: Remove Discourse.SiteSettings from clipboardData
Also rename method to `clipboardHelpers` to make searching easier since
`clipboardData` refers to browser functionality.
2020-07-24 09:45:55 -04:00
0213211068 REFACTOR: Remove Discourse.SiteSettings from text helpers 2020-07-24 09:45:55 -04:00
98fee7aa50 REFACTOR: Remove Discourse.SiteSettings from highlightSyntax 2020-07-24 09:45:55 -04:00
656abe22c7 REFACTOR: Remove Discourse.SiteSettings from more lib-like helpers 2020-07-24 09:45:55 -04:00
c6202af005 Update rubocop to 2.3.1. 2020-07-24 17:19:21 +08:00
0e78cd6e3a FIX: Add strip_secure_urls method to GroupSmtpMailer
* this mailer needs some more cleanup and specs;
  this commit just adds the missing method so the
  mailer does not error completely in secure media
  environments
2020-07-24 13:55:07 +10:00
181c4eb760 PERF: Avoid parsing Post#cooked with Nokogiri for every search. 2020-07-24 10:43:09 +08:00
b979579c1b DEV: Refactor draft attributes for CategoryList and TopicList.
Avoid repeating the same logic in a bunch of places which will allow us
to make changes to the draft attributes easier in the future.
2020-07-24 10:11:30 +08:00
1dd3af20c6 FIX: Do not show Email tab for group settings unless IMAP + SMTP enabled (#10301)
Also hide all the SMTP/IMAP related settings to avoid confusion, as this feature is still not 100% ready to go.
2020-07-24 12:00:36 +10:00
2aec92d0b4 FEATURE - allow Group Moderators to edit category description (#10292)
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2020-07-23 09:50:00 -04:00
61d3640643 DEV: Improve HTML structure for group-reports-nav-item outlet 2020-07-23 12:44:11 +01:00
3766122a82 DEV: Allow developmental post search index versions. 2020-07-23 15:19:46 +08:00
609ba50fe8 DEV: Add more granularity to SearchIndexer versions.
Sometimes, we just want to reindex a specific model and not all the
things.
2020-07-23 14:24:06 +08:00
4b053462c0 FIX: display correct status on unsubscribe page (#10294)
There was a bug that even when `email_digest` was set to false but
`digest_after_minutes` was positive, we were not displaying correct
status.

In addition, the message is improved when the user is unsubscribed +
unsubscribe from all is hidden.
2020-07-23 16:20:10 +10:00
e027acd367 FIX: Move consts and translations for bookmark auto delete prefs (#10295) 2020-07-23 13:12:28 +10:00
10a6824e5f Revert "PERF: Reduce size of search payload by removing unused topic attributes."
This reverts commit 84de643c04bf83740ccf9f085e0ff441d9482651.

Users are using the search endpoint as public API even though it is
meant to be internal. Revert for now while we figure out the path
forward on providing a more stable API to end users.
2020-07-23 09:25:31 +08:00
395d17e2ac DEV: Show failed to remove members from bulk groups api
Before this commit if you were bulk removing group members and passed in
a user who wasn't currently a member of that group the whole request
would fail. This change will return a 200 response now listing the users
that were removed and those that were skipped.
2020-07-22 14:32:31 -06:00
1100b3d185 UX: fix spacing of composer preview on mobile
Followup to 723d7e3a
2020-07-22 14:36:05 -04:00
c1bcb78441 REFACTOR: Allow helpers to access site settings
Since `Discourse.SiteSettings` is removed, helpers can now include and
call `helperContext().siteSettings` to get access to the settings
without using a global variable.
2020-07-22 14:14:38 -04:00
939fae3500 REFACTOR: Remove Discourse.SiteSettimgs from @setting decorator 2020-07-22 13:27:57 -04:00