Commit Graph

37499 Commits

Author SHA1 Message Date
e5dc843185 FIX: ensures hide is called when card is destroyed (#9814) 2020-05-18 10:10:40 +02:00
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
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
e81a4048e3 REFACTOR: s/focusAfterOnchange/focusAfterOnChange (#9801) 2020-05-16 11:20:37 +02:00
db8e872bda DEV: Move select kit to an addon (#9797) 2020-05-15 16:07:35 -04:00
7f07c513a7 FIX: Switching composer action does not refresh composer actions content (#9791) 2020-05-15 13:54:44 -04:00
6b04760572 FIX: Component was still used by data explorer 2020-05-15 13:52:03 -04:00
eee20a9814 FIX: Include plugin CSS assets when previewing themes 2020-05-15 18:12:53 +01:00
f86b123cfc DEV: Remove use of const in untranspiled js 2020-05-15 17:55:34 +01:00
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
7edd312f85 UX: focus category name when editing category (#9795) 2020-05-15 18:27:06 +02:00
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
9810ca1dbd UX: Add copied text upon copy button click (#9793) 2020-05-15 17:08:46 +02:00
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
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
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
d1146ccb7b Revert "FIX: Correct plugin api version bump."
This reverts commit 6a96c424b758b32ff63f78a74ada50090e7334ed.

False alarm. I was deploying on a docker image which was still on 0.9.0.
2020-05-15 21:22:44 +08:00
6a96c424b7 FIX: Correct plugin api version bump.
It doesn't seem to be following semver.
2020-05-15 21:17:50 +08:00
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
0495a748d0 FIX: Use CDN URLs for topic thumbnails 2020-05-15 13:35:20 +01:00
162d125b83 Fix lint. 2020-05-15 20:23:17 +08:00
dada1fc417 UX: Better composer-action icon when creating new topic. 2020-05-15 16:40:49 +08:00
f9a9bd136b FEATURE: Expose Composer.serializeToTopic in client side plugin api. 2020-05-15 16:16:58 +08:00
858735b5da DEV: Fix broken test due to 9ab5801a1bc5bfc505673d0c74f1a3c1e6c28461. 2020-05-15 15:00:04 +08:00
9ab5801a1b FIX: Allow post migrations using #change to carry out unsafe migration 2020-05-15 14:23:27 +08:00
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
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
165fa13c9d FIX: Always return 0 for non-human user current DraftSequence. 2020-05-15 10:40:36 +08:00
245e8212ca Revert "FIX: don't compute draft for (ro)bots 🤖 in topics list"
This reverts commit ec8f08d0da1b32213f3674d8e6dd8ff98e84d39d.
2020-05-15 10:40:35 +08:00
e37ea4a4a1 Revert "FIX: don't compute draft for bots on categories index route"
This reverts commit 1b7f23a1bc79e323a93cdcc06bbdc499a128a72b.
2020-05-15 10:40:35 +08:00
1a2b9435b0 DEV: Standardize table sorting verbiage (#9757)
* DEV: Standardize table sorting verbiage

This commit creates a common component that tables can use to make their
headers sortable. This commit also standardizes on using `desc` as the
default and passing in the `asc=true` flag to adjust the sorting
direction.

* Add deprecation warnings

Adds deprecation warnings if using previous params and maintains
backwards compatibility. Set the default sort value for group members to
be asc.

* switch group requests to use common table-header-toggle

* update fixture
2020-05-14 20:10:59 -06:00
11cd149122 FIX: WebAPK minting was broken due to shortcut icons
SVG support is very flaky, but this way at least minting works again
2020-05-14 21:56:35 -03:00
65a3fdbc57 FIX: randomly failing user_spec (#9754)
* FIX: randomly falling user_spec

When we evaluate `update_last_seen!` we relay on Redis to not run that code too often

https://github.com/discourse/discourse/blob/master/app/models/user.rb#L753

The problem is that not all specs which are running `update_last_seen!` are not cleaning after themselves

For examples specs in that block https://github.com/discourse/discourse/blob/master/spec/models/user_spec.rb#L901

So it can be replicated when you run a few times
`bundle exec rspec  ./spec/models/user_spec.rb -e "should not update the first seen value if it doesn't exist" -e "should have 0 for days_visited"`

We should delete Redis key after each spec which is evaluating `update_last_seen!`
2020-05-15 09:24:07 +10:00
869f9b20a2 PERF: Dematerialize topic_reply_count (#9769)
* PERF: Dematerialize topic_reply_count

It's only ever used for trust level promotions that run daily, or compared to 0. We don't need to track it on every post creation.

* UX: Add symbol in TL3 report if topic reply count is capped

* DEV: Drop user_stats.topic_reply_count column
2020-05-14 15:42:00 -07:00
675c9c38c8 Revert "FIX: Workaround WebAPK server bug with images without sizes"
This reverts commit bb7fca832fb16399df664c95f21980c41c0bc621.
2020-05-14 19:33:54 -03:00
bb7fca832f FIX: Workaround WebAPK server bug with images without sizes
Google WebAPK server was returning 500 with `any` sized svgs,
which is a spec violation.

Workaround for now setting a static size.

See https://bugs.chromium.org/p/chromium/issues/detail?id=1061911
2020-05-14 18:08:51 -03:00
5ff2a235f6 DEV: Allow 3-digit HEX color code in single icon route
Followup to aee8e62
2020-05-14 16:37:45 -04:00
1b7f23a1bc FIX: don't compute draft for bots on categories index route 2020-05-14 16:35:32 -04:00
e0e967ac46 FIX: Apply code quoting with no syntax highlighting (#9784) 2020-05-14 13:03:42 -07:00
4595560537 FIX: Use proper icons for App shortcut menu
Follow up to 3b0fa9b using the new icon URL introduced in e618efe

Will automatically use icons of the primary color of the active theme
 for the user during install.
2020-05-14 16:32:53 -03:00
63b8b3c849 Revert "Reland "DEV: Add checks that assets do not modify cookies to smoke-test.js" (#9774)" (#9783)
This reverts commit 186c471c44a278cfc8f29a18a649ce681ef92ab5.
2020-05-14 12:04:09 -07:00
186c471c44 Reland "DEV: Add checks that assets do not modify cookies to smoke-test.js" (#9774)
* Revert "Revert "DEV: Add checks that assets do not modify cookies to smoke-test.js (#9504)" (#9773)"

This reverts commit 732776e2ce4cd89d64a7ccd42e68e530d4ff162a.

* FIX: Run cookie tests only after logging in
2020-05-14 11:35:16 -07:00
aee8e62e21 FEATURE: Add endpoint for individual SVG icons (#9765) 2020-05-14 14:17:19 -04:00
9ad3f4401a DEV: always pull latest coding standard dependencies (#9782) 2020-05-14 19:31:38 +02:00
956d15d13f UX: Do not use small onebox images as post/topic images 2020-05-14 18:01:43 +01:00
bec6bace53 DEV: Allow plugins to hide user stats by new guardian method (#9772) 2020-05-14 11:57:35 -05:00
87b9488137 UX: Limit iOS modal keyboard changes to composer
Followup to 423802fbc
2020-05-14 12:48:28 -04:00
0c6f30d92a FIX: Allow lazy-yt thumbnails to fetched by pull_hotlinked_images
The thumbnails were being correctly downloaded, but the URLs were not being substituted correctly in post_process_cooked because the lazy-yt output did not include the `onebox` class.
2020-05-14 17:33:16 +01:00
c979f1877b FIX: Deleting old migration
It was using ActiveRecord which broke migrating a new site. The groups
table now has a unique constraint on group name so this migration from
2014 should not be necessary anymore.
2020-05-14 12:02:37 -04:00
ec8f08d0da FIX: don't compute draft for (ro)bots 🤖 in topics list 2020-05-14 17:17:42 +02:00