Commit Graph

22905 Commits

Author SHA1 Message Date
Penar Musaraj 81ab62c72a
DEV: Refactor `blend-primary-secondary()` usage in SCSS 2020-07-28 13:33:31 -04:00
Joffrey JAFFEUX cfd3dcee4a
FIX: reduces charts height (#10327) 2020-07-28 18:42:14 +02:00
Joffrey JAFFEUX 11faec71ae
FIX: prevents group show serializer to override basic group serializer (#10326) 2020-07-28 18:11:15 +02:00
Robin Ward 4e317e7aca FIX: Computed property deprecation
This `description` field on a theme is returned from the server side and
needn't be calculated in the front end. I tested in the UX and seems to
work well.
2020-07-28 11:55:47 -04:00
Robin Ward 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
Penar Musaraj 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
Robin Ward c9485692ed FIX: Add back group redirects 2020-07-28 10:59:42 -04:00
Joffrey JAFFEUX 0c7eaa57b2
FEATURE: allows to display charts by day/week/month (#10325) 2020-07-28 16:14:41 +02:00
Guo Xiang Tan 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
Guo Xiang Tan 4b21b5aac1
FIX: Handle case where `Post#raw` is blank in `Topic.similar_to`. 2020-07-28 13:23:53 +08:00
Guo Xiang Tan dcfe765dac
Make rubocop happy. 2020-07-28 12:06:38 +08:00
Guo Xiang Tan 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
Kris 074fa5cb18 Follow-up Safari fixes for 89f6ff1 2020-07-27 20:45:29 -04:00
Kris 7508c55a7b Remove extra whitespace between d-button icon and text 2020-07-27 18:49:57 -04:00
Blake Erickson 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
Kris 89f6ff1574 Prevent topic title from clipping some characters due to overflow 2020-07-27 17:26:48 -04:00
David Taylor 407bb96a22
FIX: Avoid validation error when deleting users with locked trust level 2020-07-27 17:40:10 +01:00
Joffrey JAFFEUX f32cc04ddc
FIX: uses topic title for published page head title (#10312) 2020-07-27 15:09:12 +02:00
Jarek Radosz 223b6d17bf DEV: Fix a function name typo 2020-07-27 11:22:57 +02:00
Guo Xiang Tan 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
Guo Xiang Tan 0f53ad58c2
FIX: Improve regexp for matching version lexeme.
Follow up to b70f1084f7
2020-07-27 15:18:27 +08:00
Sam Saffron 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
Sam Saffron 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
Guo Xiang Tan b70f1084f7
FIX: Don't inject extra terms for version lexeme. 2020-07-27 14:46:44 +08:00
Krzysztof Kotlarek f2342c2d32
FIX: reserve id for reaction notifications (#10315)
Use id 25 for reaction notifications
2020-07-27 11:39:50 +10:00
Krzysztof Kotlarek 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
Robin Ward 5077cf52fd REFACTOR: Remove `Discourse.SiteSettings` from upload.js 2020-07-24 13:39:16 -04:00
Robin Ward bb2460fe66 FIX: Uploads was not testing properly 2020-07-24 09:45:55 -04:00
Robin Ward 808b5aa5ba FIX: Pass `siteSettings` through in more places 2020-07-24 09:45:55 -04:00
Robin Ward 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
Robin Ward 8456252c21 Add deprecation for `Discourse.SiteSettings` in a helper 2020-07-24 09:45:55 -04:00
Robin Ward 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
Robin Ward 4def5a8339 Remove old redirect rules 2020-07-24 09:45:55 -04:00
Robin Ward 06a3fd0566 This initializer is not used anymore 2020-07-24 09:45:55 -04:00
Robin Ward 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
Robin Ward 0213211068 REFACTOR: Remove `Discourse.SiteSettings` from text helpers 2020-07-24 09:45:55 -04:00
Robin Ward 98fee7aa50 REFACTOR: Remove `Discourse.SiteSettings` from highlightSyntax 2020-07-24 09:45:55 -04:00
Robin Ward 656abe22c7 REFACTOR: Remove `Discourse.SiteSettings` from more lib-like helpers 2020-07-24 09:45:55 -04:00
Guo Xiang Tan c6202af005
Update rubocop to 2.3.1. 2020-07-24 17:19:21 +08:00
Martin Brennan 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
Guo Xiang Tan 181c4eb760 PERF: Avoid parsing `Post#cooked` with Nokogiri for every search. 2020-07-24 10:43:09 +08:00
Guo Xiang Tan 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
Martin Brennan 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
jbrw 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
David Taylor 61d3640643
DEV: Improve HTML structure for group-reports-nav-item outlet 2020-07-23 12:44:11 +01:00
Guo Xiang Tan 3766122a82
DEV: Allow developmental post search index versions. 2020-07-23 15:19:46 +08:00
Guo Xiang Tan 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
Krzysztof Kotlarek 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
Martin Brennan e027acd367
FIX: Move consts and translations for bookmark auto delete prefs (#10295) 2020-07-23 13:12:28 +10:00
Guo Xiang Tan 10a6824e5f
Revert "PERF: Reduce size of search payload by removing unused topic attributes."
This reverts commit 84de643c04.

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