Commit Graph

31609 Commits

Author SHA1 Message Date
Sam
33269c4172 FEATURE: do no search for groups unless a term is specified
Do not allow `/u/search/users.json` to list any group matches unless a
specific `term` is specified in the API call.

Adding groups should always be done when an actual search term exists,
blank search is only supported for users within a topic
2019-02-20 17:28:22 +11:00
31ffa5f64e UX: Allow users to see filename in image-uploader component. (#7022)
https://meta.discourse.org/t/downsides-of-the-new-logo-ui-in-site-settings/102247/23?u=tgxworld
2019-02-20 13:55:55 +08:00
Sam
fa35b555b7 Correct failing test
WARNING: forEach is a trap when async is involved cause it leaks promises

for X of Y is a very clean workaround that keeps the code ver readable
2019-02-20 16:15:10 +11:00
10dad7d013 FIX: Use CDN for optimized loading images. (#7006)
We missed a few spots in the cooked post processor where images where not loaded using CDN, causing
uneeded load and requests against the server
2019-02-20 13:55:08 +11:00
da1ff2da2c FIX: Create and consume temp table inside a transaction (#7030)
To prevent access issue in pgbouncer which runs in transaction pooling
2019-02-20 13:52:40 +11:00
Sam
1f4ace4f56 FEATURE: autocomplete usernames early in topic based on participation
Following this change when a user hits `@` and is replying to a topic they
will see usernames of people who were last seen and participated in the topic

This is somewhat experimental, we may tweak this, or make it optional.

Also, a regression in a423a938 where hitting TAB would eat a post you were writing:

Eg this would eat a post:

``` text
@hello, testing 123 <tab>
```
2019-02-20 13:34:43 +11:00
cff108762a Fix deadblock in 615a22a579221dfe5509c8dd7bcf01a93abba9d5. 2019-02-20 10:25:43 +08:00
0e0daa2c91 DEV: Prevent race condition when keeping site in readonly mode. 2019-02-20 10:01:18 +08:00
615a22a579 FIX: Race condition in SidekiqPauser.
This was showing up in our tests.
2019-02-20 09:52:26 +08:00
f0414487f0 Update private_email site setting description
The `private_email` site setting also disables digest emails, as such emails are not useful without content.
2019-02-19 20:43:39 -05:00
4d31b425e3 DEV: Validity of distributed mutex configurable once per instance.
Follow up to 4f9e5e19c879273c4aeec125501809e8fe8b09c2.
2019-02-20 09:29:45 +08:00
f2efa0da66 DEV: Allow validity of lock to be customizable for DistributedMutex. (#7025)
- Allows a user to override the default lock validity of 60 seconds.
- Also clean up test which was leaking a redis key
2019-02-20 09:23:42 +08:00
Sam
918a0ea3a4 FIX: use autocomplete="discourse" to disable Chrome address autofill
https://stackoverflow.com/a/47822599/17174

Chrome 63 and up start ignoring `autofill="off"`

Per: https://bugs.chromium.org/p/chromium/issues/detail?id=468153#c164

> The tricky part here is that somewhere along the journey of the web autocomplete=off become a default for many form fields, without any real thought being given as to whether or not that was good for users. This doesn't mean there aren't very valid cases where you don't want the browser autofilling data (e.g. on CRM systems), but by and large, we see those as the minority cases. And as a result, we started ignoring autocomplete=off for Chrome Autofill data

So to work around this decision we now explicitly say: autocomplete="discourse"
when we don't want Chrome to randomly fill in addressed (aka. always)
2019-02-20 10:15:59 +11:00
246997dbd9 FIX: an <a> with a target of _blank wants a new window 2019-02-19 14:44:30 -08:00
49e7073438 FIX: Hide advanced theme fields behind a flag, pending UI improvement 2019-02-19 22:25:00 +00:00
d08939ab05 FIX: Should be possible to save an empty theme_field in the editor
Removing the theme_field JS object when the value was empty caused the server to maintain the previous value, making it impossible to delete the content of a field.
2019-02-19 21:49:31 +00:00
5d75bd4831 FIX: Don't try to rename group when username is taken
FIX: Always rename groups with the default locale instead of using the user's locale
2019-02-19 22:31:03 +01:00
dbcf05d62c DEV: Code style improvements following review
Followup to 05ee1d1aba3d1238867b59d91b72327688358439
2019-02-19 20:02:29 +00:00
34b2157b8c FIX: Slow test (deadlock)
It was getting caught in a `DistributedMutex` deadlock (twice!), which
meant this test was taking 120s to run.

I'm not sure why queue jobs was turned off here, because when I turn it
on the test passes and takes <2s instead.
2019-02-19 12:31:23 -05:00
563b953224 DEV: Add 'backfill_etags_' to the method name since it also backfilling the etags 2019-02-19 21:54:35 +05:30
7878e5007a FIX: Refactor to prevent themes affecting core stylesheets (#7029)
If a theme setting contained invalid SCSS, it would cause an error 500 on the site, with no way to recover. This commit stops loading theme settings in the core stylesheets, and instead only loads the color scheme variables. This change also makes `common/foundation/variables.scss` available to themes without an explicit import.
2019-02-19 15:55:59 +00:00
9ade04b709 FIX: removes legacy browsers-refresh button (#7028) 2019-02-19 16:38:21 +01:00
b3ab0e5753 FIX: moment_js locale files for zh_CN and zh_TW were not found
moment_js uses a different format for locale names in plugins and files in core. Follow-up to 4799cf281131e1bf34fcb6aad49b00769cff469e
2019-02-19 16:08:06 +01:00
4799cf2811 FIX: moment_js locale files provided by plugins were ignored 2019-02-19 15:28:47 +01:00
84c56e16f9 REFACTOR: Use keyword argument for fallback_to_english flag 2019-02-19 15:28:47 +01:00
05ee1d1aba FEATURE: Added settings/translations support to theme editor UI (#7026)
- These advanced fields are hidden behind an 'advanced' button, so will not affect normal use
- The editor has been refactored into a component, and styling cleaned up so menu items do not overlap on small screens
- Styling has been added to indicate which fields are in use for a theme
- Icons have been added to identify which fields have errors
2019-02-19 12:56:01 +00:00
0616837a5d UX: moves wizard's "Finish" button to the left of back and next (#7027)
This was done to avoid clicking finish when clicking fast on next.
2019-02-19 13:32:01 +01:00
8a4cd15e46 REFACTOR: topic model (#7020) 2019-02-19 10:13:46 +01:00
15fd875855 REFACTOR: color-scheme-color model (#7019) 2019-02-19 09:31:26 +01:00
cba0dd33ee REFACTOR: admin-customize-color (#7018) 2019-02-19 09:31:11 +01:00
2c6bf184bc REFACTOR: admin-badge-preview (#7017) 2019-02-19 09:30:52 +01:00
3bf61fca66 REFACTOR: admin-user-field-item (#7016) 2019-02-19 09:30:38 +01:00
ee692414ce REFACTORING: admin-edit-badge-groupings (#7015) 2019-02-19 09:30:24 +01:00
bf2059baf5 SPEC: check enqueued jobs size instead of using mocks 2019-02-19 13:14:06 +05:30
76696b22fe DEV: call 'enqueue_hooks' method only if active webhooks exist 2019-02-19 12:47:57 +05:30
27e7f2bee0 DEV: call 'enqueue_hooks' method only if active webhooks exist 2019-02-19 12:43:08 +05:30
f2c3415548 FIX: Should not generate payload until active webhooks are exist 2019-02-19 12:23:42 +05:30
8cd4ceba49 DEV: Remove unnecessary Sidekiq.unpause! during backup. 2019-02-19 14:01:13 +08:00
adbc87857e DEV: Fix randomly failing test.
Even if a thread is alive in the loop check, it may be dead by the
time `Thread#wakeup` is called on it.
2019-02-19 13:34:52 +08:00
83f13ecf82 FEATURE: bump onebox dependency
- Adds support of kaltura oneboxes
- Adds support for typeform oneboxes
2019-02-19 15:22:43 +11:00
bf21ebaecc DEV: Allow custom value when pausing sidekiq to aid in debugging.
Sometimes, it is useful to know what caused Sidekiq to be paused.
2019-02-19 10:55:53 +08:00
c29076152d PERF: Reduce hit to Redis server when keeping a site in reaonly mode. 2019-02-19 10:29:08 +08:00
86a2172bda DEV: Fix heisentest.
Unpause sidekiq before clearning up all threads.
2019-02-19 08:21:51 +08:00
4f5aebc338 UX: reduce subcategory badge spacing 2019-02-18 19:04:36 -05:00
c08b2ddecf FIX: stricter matching on local-dates (#7023) 2019-02-18 22:39:45 +01:00
08ae73f868 Fix typo 2019-02-18 16:51:57 +01:00
99ad61afb7 FEATURE: Trigger an event after a backup restore 2019-02-18 11:48:03 +01:00
50f833def0 fix the build
JsPrettier on Sublime was failing because: https://github.com/jonlabelle/SublimeJsPrettier/issues/157#issuecomment-458175837
2019-02-18 11:52:11 +05:30
dc2776bcdd FIX: do not show "move to new PM" option to moderators 2019-02-18 11:35:00 +05:30
052eaed16a lighten embed blockquote style for consistency 2019-02-17 21:00:46 -08:00