Commit Graph

37587 Commits

Author SHA1 Message Date
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
42b300b9be DEV: Skip I18n in plugins until they can be updated 2020-05-14 10:40:53 -04:00
aa2d040526 DEV: Update ESLint to remove I18n global
Also fixes missed imports in core.
2020-05-14 10:18:12 -04:00
a047004c9a FIX: Specific email error for replies to digest emails (#9770) 2020-05-14 09:04:58 -05:00
42e5a5bb39 DEV: do not append/prepend if callback returns nothing (#9778) 2020-05-14 14:38:03 +02:00
3ed6a0e904 FIX: Detect Wayback Machine using user agent (#9777) 2020-05-14 21:10:07 +10:00
321879a619 FIX: Load locale first in wizard app 2020-05-14 11:48:55 +03:00
9a18bacbe3 DEV: Fix lint. 2020-05-14 16:10:51 +08:00
a1a798ac7d DEV: Expose Composer.serializeOnUpdate in client side plugin api.
Also expose `Composer.serializeOnCreate` as well.
2020-05-14 16:06:29 +08:00
fdea969f14 DEV: Minor follow up to d7e230c1b9115fa3806382bfc32d98cdfc27b711 2020-05-14 16:02:54 +08:00
95a80525ae DEV: Remove erroneous code introduced in d7e230c1b9115fa3806382bfc32d98cdfc27b711 2020-05-14 15:58:44 +08:00
d7e230c1b9 UX: Introduce composer-actions when editing a post. 2020-05-14 15:56:08 +08:00
5b603cb3ab FIX: update mini racer to correct heap dumps
This corrects an issue where mini racer's `write_heap_snapshot`
produces corrupt heaps cause the file is not flushed.
2020-05-14 17:52:05 +10:00