Commit Graph

37519 Commits

Author SHA1 Message Date
Joffrey JAFFEUX
3623a395dc
UI: refinements to topic footer buttons (#9780) 2020-05-19 09:51:34 +02:00
Martin Brennan
779dc30d2e FIX: Join bookmarks migration on users to avoid missing user records
* the post_actions table has no FK to users, so if a user has been
  deleted we may end up with dangling post_action records, which then
  interferes with the bookmarks migration because bookmarks DO have
  an FK to users
2020-05-19 16:31:05 +10:00
Guo Xiang Tan
062cb1e1cb
UX: Remove caret from notifications-button. 2020-05-19 13:41:13 +08:00
Kris
864fb45ff0 Improve mobile friendliness of crawler view 2020-05-19 00:24:17 -04:00
Guo Xiang Tan
05beaa7f45
DEV: Remove override of flushdb in DiscourseRedis. 2020-05-19 10:26:23 +08:00
Guo Xiang Tan
96c02caba7
DEV: Change use of Redis flushall to flushdb.
FLUSHALL removes all keys from all databases. Instead we only want to
remove keys from the current Redis database.
2020-05-19 10:20:00 +08:00
Krzysztof Kotlarek
f99f6ca111
FIX: randomize file name when created from fixtures (#9731)
* FIX: randomize file name when created from fixtures

When a temporary file is created from fixtures it should have a unique name.
It is to prevent a collision in parallel specs evaluation

* FIX: use /tmp/pid folder to keep fixture files
2020-05-19 09:09:36 +10:00
Krzysztof Kotlarek
16f6240782
FIX: Bump rack version from 2.0.8 to 2.2.2 (#9811)
Version 2.1.1 was not working with our Sidekiq but version 2.2.2 is fine
2020-05-19 08:43:45 +10:00
Gerhard Schlager
6d5e9db883 FIX: Restoring backup didn't clear cached translation overrides 2020-05-18 18:51:51 +02:00
Gerhard Schlager
27c611b1d1 FIX: Reverting multiple translation overrides didn't clear cache 2020-05-18 18:51:29 +02:00
Joffrey JAFFEUX
cfad38184d
FIX: improves and fixes a regression with category-selector (#9821) 2020-05-18 17:44:47 +02:00
David Taylor
96848b7649
UX: Allow secure media URLs to be cached for a short period of time
Signed S3 URLs are valid for 15 seconds, so we can safely allow the browser to cache them for 10 seconds. This should help with large numbers of requests when composing a post with many images.
2020-05-18 15:00:41 +01:00
Joffrey JAFFEUX
303dece5ee
DEV: skip this test for now (#9818)
It seems to be involved in various random failures
2020-05-18 15:37:58 +02:00
Joffrey JAFFEUX
1876b3cc4c
FIX: more resilient/consistent date-picker loading (#9817) 2020-05-18 15:29:24 +02:00
Joffrey JAFFEUX
48ed1b40cf
REFACTOR: ensures later is correctly canceled (#9796) 2020-05-18 14:20:23 +02:00
Joffrey JAFFEUX
9482ddff73
UX: show caret only in topic footer buttons dropdown select boxes (#9816) 2020-05-18 14:07:40 +02:00
David Taylor
f968155288
FIX: Ensure no image downloads during topic thumbnail serialization
If image uploads are missing a width/height, we re-download them to update the width/height in the database. However, this takes significant resources so we don't want to run this logic during topic serialization.
2020-05-18 12:04:29 +01:00
Joffrey JAFFEUX
918bd75909
FIX: allows to remove a topic timer with delete_replies as type (#9800) 2020-05-18 11:47:08 +02:00
Guo Xiang Tan
d01c336899
DEV: Clean up some Redis leaks in test env. 2020-05-18 17:27:37 +08:00
Joffrey JAFFEUX
320b21ab5b
UX: allows dropdown-select-box to display a caret (#9803)
```
selectKitOptions: {
  showCaret: true // default false
}
```
2020-05-18 10:50:33 +02:00
Joffrey JAFFEUX
e5dc843185
FIX: ensures hide is called when card is destroyed (#9814) 2020-05-18 10:10:40 +02:00
Sam Saffron
862773ec83
FIX: do not remove stop words when using English locale
PG already handles English stop words, the list in cppjieba is
bigger than the list PG uses, which in turn causes confusion cause
words such as "volume" are stripped using cppijieba stop word list

We will follow up with another commit here to apply the Chinese
word stopwords, but for now to eliminate the confusion we are
skipping applying the stopword list when the dictionary in PG is
in English.
2020-05-18 10:54:56 +10:00
Krzysztof Kotlarek
ea63fa7de7
FIX: extract reset_last_seen_cache! in user_spec (#9808)
Helper method to avoid code duplication
2020-05-18 09:13:37 +10:00
Joffrey JAFFEUX
e81a4048e3
REFACTOR: s/focusAfterOnchange/focusAfterOnChange (#9801) 2020-05-16 11:20:37 +02:00
Robin Ward
db8e872bda
DEV: Move select kit to an addon (#9797) 2020-05-15 16:07:35 -04:00
Alan Guo Xiang Tan
7f07c513a7
FIX: Switching composer action does not refresh composer actions content (#9791) 2020-05-15 13:54:44 -04:00
Robin Ward
6b04760572 FIX: Component was still used by data explorer 2020-05-15 13:52:03 -04:00
David Taylor
eee20a9814
FIX: Include plugin CSS assets when previewing themes 2020-05-15 18:12:53 +01:00
David Taylor
f86b123cfc
DEV: Remove use of const in untranspiled js 2020-05-15 17:55:34 +01:00
David Taylor
ac042c2bbe
UX: Fetch higher-resolution youtube thumbnails where available
We have been using YouTube's 'hqdefault.jpg' image which works consistently to provide a 480x360 thumbnail. YouTube does provide larger thumbnails, but not consistently for every video. By using og:image, we will fetch the best resolution YouTube can provide for each video.

This commit also refactors lazy-yt to re-use the thumbnail already existing in the cooked content. This means we get lazy-loading for free, and avoid hotlinking images to YouTube (when download remote images is enabled on the site).
2020-05-15 17:49:27 +01:00
Joffrey JAFFEUX
7edd312f85
UX: focus category name when editing category (#9795) 2020-05-15 18:27:06 +02:00
Joffrey JAFFEUX
b07f1bfd93
FIX: displays a title on sk header if no selected name (#9794)
none has to be defined.
2020-05-15 17:36:00 +02:00
Justin DiRose
9810ca1dbd
UX: Add copied text upon copy button click (#9793) 2020-05-15 17:08:46 +02:00
cketti
3a615a8bdd Update description of level 0 user limitations
With the default configuration new users can post 1 image.
2020-05-15 22:48:17 +08:00
dependabot-preview[bot]
769611f2d9
Build(deps-dev): Bump ruby-prof from 1.4.0 to 1.4.1 (#9790)
Bumps [ruby-prof](https://github.com/ruby-prof/ruby-prof) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/ruby-prof/ruby-prof/releases)
- [Changelog](https://github.com/ruby-prof/ruby-prof/blob/master/CHANGES)
- [Commits](https://github.com/ruby-prof/ruby-prof/compare/1.4.0...1.4.1)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-15 10:13:49 -04:00
Joffrey JAFFEUX
26c2fb4354
DEV: skip click track test (#9792)
This test might be responsible of random test failures, skip this for now to check if the random failure sill happens after dozens of tests.
2020-05-15 16:12:22 +02:00
Guo Xiang Tan
d1146ccb7b
Revert "FIX: Correct plugin api version bump."
This reverts commit 6a96c424b7.

False alarm. I was deploying on a docker image which was still on 0.9.0.
2020-05-15 21:22:44 +08:00
Guo Xiang Tan
6a96c424b7
FIX: Correct plugin api version bump.
It doesn't seem to be following semver.
2020-05-15 21:17:50 +08:00
David Taylor
461b4e5cc6
DEV: Add framework for filtered plugin registers (#9763)
* DEV: Add framework for filtered plugin registers

Plugins often need to add values to a list, and we need to filter those lists at runtime to ignore values from disabled plugins. This commit provides a re-usable way to do that, which should make it easier to add new registers in future, and also reduce repeated code.

Follow-up commits will migrate existing registers to use this new system

* DEV: Migrate user and group custom field APIs to plugin registry

This gives us a consistent system for checking plugin enabled state, so we are repeating less logic. API changes are backwards compatible
2020-05-15 14:04:38 +01:00
David Taylor
0495a748d0
FIX: Use CDN URLs for topic thumbnails 2020-05-15 13:35:20 +01:00
Guo Xiang Tan
162d125b83
Fix lint. 2020-05-15 20:23:17 +08:00
Guo Xiang Tan
dada1fc417
UX: Better composer-action icon when creating new topic. 2020-05-15 16:40:49 +08:00
Guo Xiang Tan
f9a9bd136b
FEATURE: Expose Composer.serializeToTopic in client side plugin api. 2020-05-15 16:16:58 +08:00
Guo Xiang Tan
858735b5da
DEV: Fix broken test due to 9ab5801a1b. 2020-05-15 15:00:04 +08:00
Guo Xiang Tan
9ab5801a1b
FIX: Allow post migrations using #change to carry out unsafe migration 2020-05-15 14:23:27 +08:00
Sam Saffron
4601833e4e
PERF: ensure we run full GC on contexts
Prior to this change we would never clear memory from contexts and
rely on V8 reacting to pressure

This could lead to bloating of PrettyText and Transpiler contexts

This optimisations ensures that we will clear memory 2 seconds after
the last eval on the context
2020-05-15 14:01:54 +10:00
Sam Saffron
0cbaa8d813
FEATURE: extend duration allowed for download
Previously we would raise a warning in the logs if downloading
a file (from s3) takes longer than 60 seconds.

At scale this happens reasonably frequently.

1. Raised the duration to 3 minutes

2. Pulled the resizing mutex out of the downloading mutex
so we have less and clearer error logs
2020-05-15 12:45:47 +10:00
Guo Xiang Tan
165fa13c9d
FIX: Always return 0 for non-human user current DraftSequence. 2020-05-15 10:40:36 +08:00
Guo Xiang Tan
245e8212ca
Revert "FIX: don't compute draft for (ro)bots 🤖 in topics list"
This reverts commit ec8f08d0da.
2020-05-15 10:40:35 +08:00
Guo Xiang Tan
e37ea4a4a1
Revert "FIX: don't compute draft for bots on categories index route"
This reverts commit 1b7f23a1bc.
2020-05-15 10:40:35 +08:00